fix(v1): prefer Final Judgment over draft boxed answers in parse_judge_choice - #2256
Open
crazywriter1 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c404576. Configure here.
crazywriter1
force-pushed
the
fix/v1-parse-judge-choice-utils-score
branch
from
August 5, 2026 12:57
c404576 to
08bc1a8
Compare
…e_choice
Search the full reply for verdict markers before unwrapping \boxed{...}, and fall back to boxed/last-match when a marker has no choice after it.
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.

Supersedes #2008 — same fix, rebased onto current
mainafter #2204 moved scoring helpers toverifiers/v1/utils/score.py.Summary
parse_judge_choicepreviously unwrapped the last\boxed{...}before looking for verdict markers, so a draft box could wipe a laterFinal Judgment/Final Answerline and return the wrong choice.None.Risk
Low. Only flips scores when a reply has both a draft
\boxed{...}and a later explicit verdict line (or an empty marker that previously failed). Default yes/no-only reference prompts are mostly unaffected.Test plan
Draft: \boxed{A}+Final Judgment: B→BFinal Judgment:(empty) + earlier\boxed{A}→A<think>casesNote
Low Risk
Scoring-only change in judge reply parsing; may flip grades when replies mix draft boxes and later verdict lines, with no auth or runtime impact.
Overview
parse_judge_choiceno longer replaces the post-</think>text with a strict\boxed{...}extract before hunting verdict lines, so a draft box cannot override a later explicit verdict.Parsing order is now: scan the full reply for
FINAL JUDGMENT/FINAL ANSWER/FINAL VERDICT(then bareJUDGMENT/VERDICT/ANSWER), last marker wins, and the A/B/C (or custom) choice must sit on that marker’s line via new_choice_on_marker_line. If no marker yields a choice (e.g. emptyFinal Judgment:), it falls back to strict boxed content when present, else the last choice token in the text.Also drops the
noqa: BLE001on the broad except inverify_boxed_math_answer(behavior unchanged).Reviewed by Cursor Bugbot for commit 08bc1a8. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix
parse_judge_choiceto prefer Final Judgment markers over draft boxed answers_choice_on_marker_linehelper in score.py that restricts choice detection to the same line as a verdict marker, preventing later lines from being matched incorrectly.parse_judge_choiceto prefer the last "Final" verdict marker over bare markers, and defers boxed-answer extraction until after marker-based matching so earlier boxed content cannot shadow a later verdict line.Macroscope summarized 08bc1a8.