How to Create Self-Verifying API Workflows with Postman

Quick Overview

The video successfully demonstrates how to create a self-verifying Retrieval Augmented Generation (RAG) workflow using Postman Flows, which integrates API calls to a knowledge base and an LLM mock to ensure generated answers are supported by factual context and citations, automatically flagging issues if documentation or API behavior changes.

Key Points: The RAG workflow uses the Postman Flow canvas to chain together four key API interactions: searching a knowledge base, capturing relevant documents, checking for document presence, and generating an answer via an LLM mock. The 'Search Knowledge Base' block queries a mock knowledge base API using inputs like 'question', 'topK' (set to 3 in the demo), 'kbUrl', and 'example'. The 'Check for Docs' block implements conditional logic to verify if the retrieval step returned any documents, branching to a fallback answer if none are found. The 'Apply Guardrails' block truncates long outputs and removes any sensitive data like API keys before sending the final prompt to the LLM mock. The final 'Generate Answer' block uses the retrieved context and the guarded prompt to produce an answer that includes verifiable citations, as shown in the results panel. The self-verifying aspect is achieved because if the retrieval step fails (e.g., due to API changes), the flow diverts to a fallback path, ensuring the LLM does not generate an answer without context. The entire workflow, built entirely inside Postman Flows, combines the clarity of a visual diagram with the reliability of executable tests.

Context: Technical Writer Melinda Gutermuth from Postman demonstrates building a complex Retrieval Augmented Generation (RAG) workflow directly within the Postman Flows environment. The goal is to create an executable, self-verifying workflow that first fetches relevant documentation snippets based on a user question, then uses those snippets to prompt a mock Large Language Model (LLM) to generate an accurate, cited answer, while also including guardrails and fallback logic.

Raw markdown version of this recap