Evaluating RAG
Golden sets, recall, MRR and nDCG by hand, answer checks and judges, failure triage, regression tests in CI and live signals, ending in an eval harness for AskDocs.
A RAG product can fail in the search or in the writing, and a good-looking answer hides both. This phase teaches you to measure each part on its own: a golden set of real questions (including ones the handbook cannot answer), retrieval metrics computed by hand, checks on the answers, and a triage that names the stage that broke.
You will build every metric from its formula (recall, precision, hit rate, MRR and nDCG), run each in Python, Java and JavaScript with identical output, and see why two systems with the same hit rate can differ in order. You will also write rule checks and a judge-model call, learn their limits, and turn a quality bar into a regression test that can fail a build.
The Build topic gives AskDocs a scoreboard: a golden set, a harness that compares two retrievers and a gate. The playbook collects the recipes to copy into any project. LLM Engineering Phase 9 teaches evals for any model app; this phase goes deeper on what is specific to retrieval.
Practise this phase
Hands-on exercises: write the code, run it, and press Check to have it tested automatically.