Skip to content

Let rejudge show the new judge a result's trace evidence - #179

Merged
kelkalot merged 1 commit into
devfrom
feat/rejudge-trace-evidence
Dec 2, 2026
Merged

kelkalot merged 1 commit into
devfrom
feat/rejudge-trace-evidence

Conversation

@kelkalot

Copy link
Copy Markdown
Collaborator

Why

rejudge grades each saved result on its transcript alone. When the target was traced, the first judge also read the trace (tool calls, retrieved documents), so a second judge grades the same answers on less evidence. SimpleAudit Studio does not offer rejudge for traced runs for that reason, and a user ran into it (SimulaMet/SimpleAuditStudio#114).

What changes

  • rejudge and rejudge_async take evidence=, one entry per result, in order. An entry is a list of spans, the dict an evidence_resolver returns (selected_spans, agentic_evaluation, agentic_guidance), or None to grade that result on its transcript alone.
  • The entry goes to ModelAuditor._judge_conversation_async, the judge call a live run makes, which already takes all three. Spans get the same select_spans budget and summarize_for_judge rendering as in a live run.
  • A list whose length differs from the number of results raises ValueError before any judge call.
  • Without evidence= nothing changes. tests/snapshots/core/rejudge_reframing.json is untouched.

Design notes

  • Entries are positional, not keyed by scenario name. A repeated scenario has several results with one name, and Studio rejudges those in one call.
  • rejudge does not read judgment["evidence_spans"] on its own. audit_with_tracing saves those spans after the run, and its judge saw them only if the caller also passed an evidence_resolver. Reading them by default would change what rejudge does on existing files. The README shows the one line that passes them.

Not in this PR

  • A rejudged result does not store the evidence it was graded with. The caller has it.
  • reframing_check and the other stored-transcript checks still grade on the transcript alone.
  • No version bump. Studio needs a release that contains this before it can use it.

Checks

  • pytest -p no:randomly -n auto: 3932 passed, 14 skipped, on Python 3.12 with the dev and tracing extras. The skips are tests that need inspect_ai, openenv, matplotlib, numpy, an Anthropic key or a cached data file, none of which I had locally. CI installs the extras.
  • ruff check --select E9,F821 . passes.
  • Four new tests in tests/test_rejudge.py: per-result spans reach the judge prompt, the dict form, stored spans are ignored unless passed, and the length check.

Developed with Claude Code 2.0.57 (model: Claude Fable 5.2).

🤖 Generated with Claude Code

rejudge graded every saved result on its transcript alone, also when the
first judge had read the target's trace. A second judge then graded the
same answers on less evidence, and SimpleAudit Studio does not offer
rejudge for traced runs for that reason.

rejudge and rejudge_async take evidence=, one entry per result in order:
a list of spans, the dict an evidence_resolver returns (selected_spans,
agentic_evaluation, agentic_guidance), or None. The entry goes to the
judge call a live run makes, which already takes all three. Entries are
positional because a repeated scenario has several results with one
name.

Spans stored on a result are not read unless the caller passes them:
audit_with_tracing saves spans its judge may never have seen, so reading
them by default would change what rejudge does on existing files.
Without evidence= nothing changes.
@kelkalot
kelkalot merged commit b1cdb9b into dev Dec 2, 2026
8 checks passed
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