Technical explanations · Drawbly
What is a RAG pipeline? Follow the two paths
By Drawbly ·
Retrieval-augmented generation (RAG) has two different moments: prepare material for search, then retrieve relevant passages when a question arrives. Separating them makes the architecture and its failure points easier to see.

Path 1: prepare the material
Imagine a team wants to answer questions about its API documentation. It extracts the useful text, splits long documents into passages and builds an index that can find those passages later. The index might support keyword search, vector search or both. The diagram keeps that implementation choice open because each has different tradeoffs.
This path has to run again when source material changes. If the index contains an old version of a guide, a later answer may sound confident while using stale context. The document version and update path matter as much as the model choice.
Path 2: answer a question
Now someone asks, “What changed in API v2?” The application searches the index, selects passages that appear relevant and sends those passages with the question to a language model. The model writes an answer from the supplied context. In a real product, the application can also show citations so the reader can inspect the source passages.
The model does not need to hold every document in its parameters. It receives selected context at answer time. The tradeoff is that a poor search result can leave out the crucial passage. Adding more text to the prompt does not automatically repair retrieval.
Check retrieval and the answer separately
If the right passage was never retrieved: inspect chunk boundaries, query wording, filters and the index. This is a search problem.
If the passage was retrieved but the answer misstates it: inspect the prompt, citation handling and answer evaluation. This is a generation problem.
A correct-looking answer is not proof of grounding. Microsoft's RAG design guide recommends evaluating retrieval and the end-to-end answer separately. It also distinguishes a fixed one-search RAG flow from agentic RAG, where an agent can choose searches during the run.
Draw the RAG system you actually have
Keep the two paths visible. Rename Documents and Search index to your actual sources and store. On the answer path, mark the retrieval method, where citations come from and one failure worth checking. Leave infrastructure out when it does not help explain the question-to-answer path.
The editable RAG template is a starting point. Change its labels in Drawbly, export a PNG for a design discussion or keep the drawing file so the explanation can change with the system.
Microsoft Learn: Design and develop a RAG solution covers preparation, retrieval, generation and evaluation choices.