- All Courses
- Retrieval-Augmented Generation in Practice
- Why Retrieval
- Anatomy of a RAG pipeline
Anatomy of a RAG pipeline
Ingestion runs offline: load documents, split them, embed the pieces, and index them with their metadata.
Overview
Two pipelines, not one
Ingestion runs offline: load documents, split them, embed the pieces, and index them with their metadata. The query path runs per request: embed or parse the question, retrieve candidates, re-rank, assemble a prompt, generate.
Keeping them separate matters operationally. Re-indexing a corpus should never happen inside a user request, and changing an embedding model means reprocessing everything on the ingestion side.
When an answer is wrong, find the stage. Was the right passage retrieved at all? If not, it is a retrieval problem. If it was retrieved and the answer still ignored it, it is a generation problem. These have completely different fixes.
In this lesson you will:
- Trace a query through every stage
- Separate the ingestion path from the query path
- Know which stage a bad answer came from
Resources
Notes are not saved yet — they clear when you leave this page.
The knowledge cutoff problem
8m
When RAG is the wrong answer
11m