Part 0 · Start here
The big picture on one page
A RAG system answers a question in two moves. First it looks things up. Then it writes, using only what it found. Everything else in this book is a detail of one of these steps.
RAG in one sentence
Retrieval-augmented generation (RAG) means: before a language model answers, a search system fetches documents about the question, and the model writes its answer from those documents and says which ones it used.
Think of an open-book exam. A language model on its own takes the exam from memory. A RAG system is allowed to open the book, and it must write the page number next to each claim.
The pipeline
Here is the pipeline we ran in the TREC 2026 RAG track. Most RAG systems have the same seven steps, with different choices in each one.
- 1AskThe user's need, written out. In TREC RAG 2026 it is a long paragraph called a narrative.Ch 7, 24
- 2FindSearch the collection for candidate documents. We used BM25 on seven versions of the query.Ch 5, 6, 7
- 3CombineMerge the seven result lists into one. We used Reciprocal Rank Fusion.Ch 8
- 4OrderA slower, smarter model re-sorts the top 100 documents.Ch 9
- 5CutDecide how much of each document the writer sees: 500 characters, or up to 1,000 words.Ch 10, 13
- 6Write and citeA language model writes the answer. Each sentence names up to three documents that support it.Ch 12 to 15
- 7JudgePeople and automatic judges score the answer: does it contain the key facts, and do the citations hold?Ch 17 to 22
What can go wrong at each step
| Step | Typical failure | What it looks like in the answer |
|---|---|---|
| Find | The right document is never retrieved | A key fact is missing, and no later step can add it |
| Combine | Scores from different searches are added although they are on different scales | One search method silently decides everything |
| Order | Good documents sit low in the list | The writer leans on weaker documents it read first |
| Cut | The evidence is cut before the useful part | The answer is vague where the source was specific |
| Write and cite | The model adds a claim from memory | A sentence with a citation that does not support it |
| Judge | The judge prefers fluent text to correct text | The wrong system wins the comparison |
Three questions to keep asking
- Did we find it? Retrieval sets the ceiling. A writer cannot cite a document it never saw.
- Did we use it faithfully? Every claim should trace back to a retrieved document.
- How do we know? A result is only as good as the experiment and the judge behind it.
Watch and read
- VideoWhat is Retrieval-Augmented Generation (RAG)? IBM Technology. A short whiteboard talk on why a model should look things up before it answers. Checked 14 Nov 2026
- SiteTREC RAG track home page. The tasks, the timeline and the data for the track this book follows. Checked 14 Nov 2026