Repository navigation
Measure search quality on public benchmarks; fix BM25 word splitting - #2
Merged
Merged
Conversation
evaluation/retrieval_eval.py stores each SciFact abstract as one passage in the app's own engine and runs the 300 test questions through vector search, BM25, vector + reranker, the full hybrid + reranker pipeline, and the app's default call (3 passages, confidence cut-off 0.3). Datasets and models are pinned. Results in evaluation/results.json, per question in evaluation/per_question_scifact.csv. Metric checks in tests/test_retrieval_metrics.py.
Splitting on spaces kept punctuation on words, so "cancer." did not match "cancer". On SciFact this raises BM25 alone from nDCG@10 0.560 to 0.652. The full hybrid + reranker pipeline moves from 0.694 to 0.696 (no measurable change). Results re-run with the fix.
…rections - evaluation/compare.py: paired bootstrap interval between two set-ups or two runs. - evaluation/bm25_tokens_check.py: BM25 with the old and new word splitting on another BEIR dataset. On FiQA (not used to choose the fix): nDCG@10 0.159 -> 0.217, Hit@3 23.0% -> 30.9%. - requirements-eval.txt: pandas and pyarrow for the measurement. - README: the 10-result pipeline row is labelled as such; the default call's cost of the cut-off in full (17 claims, 156 with fewer than 3 passages); claims, not questions; whole abstracts, not the app's passages; history is the last 6 messages; tables split every 50 rows; FAISS needs faiss-cpu; first start downloads two models.
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.
What changes
evaluation/retrieval_eval.pyruns the app's own search engine on BEIR SciFact (5,183 abstracts, 300 test claims). It compares vector search, BM25, vector + reranker, the full hybrid + reranker pipeline, and the app's default call. Datasets and models are pinned.evaluation/compare.py: paired 95% bootstrap intervals.evaluation/bm25_tokens_check.py: compares the old and new tokenizer on any BEIR set.Checks
requirements-dev.txtonly: 32 pass and 1 is skipped (the BM25 test needs the full requirements).evaluation/results.jsonand the per-question CSV.