AI MOOC
✦ Grow togetherInvite 3 friends, earn 1 month of membership · Up to 12 monthsInvite friends →

Library / My reading notes

Evaluate 12 cases with separate retrieval and answer checks

Generate an observed report and identify failure layers without inflated accuracy claims.

Back to the RAG course plan: Build a searchable, cited RAG knowledge base

Chapter 7 / 8 · Read and take notes

Generate an observed report and identify failure layers without inflated accuracy claims.

Understand the method

Each case defines question, audience, expected_sources, should_abstain and a review reference. Cases cover facts, gaps, missing conditions, archive noise, multi-part requests and unrelated queries. References are review material, never substitute responses.

--eval runs retrieval only. recall_at_3 measures the fraction of expected sources present in three candidates. One of two sources is 0.5; both is 1. No-source cases receive null and require a separate noise check. This is evidence recall, not answer accuracy.

Use a separate answer review table for actual output, abstention, citation membership, citation meaning, audience, conditions and completeness. Unknown references and misleading valid references are different defects.

Locate the failure: missing corpus, incorrect filters, low retrieval rank, unsupported generation or stale citation/version display. Each layer requires a different repair.

Change one factor for an observed failure, rerun the fixed set and add a held-out case. Do not display only the repaired case while hiding regressions elsewhere.

Passing 12 cases establishes results only for this corpus and set. Real systems need broader queries, access boundaries, updates, timeouts and injection cases. Report the observed test results rather than a universal accuracy percentage.

  1. 1Fixed set
  2. 2Run
  3. 3Diagnose
  4. 4Retest

Included material

python3 rag_lab.py --eval > retrieval-report.json

Human table: case | candidates | expected abstention | actual answer | citation meaning | failure layer | repair
--eval does not populate actual model answers.

Work through the steps

  1. Run --eval and inspect Q2, Q10 and Q12.
  2. Calculate recall for a two-source case and compare.
  3. Review only observed model answers; mark unrun cases explicitly.

Worked example

Illustrative calculation: expected P4/P5, found P4/P3/P6 gives recall 0.5. If both are found but only repair is answered, retrieval passes while completeness fails. A no-source case is not a 100% recall score.

Your exercise

Submit an observed report and one before/after repair. Add a separately labeled validation question and keep the original set comparable.

Check before delivery

  • Separate retrieval recall from answer correctness.
  • Retain before/after outputs, versions and failures.
Finish the exercise, then view the reference

A useful evaluation is traceable from question and inputs to candidates and judgment. A mean score never replaces per-case analysis.

An original course with teaching exercises. Reading records, practice outcomes and independent certification are distinct.

References and further reading

The lessons are original. The following sources are provided under their respective permissions.

Article / guide

Prompt Engineering Guide

DAIR.AI · en/zh

MIT

License checked. This entry links to the original; the book text is not mirrored.

License checked: 2026-10-16 · Pinned 57673726
Article / guide

RAG and Vector Databases

Microsoft · en/zh

MIT

License checked. This entry links to the original; the book text is not mirrored.

License checked: 2026-10-16 · Pinned d45da912
Whitepaper / report

NIST AI 600-1: Generative AI Profile

NIST / Autio et al. · en

NIST Technical Series reprint policy

Original PDF provided under the institution’s reprint policy.

License checked: 2026-10-16
Article / guide

Ollama Chat API

Ollama · en

Official documentation link; no full-text reproduction

Original link only; full text is not mirrored.

License checked: 2026-10-20