Repository navigation
fix(answer_length, inconsistent_format): check only what the task's scorers compare - #65
Merged
Merged
Conversation
…corers compare exact and match fold case and ignore punctuation; includes folds case only; pattern compares everything; f1 gives partial credit for length. Reverses the #33 decision that exact beside f1 runs the rules as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MattFisher
enabled auto-merge
October 8, 2026 04:47
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.
Summary
answer_lengthandinconsistent_formatask one question: could this answer's form cost it a point under the task's scorer? Until now any verbatim scorer in the task meant "yes" for every check. inspect_ai's scorers normalise before they compare, so the answer is often "no".exactmatchincludespatternf1Two changes, kept separate in the code and the tests:
inconsistent_formatruns its capitalisation, punctuation and length checks only for an aspect some scorer of the task is thrown by. Underexactalone, only length outliers are checked now, because case and punctuation can't change anexactscore. A scorer someone adds toVERBATIM_SCORERSwithout an entry is assumed to compare everything, as before.f1, a long answer still scores, soanswer_lengthand the length check don't apply. This reverses the decision in Answer rules ignore the task's scorer and choices #33 thatexactbesidef1"measures as before". The case behind it is SQuAD, scored with both: on a sweep of every Inspect Evals eval, these two scanners reported 1,495 findings on SQuAD's span answers and nowhere else. None of them could change a score.A scanner that doesn't apply now says which aspects the task's scorers ignore, for example "…this task scores with inspect_ai/f1, inspect_ai/exact, which do not depend on the answer's length (f1 gives partial credit)". Under a scorer that compares no text, such as a code-execution or
choicescorer, the reason is unchanged.Testing
tests/test_answers.py: what each scorer compares, partial credit besideexact, and the short reason for non-text scorers.tests/test_inconsistent_format.py:exactchecks only length;includeschecks punctuation, not case; length outliers are still flagged underexact;exactwithf1doesn't apply.tests/test_answer_length.pyandtests/test_cli_task_scorers.py:exactwithf1doesn't apply.exact(answer_length) andpattern(inconsistent_format) instead ofexactwithf1.The new tests failed first. Suite: 650 passed, excluding the browser e2e test. basedpyright: 0 errors. pre-commit passes.
🤖 Generated with Claude Code