Skip to content

IFEval scorer: score unverifiable instructions as not followed - #314

Merged
abhishekraok merged 3 commits into
mainfrom
fix/ifeval-scorer-verifier-errors
Aug 31, 2026
Merged

abhishekraok merged 3 commits into
mainfrom
fix/ifeval-scorer-verifier-errors

Conversation

@abhishekraok

@abhishekraok abhishekraok commented Aug 23, 2026 •

Copy link
Copy Markdown
Collaborator

IFEvalScorer.score raised on any instruction whose verifier couldn't be built, killing the whole eval. oe-eval scores such an instruction False with a warning; this matches that, and records the reason in output.metadata["ifeval"]["errors"].

Concrete trigger (reported by the cross-architecture SFT eval session at ifeval_mt_wildchat_unused_withRewrite): exactly one row in VGraf/ifeval_mt (1 of 1774 instructions) passes {'keyword': 'schedule', 'num_paragraphs': 3} where length_constraints:nth_paragraph_first_word accepts only (num_paragraphs, nth_paragraph, first_word) — verified against both the installed ifbench package and the allenai/IFBench repo, so it's a dataset schema mismatch (keyword ≈ first_word), worth fixing upstream separately. The mt-ood slice (1,387 instructions) is clean; ifeval_ood couldn't be audited (dataset 403).

Not chosen: silently dropping unknown kwargs — for this verifier a missing first_word triggers a random word draw (the #296 nondeterminism class), scoring the row against arbitrary criteria. Parity with oe-eval means deterministic False.

Scope of the guard

Only _build_instruction is guarded, and only for TypeError (kwargs the verifier rejects) and KeyError (an id absent from the registry — also silently scoring False before). Both are dataset problems and both stay False.

Failures raised while checking an instruction that built successfully propagate, per @chatgpt-codex-connector's review. Six ifbench verifiers call NLTK from check_following, and instructions_util downloads its corpora at import with quiet=True — so an offline worker imports cleanly and then raises LookupError on every affected instance. Scoring that False would depress the metric with no failed run to investigate.

15 ifbench tests pass (unknown-id scores False; a check-time LookupError surfaces); full suite 1960 passed, ruff/ty clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ

A verifier that cannot be built or checked (e.g. dataset kwargs it does
not accept) previously raised out of IFEvalScorer.score and failed the
whole run. Score that instruction False and record the error in
output.metadata instead, matching the reference implementation's
behavior. Concrete trigger: one VGraf/ifeval_mt row passes
{'keyword': ...} where length_constraints:nth_paragraph_first_word
expects first_word.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B9VUctQuzfAtrdpk4wDjEx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fa06f4113f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/olmo_eval/common/scorers/ifeval.py Resolved
Catching every exception around both building and checking meant an
environment fault was recorded as an instruction the response did not
follow. Six ifbench verifiers call NLTK from check_following, and
instructions_util downloads its corpora at import with quiet=True, so an
offline worker imports cleanly and then raises LookupError per instance —
silently depressing the metric with no failed run to investigate.

Only the build step is now guarded, and only for the exceptions a bad
dataset row produces: TypeError from kwargs the verifier does not accept,
KeyError from an id absent from the registry. Both still score as not
followed, matching the reference implementation. Anything raised while
checking a built instruction surfaces.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ
@abhishekraok

Copy link
Copy Markdown
Collaborator Author

Upstream data defect this PR guards against is now tracked as #325 — VGraf/ifeval_mt row 439 (key=894000) supplies keyword where the verifier wants first_word, and has nth_paragraph unset so its prompt reads "The None-th paragraph", making the constraint unsatisfiable as written. 1 of 1,774 rows; the ood config is clean. Fixing it upstream doesn't remove the need for this PR's guard, but it's worth fixing at the source.

🤖 Generated with Claude Code

@abhishekraok
abhishekraok merged commit c03ebfa into main Aug 31, 2026
10 checks passed
@abhishekraok
abhishekraok deleted the fix/ifeval-scorer-verifier-errors branch August 31, 2026 20:59
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.

1 participant