Who it is forAn ML engineer tuning a RAG search step who needs proof that a metric gain did not hurt any single query.
The problemMean NDCG can rise while one query ranks its most relevant evidence lower, and the average hides it.
The outcomeA reproducible comparison with per-query deltas and the judgments used to score them, plus a check that can fail a release.
What you need first
- Node.js, npx, and python3 installed for the coding agent tutor
- A skill-capable coding agent such as Claude Code or Codex, with a writable skills scope
- Python 3.10 or newer for the retrieval and firewall projects
- Node.js 22.18 or newer for the agent trace debugger
- A clone of the repository so the project_test.py grader is available
Steps
- Run
python3 --versionand confirm it reports 3.10 or newer. (inferred, check the README) - Run
python3 scripts/project_test.py retrieval-evaluation-lab --init learning-artifacts/retrieval-evaluation-labfrom the repository root. (inferred, check the README) - Implement ranking validation, precision and recall, and rank-sensitive metrics in the starter.
- Run
python3 scripts/project_test.py retrieval-evaluation-lab --all --path learning-artifacts/retrieval-evaluation-lab --strictuntil every stage passes. (inferred, check the README) - Keep the per-query comparison and judgments, and compare your output against projects/retrieval-evaluation-lab/solution/.
Prompt for your agent
In the repo rohitg00/ai-engineering-from-scratch, run the retrieval-evaluation-lab project with --init into learning-artifacts/retrieval-evaluation-lab, then implement stages until the --all --strict grader passes. Expected output: a per-query delta report that lists the query whose most relevant evidence ranks lower. Verify that the grader reports all stages as passing.
Caveat. The metrics describe the relevance judgments you supply; they do not establish whether an answer is correct.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for rohitg00/ai-engineering-from-scratch and "Catch a retrieval ranking regression before release"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer