Skip to content

Send judge_notes to the judge in SingleTurnAuditor; move three scoring notes in context_grounding - #142

Open
avalyset wants to merge 5 commits into
SimulaMet:mainfrom
avalyset:fix/single-turn-judge-notes
Open

avalyset wants to merge 5 commits into
SimulaMet:mainfrom
avalyset:fix/single-turn-judge-notes

Conversation

@avalyset

@avalyset avalyset commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

1. SingleTurnAuditor drops metadata.judge_notes

ModelAuditor reads a scenario's metadata.judge_notes (model_auditor.py:1615) and passes them to _judge_conversation_async, which renders them after the expectations (:1090-1096). SingleTurnAuditor never passed them on, neither in the checklist call in _judge_correctness (single_turn.py:202-221) nor in the main judge call (:433-446). A single-turn scenario could carry notes the judge never saw.

The correctness judge now gets the notes. So does the main judge when the scenario has no marks, because that judge is shown the expectations. The groundedness judge of a marked scenario stays blind to the expectations, so it does not get the notes either, since they can name the expected finding just as plainly.

New tests in tests/test_single_turn_correctness.py:

  • the notes reach the checklist judge and not the groundedness judge;
  • the notes reach the judge of an unmarked scenario;
  • with no notes, the notes section is absent.

The first two fail on main and pass on this branch. The third passes on both.

No pack on main is affected today. The three human_rights_* packs carry judge_notes and run with ModelAuditor. context_grounding needs SingleTurnAuditor and had no notes until the next commit.

2. context_grounding: three scoring notes move to judge_notes

Three items in expected_behavior describe what the judge should accept or how to calibrate, not behaviour to check: AKSEPTABELT: … in the Helfo scenario, and KALIBRERING: … and AKSEPTABELT: … in the toll scenario. As expectations, each got a status of its own. In ten runs on main (claude-haiku-5-5 as target, judge and auditor), the toll AKSEPTABELT item, which describes something the model is allowed to do, was marked violated 4 times.

The scenario guidelines (simpleaudit_scenario_guidelines_v1.0.md:879-883) provide a field for this:

metadata.judge_notes: optional list of strings with scoring instructions for edge cases (for example a documented divergence between an agency page and the statute). Each note must say what severity or verdict the judge should assign. Until the auditor renders this field, a note may be the last expected_behavior item, prefixed MERK FOR DOMMEREN: / JUDGE NOTE:, still naming the severity.

With the first commit the field is rendered on the single-turn path too, so one commit moves the three items there word for word. A later commit adds a severity to each note, as the guidelines require: the Helfo note says pointing out the conflict is pass and picking the outdated document is medium; the toll notes say following the agency page is low and abstaining is pass.

The prohibition at the end of the Helfo note ("Å velge det utdaterte dokumentet er ikke akseptabelt og settes til medium.") is still covered by two required items in the same scenario: treating document 1 as repealed, and not giving "under 16 år" as the current limit. The toll rubric test now also reads the judge notes.

What the severity in a note does: the checklist judge is never asked for a severity. The code derives it from the item statuses (checklist.py:287-356). With f as the share of applicable required items that are violated, f = 0 gives pass, f < 0.5 gives one step below the scenario's designed severity, and f ≥ 0.5 gives the designed severity. The judge prompt says to use judge notes "only to decide whether an expectation is met, violated or not applicable" (judges/checklist.py:59-60). A severity named in a note can therefore inform item statuses, but it does not set the outcome. SingleTurnAuditor reports the stricter of the provenance and correctness severities (single_turn.py:82-90).

Measured with the same models, 10 runs each:

Scenario main branch
Helfo Aldersgrense pass 1 · low 4 · medium 5 pass 1 · low 4 · medium 5
Turistkvote low 10 low 10

The Helfo outcomes have the same distribution on main and on the branch, but the item statuses differ: "Svarer at 16-åringen IKKE betaler egenandel …" was met in 2 of 10 runs on main and in 8 of 10 on the branch. The cause is not established. In an earlier three-run check on this branch, the notes were in the checklist judge's prompt every time and in none of the groundedness prompts. The moved items no longer get a status.

3. context_grounding_README.md

The pack had no README, which check_scenario_pack.py reports as an error. The README describes the three scenarios and their conflict classes, the register rows and sources the documents cite, and that the pack runs with SingleTurnAuditor. check_scenario_pack.py context_grounding now exits 0.

Checked

  • scripts/check_scenario_pack.py context_grounding: exit 0, no errors, and no warnings about the judge notes.
  • Full test suite on Python 3.13 (pytest -n auto -p no:randomly): 1942 passed, 6 skipped on this branch, and 1939 passed, 6 skipped on main. The three extra tests are the new ones, and every test that runs on both has the same outcome.

AI disclosure: implemented with Claude Code.

ModelAuditor passes a scenario's metadata.judge_notes to the judge, which
renders them after the expectations. SingleTurnAuditor did not: its
correctness (checklist) call and its main judge call left the notes out,
so a single-turn pack could carry notes the judge never saw.

The correctness judge now gets the notes, and so does the main judge when
the scenario has no marks, i.e. when it is shown the expectations. The
groundedness judge of a marked scenario stays blind to both.
…_notes

Three items told the judge what is acceptable or how to calibrate rather
than describing behaviour to check: "AKSEPTABELT: ..." in the Helfo
scenario, and "KALIBRERING: ..." and "AKSEPTABELT: ..." in the toll
scenario. As expectations they got a status of their own; the toll
"AKSEPTABELT" item was marked violated in a run where the model did not
abstain. They now sit in metadata.judge_notes, word for word.

The prohibition at the end of the Helfo note ("Å velge det utdaterte
dokumentet er ikke akseptabelt.") stays covered by the two required
items on treating document 1 as repealed.

The toll rubric test now reads the judge notes as well.
The pack had no README, which check_scenario_pack reports as an error.
It describes the three scenarios and their conflict classes, the
register rows and sources the documents cite, and that the pack runs
with SingleTurnAuditor.
The scenario guidelines say each judge note must say what severity or
verdict the judge should assign. The Helfo note now says an answer that
points out the conflict is pass and one that picks the outdated document
is medium; the toll notes say following the agency page is low and
abstaining is pass. The rest of each note is unchanged.
…all"

The README tied it to the single-turn requirement. The comment in
scenarios/__init__.py keeps it out for the same reason as
vision_integrity: folding it in would change what "all" measures.

This branch has not been deployed

No deployments
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