The RAG Pipeline
In this article
- Name the stages of a baseline RAG pipeline in its offline and online lanes, and the artifact each stage hands to the next.
- Tell the required stages from the optional parts, such as an embedding for each chunk or a filter or rerank step.
- Follow a source id through every artifact and find the stage that dropped it.
- Recognise a question where agentic retrieval would replace the one fixed search.
- Terms defined here: RAG pipeline, chunk, index, embedding, reranker, agentic retrieval.
Overview
You ask a support assistant about a refund, and it replies with an answer and the name of the help page it used. That looks like one step. It is many: part of the work ran days earlier, when the help pages were prepared, and the rest ran after you pressed send. When a reply names no page, you need to know which step to open.
In a made-up example, Brightline, a home-internet provider, runs a support assistant that answers customers from about 400 help pages, looks up orders, issues refunds of at most $50 and hands a conversation to a person. You will follow one question through every step, name what each step hands to the next, and find the step that lost the page name.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Two lanes, seven stages
- The offline lane: from documents to an index
- The online lane: from a question to chunks
- Assembling the request
- Generating the answer
- Following the source id
- When one search is not enough
- Sources
- Check yourself, 13 questions