fix: BEIR corpus _id and qrels mismatch when use_group_id_in_eval=True - #65
Merged
oliverholworthy merged 2 commits intoAug 18, 2026
Conversation
Signed-off-by: andrewwhitecdw <andrewwhitecdw@users.noreply.github.com>
andrewwhitecdw
requested review from
a team,
oliverholworthy and
shan-nvidia
as code owners
August 17, 2026 20:18
Signed-off-by: Oliver Holworthy <1216955+oliverholworthy@users.noreply.github.com>
oliverholworthy
approved these changes
Aug 18, 2026
oliverholworthy
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for identifying this. I added regression coverage for both evaluation ID modes and centralized qrels on the IDs written to corpus.jsonl. The hash-mode test fails against the previous implementation, while the default sequential mode remains unchanged. This restores the BEIR qrels-to-corpus identity contract.
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
Fix BEIR evaluation output when
use_group_id_in_eval=Trueso qrelscorpus-idvalues match the_idvalues written tocorpus.jsonl.The qrels writer now always uses the document ID mapping established while writing the corpus, keeping ID selection in one place.
Why
Previously, hash-ID mode wrote sequential corpus
_idvalues such asd0, while qrels referenced hash IDs such asd_<hash>. Standard BEIR consumers therefore could not match relevant documents to corpus entries.Behaviour
_idandgroup_id._id.Validation