Skip to content

Fix query8 validator rejecting the correct character spelling (apostrophe normalization) - #82

Merged
Ruiying-Ma merged 1 commit into
ucbepic:mainfrom
marc-shade:fix/query8-apostrophe-normalization
Aug 2, 2026
Merged

Ruiying-Ma merged 1 commit into
ucbepic:mainfrom
marc-shade:fix/query8-apostrophe-normalization

Conversation

@marc-shade

Copy link
Copy Markdown
Contributor

Fixes #81.

normalize() turned an apostrophe into a space, so the ground-truth character name "Cockamamie's" Salesgirl normalized to cockamamie s salesgirl, while the check searched for the literal cockamamies salesgirl. The correct spelling could never match, and only a misspelling passed.

This drops apostrophes in normalize() instead of spacing them, so the existing literal becomes reachable. The change is additive: nothing that passed before stops passing.

Before / after

Every other clause held satisfied, varying only the character name:

character name in answer before after
"Cockamamie's" Salesgirl (correct, matches ground truth) fail PASS
“Cockamamie’s” Salesgirl (curly apostrophe) fail PASS
exact ground_truth.csv field text fail PASS
Cockamamies Salesgirl (misspelled) PASS PASS (unchanged)
a different character fail fail

The curly ’ case matters in practice because models frequently emit it rather than '.

Why this shape of fix

The alternative was to normalize the expected literal at the call site, matching how the actress clause already does it (normalize("Aaron, Caroline") not in llm_norm). That also works, but it would start rejecting the no-apostrophe spelling that passes today, which could regress an existing leaderboard submission. Fixing normalize() avoids that.

Found while adding a positive-control test that feeds each validator its own ground truth. 103 of the 104 accept it; this was the only one that did not.

normalize() converted an apostrophe to a space, producing
'cockamamie s salesgirl', while the character check searched for the
literal 'cockamamies salesgirl'. The correctly spelled name therefore
never matched and only a misspelling passed.

Drop apostrophes in normalize() instead. This is additive: the correct
spelling and the curly variant now pass, and the previously passing
no-apostrophe form still passes.

Refs ucbepic#81
@Ruiying-Ma

Copy link
Copy Markdown
Collaborator

Thanks, @marc-shade! We've merged your fix into the validator. Really appreciate it!

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.

query_imdb/query8 validator rejects the correct character spelling and requires a misspelling

2 participants