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.
- 1Fixed set
- 2Run
- 3Diagnose
- 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
- Run --eval and inspect Q2, Q10 and Q12.
- Calculate recall for a two-source case and compare.
- 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.