fix: grade decorated Answer markers instead of falling through to prose - #6
Open
Mr-Neutr0n wants to merge 1 commit into
Open
fix: grade decorated Answer markers instead of falling through to prose#6Mr-Neutr0n wants to merge 1 commit into
Mr-Neutr0n wants to merge 1 commit into
Conversation
The Answer-marker regex only allowed whitespace between ANSWER/IS and
the letter, so markdown-bold forms like '**Answer:** C' missed the rule
and the standalone last-occurrence fallback then took letters from later
prose ('Option D was ruled out'), flipping correct answers to wrong.
Allow a short run of non-alphanumeric decoration between the marker and
the letter; verified no new false positives against adversarial cases.
Signed-off-by: Mr-Neutr0n <64578610+Mr-Neutr0n@users.noreply.github.com>
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.
Problem
The MCQ answer-marker regex only allowed whitespace between
ANSWER/ISand the letter:Real model replies decorate the marker, and the most common form in the wild is markdown bold:
**Answer:** C. That fails the marker rule, so grading falls through to the standalone last-occurrence fallback, which happily takes a letter from later prose. Concretely, with gold C:grades as D (wrong). Same for
**Final Answer:** Afollowed by a differential listing (B), (C), etc.Reproduced before/after across a battery of decorated markers (
**Answer:** X,Final Answer — X, fullwidth colonAnswer:X,ANSWER IS :: X): old regex missed every one; new regex catches all.Change
Allow up to six non-alphanumeric characters between the marker words and the letter:
Adversarial negatives verified unchanged:
ANSWERED, digits, out-of-range letters, prose without markers all behave exactly as before. Plain forms (Answer: B,FINAL ANSWER: D,answer is (E)) unchanged. Boxed answers still win.Verification
This change was prepared with AI assistance under human direction and review.