Skip to content

Use actual gold labels for TruthfulQA MC2 - #1444

Open
salma2vec wants to merge 1 commit into
huggingface:mainfrom
salma2vec:codex/use-truthfulqa-mc2-gold-labels
Open

salma2vec wants to merge 1 commit into
huggingface:mainfrom
salma2vec:codex/use-truthfulqa-mc2-gold-labels

Conversation

@salma2vec

Copy link
Copy Markdown

Fixes #1442.

TruthfulQA MC2 stopped counting gold answers at the first gap in their indexes. With labels [1, 0, 1] and answer probabilities [0.2, 0.3, 0.5], it returned 0.2 instead of 0.7. Reordering the same answers could change the score.

Partition the MC2 log probabilities by the actual gold indexes before calling the existing scoring helper. The helper calculation and MC1 behavior are unchanged.

Eight new tests use the real task adapter. They cover contiguous, gapped, false-first and single-nonleading-gold labels, including permutations of the same answers and both MC1 outcomes. Six fail on main; all eight pass with this change.

Tests: the new tests plus base metrics and normalization tests: 19 passed, 3 skipped, 2 deselected. The skips are existing placeholders. The two deselected dynamic metric tests require the optional multilingual extra, which is not installed locally. Repository-wide make quality and changed-file pre-commit checks pass. This fixes order dependence for valid labeled inputs; no change in a full benchmark score was measured.

Codex assisted with the fix, regression tests and review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] TruthfulQA MC2 drops true answers after a gap in gold indexes

1 participant