A retrieval regression detective revealing which evidence moved and why the aggregate changed.
A ranking is an ordered list of unique document ids. The Orchard restore query has graded evidence: a recovery procedure is more useful than a passing mention in release notes.
Start with a learner workspace
Retrieval augmented generation, Model evaluation. Language foundation: Python data structures.
Use Python 3.10+ and its standard library. POSIX is required where the project uses file locks or process-group supervision.
python3 scripts/project_test.py retrieval-evaluation-lab --init learning-artifacts/retrieval-evaluation-lab
python3 scripts/project_test.py retrieval-evaluation-lab --stage 1 --path learning-artifacts/retrieval-evaluation-labBuild route
- Validate rankings and graded judgments
- Compute precision and recall at k
- Reward useful evidence near the top
- Compare systems query by query
Run with your own inputs
After completing the stages, these commands run your workspace code on the original Orchard examples. Replace the sample paths with your own files.
python3 learning-artifacts/retrieval-evaluation-lab/cli.py projects/retrieval-evaluation-lab/examples/baseline.json projects/retrieval-evaluation-lab/examples/candidate.json projects/retrieval-evaluation-lab/examples/judgments.json --out retrieval-diff.jsonTo inspect the complete reference first, replace learning-artifacts/retrieval-evaluation-lab with projects/retrieval-evaluation-lab/solution in the same command. JSON results use schema_version: 1; paths and argument examples are explicit so another tool can consume them.
Integration boundary
Metrics apply to supplied labels. Unjudged documents receive zero gain and remain counted as unjudged. Use --fail-on-regression to return exit 1 for any query with lower NDCG.
python3 scripts/project_test.py retrieval-evaluation-lab --all --solution --strict
python3 scripts/project_test.py retrieval-evaluation-lab --all --path learning-artifacts/retrieval-evaluation-lab --strictThe first command checks the reference. The second checks your implementation. The published examples and tests are regression evidence, not a production certification or an unseen benchmark.