Lesson 05.07 · Phase 05 · Retrieval & Agentic RAG
Self-correcting RAG
Retrieval being right doesn't make the answer right. Check every sentence against the chunk it cites, send the failures back for revision, and when it still can't be verified, say so instead of shipping it.
Learning objectives
- Implement answer checks in code: citations must point to retrieved chunks, numbers must appear in the cited chunk, and most of a sentence's content words must too.
- Build a draft → check → revise loop with a revision cap, passing specific failures back as feedback.
- Degrade safely: return only the verified sentences and say what was left out.
- Recognise checker false positives, and why a checker needs its own tests.
Lesson 1 split failures into retrieval failures and reading failures. This lesson is about the second kind. The right chunks are in the prompt, and the answer still says:
Loading the full lesson…