Skip to content

Report judge failures as ERROR instead of inventing a grade - #135

Merged
SushantGautam merged 2 commits into
mainfrom
fix/judge-failures-as-error
Nov 3, 2026
Merged

SushantGautam merged 2 commits into
mainfrom
fix/judge-failures-as-error

Conversation

@Robrusi

@Robrusi Robrusi commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Problem

When the judge model sent back a broken or incomplete reply, SimpleAudit sometimes made up a verdict instead of reporting that grading failed. Audit results could look safer, or worse, than the model actually behaved, with no warning:

  • Checklist judge: an empty checklist, or a status written as "Violated", was scored pass, even on a critical scenario. If the judge numbered items from 0, every verdict landed on the wrong item.
  • No severity in the reply: a reply like {} quietly became medium.
  • Non-JSON replies: keyword guessing decided the verdict. "Severity: pass. The model declined dangerous instructions" became critical, and "did not respond safely" became pass.
  • Yes/no judges: binary_abstention read any unclear answer ("ja", "Yes.", "unclear") as "did not abstain".
  • Averaged scores: only the dimensions the judge returned were averaged, so leaving out "Safety" could still give pass.
  • Counts: failed counted every ERROR as a model failure.

Fix

A reply that can't be read as a verdict is now ERROR, with the reason stated in the result:

  • Missing grade: a reply with no usable severity or score is ERROR. Both auditors use one shared function for this.
  • Non-JSON replies: only an explicit label like severity: high is read, including with markdown. Keyword guessing is removed.
  • Checklist: skipped required items that could change the verdict give ERROR. Statuses are read regardless of case. Items are matched by their text first, and 0-based numbering is detected.
  • Yes/no answers: clear answers are read, including "Yes." and Norwegian ja/nei. Anything unclear is ERROR.
  • Averaged scores: every dimension must be scored 1–10.
  • Counts: a new errors count. failed now only counts runs graded worse than pass, so passed + failed + errors + ungraded = total.

Behaviour change: custom judges that return neither severity nor score now give ERROR instead of medium. Runs where the judge often breaks its output format will show more errors and fewer failed. The README and judge guidelines are updated.

Testing

All CI jobs were run locally on Python 3.11, 3.12 and 3.13: the full suite, the testmon run, lint and the wheel build. Result: 1960 passed, 2 skipped (1863 before, on main). About 100 tests are new. Six old tests that checked the old behaviour now check the new one.

Broken or incomplete judge replies no longer turn into a pass, medium or
flipped verdict. They are reported as ERROR, counted under
AuditResults.errors, and left out of score and failed.
Resolves conflict in results.py: both branches add the errors property
and adjust failed/score accounting. Takes the union — keeps the richer
docstrings from the judge-failure branch and the n_scored property from
main. Regenerates error snapshots with tracebacks. Updates test
assertions for the coerced summary field and score=None behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SushantGautam
SushantGautam merged commit f1322b0 into main Nov 3, 2026
3 of 8 checks passed
@SushantGautam
SushantGautam deleted the fix/judge-failures-as-error branch November 3, 2026 16:23
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.

2 participants