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.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page