Repository navigation
Fix IFEval bullet, palindrome and first-word checks - #2295
Draft
omar-abdel-aziz wants to merge 3 commits into
Draft
omar-abdel-aziz wants to merge 3 commits into
omar-abdel-aziz wants to merge 3 commits into
Conversation
added 3 commits
November 20, 2026 01:27
… palindromes, ignore markup around the first word
Contributor
Documentation Changes Detected📄
|
This branch has not been deployed
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.
Drafted by Claude Code and reviewed by Omar.
What changes
Three instruction checks in
open_instruct/IFEvalG/instructions.py(shared by the NVIDIA-constraint sources and the Dolci IF route) read answers differently from the prompt. This fixes them:BulletListChecker). A bullet is*or-followed by a space and text. Horizontal rules (---) and*italic*lines no longer count, so "exactly 3 bullet points" isn't failed by a divider line.PalindromeBasicChecker). A palindrome needs at least 3 letters; words are split on punctuation (but hyphenated words stay whole), and phrase palindromes inside a sentence or quote are found ("A man, a plan, a canal: Panama!"). A single letter ("a", "I") no longer satisfies the rule.FirstWordSentChecker,FirstWordAnswerChecker,ParagraphFirstWordCheck). Leading/trailing punctuation and Markdown around the word are ignored, so**Hello**or"Hello"counts as "Hello".No other instruction type changes.
docs/miles/dataset-verifiers.mdanddocs/miles/data-and-evaluation.mddescribe the new bullet, palindrome and first-word behaviour. The palindrome and first-word helpers live inopen_instruct/IFEvalG/instructions_util.py.Background
On most of these sources one failed rule zeroes the whole answer, so a miscounted divider line wipes out an otherwise correct response, and a rule that is passed for free (a one-letter palindrome) teaches nothing.
How this was measured
olmo35-sft-hero-c12-b1-2ep-final-step67265, temperature 1.0, 8 answers per question). All instruction-following rows: C016, C021, the instruction rows of C044, and D12: 22,869 questions, 182,952 answers (1,900 hit the length limit and score 0 either way).nvidia_constraints.instruction_contracton the final answer; D12: theIFEvalVerifiersteps), once onmain(28c1816) and once on this branch, in separate processes (each logging which checkout it imported); then compared per answer and per instruction. No new model outputs.mainat 28c1816; this branch is rebased ontomain27f8681, whose newer commits don't touch these files.Evidence
*It is important...with no space after the marker, which the model clearly meant as bullets. This PR follows the prompt's own example (* This is point 1) and doesn't count them; a lenient rule that does would lose 322 answers instead of 395. That ruling is open for review.ПА MAN A PLAN…) or used as the first half of a hyphenated word (racecar-level).Not in this PR (need a decision):
Tests
pyteston the five IFEval test files: 403 passed (76 new cases in both directions).ruff format,ruff checkclean.