Skip to content

Fix AIME answer extraction before sentence-ending periods - #31

Open
zhachar14h-cell wants to merge 1 commit into
deepseek-ai:mainfrom
zhachar14h-cell:fix/aime-answer-trailing-period
Open

zhachar14h-cell wants to merge 1 commit into
deepseek-ai:mainfrom
zhachar14h-cell:fix/aime-answer-trailing-period

Conversation

@zhachar14h-cell

Copy link
Copy Markdown

The AIME numeric fallback rejects an integer followed by a sentence-ending
period: The answer is 42. produces (None, "none"), while
The answer is 42 produces ("42", "tail_number"). This causes false
negatives with --judge rule and incorrect rule-based extraction diagnostics.
The default LLM judge makes its own correctness decision.

Allow a trailing period unless it is followed by a digit. Preserve the
existing rejection of decimal fragments, numbers longer than three digits,
and word-embedded digits, as well as the priority of boxed answers.

Add 17 CPU-only regression cases covering extraction and rule scoring.
They are marked for both GPU and NPU core test selections.

Validation on Windows with Python 3.13.12, pytest 8.4.2, and Ruff 0.15.0:

  • Before the fix: 6 failed, 11 passed.
  • After the fix: python -m pytest -q tests/eval/test_aime.py — 17 passed.
  • ruff check --no-cache — passed across the repository.
  • ruff format --check --no-cache — all 271 Python files already formatted.
  • git diff --check — passed.

The full Linux/GPU/NPU inference suite and Python 3.12 were not exercised.

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