feat(eval): add ranked retrieval metrics (YEH-009)#10
Merged
Conversation
Commit squash-scope reviewRange: Heuristic candidatesNo clear squash candidates found from overlap or message-prefix heuristics. SQUASH_SCOPE_NEEDS_REWRITE=0 |
Add precision@k, recall@k, MRR, and nDCG@k to `yore eval` for measuring BM25 retrieval quality. Metrics computed over initial search results deduplicated to unique doc paths. Questions with `relevant_docs` in JSONL get per-question and aggregate ranking output; questions without it produce existing output only (backward compatible). Also fixes found/missing bug where substring matching ran against the query text instead of the assembled digest. New CLI flag: --k (comma-separated, default 5,10). Stabilizes flaky test_dupes_group_mode (LSH is probabilistic; assert on output format, not specific pairs).
31d6047 to
75554b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
yore evalfor measuring BM25 retrieval quality--kCLI flag (comma-separated, default5,10) controls which k values are reportedrelevant_docsin JSONL get per-question and aggregate ranking; questions without produce existing output only (backward compatible)Test plan
test_eval_json_result_serializationfor new fieldstest_eval_with_relevant_docs_computes_metricsandtest_eval_without_relevant_docs_omits_metricscargo clippy -- -D warningsclean