Four lessonsAbout 15 minutes
Pipeline stageOne part of the chain
Self-checkedAnswers are in the text
Lesson 1
The problem RAG addresses
A model answers from what it learned during training plus what is in the prompt. If your policy changed last month, it is not in the weights.
Retrieval puts approved text into the prompt at question time, so the answer can be grounded in a document you control.
- Grounding means the answer can be traced to a source.
- Retrieval does not change the model's judgement.
- Freshness comes from your index, not from the model.
Check yourself. Why can a model not know this month's policy?
Lesson 2
When retrieval helps
Retrieval helps when answers live in a bounded corpus: policies, manuals, contracts, product documentation, case files.
It helps most when the user needs a citation and when the corpus changes more often than the model.
- A defined corpus beats the open web.
- Citations build trust.
- Access control must travel with the chunks.
Check yourself. What makes a corpus a good fit for retrieval?
Lesson 3
When retrieval is the wrong tool
If the task needs arithmetic over transactions, use a query, not a language model. If the answer must be exact, use a rules engine.
Retrieval also fails when the corpus is contradictory, unowned or full of scans nobody can read.
- Do not use RAG for calculations.
- Contradictory documents produce contradictory answers.
- Unreadable scans are a data problem first.
Check yourself. Name a task that should not be solved with retrieval.
Lesson 4
The pipeline in one picture
Ingest, clean, chunk, embed, index, retrieve, rerank, build context, answer, cite, evaluate.
Each stage has an owner and a failure mode. Most bad answers come from ingestion and chunking, not from the model.
- Garbage in, confident garbage out.
- Evaluate each stage separately.
- Log the sources used for every answer.
Check yourself. Which stage usually causes a bad citation?