Skip to content

Fix IFEval bullet, palindrome and first-word checks - #2295

Draft
omar-abdel-aziz wants to merge 3 commits into
mainfrom
omar/ifeval-format-checks
Draft

omar-abdel-aziz wants to merge 3 commits into
mainfrom
omar/ifeval-format-checks

Conversation

@omar-abdel-aziz

@omar-abdel-aziz omar-abdel-aziz commented Nov 20, 2026 •

Copy link
Copy Markdown

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:

  • Bullet count (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.
  • Palindrome (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.
  • First word (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: docs/miles/dataset-verifiers.md and docs/miles/data-and-evaluation.md describe the new bullet, palindrome and first-word behaviour. The palindrome and first-word helpers live in open_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

  • Data: the Nov 11 reward-history dump: saved answers from the pre-RL SFT model (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).
  • What was run: every answer re-graded twice, constraint by constraint, the way production does it (C sources: nvidia_constraints.instruction_contract on the final answer; D12: the IFEvalVerifier steps), once on main (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.
  • Reading: changed answers were read on the raw text in seeded samples of 20 per check and direction: bullets and first word in an independent review; palindrome after each of the two follow-up changes the review asked for (its reads of the first version found the misses those changes fix); the table shows the final version's reads.
  • Base: measured on main at 28c1816; this branch is rebased onto main 27f8681, whose newer commits don't touch these files.
  • Prepared data: no change to admission screens or prepared targets; only the three checkers' verdicts change.

Evidence

Check Answers that gain credit Answers that lose credit Read by hand: gains Read by hand: losses
Bullet count 1,231 395 20 of 20 right 8 right, 8 wrong, 4 unclear (of 20)
Palindrome 120 282 19 right, 1 unclear (of 20) 19 right, 1 wrong (of 20); plus 10 of the 51 hyphen-rule losses: 7 right, 2 unclear, 1 wrong
First word 500 0 20 of 20 right (none)
  • Per-check changes sum to 2,538 (1.4% of 182,952 answers). 0 changes in any other instruction type; 0 checker errors.
  • The 8 "wrong" bullet losses are lines like *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.
  • Known palindrome misses: a palindrome glued to other letters (ПА MAN A PLAN…) or used as the first half of a hyphenated word (racecar-level).
  • A scan of all 54 instruction types found no other check with a larger effect.

Not in this PR (need a decision):

  • Keyword rules match substrings today ("include the word cat" is satisfied by "scattered"). Whole word with plurals: +222 / −1,312 answers.
  • 1,161 prompts say "at least N bullet points" but the label holds only N and the check requires exactly N (2,346 answers fail only for having more bullets).

Tests

pytest on the five IFEval test files: 403 passed (76 new cases in both directions). ruff format, ruff check clean.

@omar-abdel-aziz omar-abdel-aziz changed the title IFEval format checks: don't count rule lines as bullets, require real palindromes, ignore markup around the first word Fix IFEval bullet, palindrome and first-word checks Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Documentation Changes Detected

📄 miles/data-and-evaluation/index.html
--- site-base/miles/data-and-evaluation/index.html	2026-11-20 03:05:33.981728646 +0000
+++ site-pr/miles/data-and-evaluation/index.html	2026-11-20 03:05:27.851892306 +0000
@@ -3090,7 +3090,10 @@
 limits encourage answers with almost no letters. It also rejects missing or
 invalid paragraph counts/indices and first words, including indices beyond the
 declared paragraph count and first words containing whitespace or punctuation
-that the checker truncates (<code>. , ? ! ' "</code>). These rules apply only to training admission and do
+that the paragraph checker truncates (<code>. , ? ! ' "</code>); that checker now also
+accepts a response whose first word is only surrounded by punctuation or
+Markdown, such as <code>**Hello,**</code>, and the first-word answer and sentence checkers
📄 miles/dataset-verifiers/index.html
--- site-base/miles/dataset-verifiers/index.html	2026-11-20 03:05:33.981825572 +0000
+++ site-pr/miles/dataset-verifiers/index.html	2026-11-20 03:05:27.851988070 +0000
@@ -2678,6 +2678,18 @@
 indices now preserve explicit zero and include the end index; admission checks
 that <code>0 &lt;= n_start &lt;= n_end &lt; len(prompt_to_repeat)</code>. Grading must not depend on a
 worker's RNG seed.
+Three native checkers read answers more literally than the instructions say.
+<code>detectable_format:number_bullet_lists</code> counts a line as a bullet only when
+<code>*</code> or <code>-</code> is followed by a space and item text, so horizontal rules (<code>---</code>),
+empty markers and <code>*italic*</code> lines do not count. <code>keywords:palindrome</code> needs

Showing first 10 lines of diff for each changed file (up to 5 files, excluding search indices).

This branch has not been deployed

No deployments
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