Repository navigation
Let rejudge show the new judge a result's trace evidence - #179
Merged
Merged
Conversation
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.
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.
Why
rejudgegrades 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
rejudgeandrejudge_asynctakeevidence=, one entry per result, in order. An entry is a list of spans, the dict anevidence_resolverreturns (selected_spans,agentic_evaluation,agentic_guidance), orNoneto grade that result on its transcript alone.ModelAuditor._judge_conversation_async, the judge call a live run makes, which already takes all three. Spans get the sameselect_spansbudget andsummarize_for_judgerendering as in a live run.ValueErrorbefore any judge call.evidence=nothing changes.tests/snapshots/core/rejudge_reframing.jsonis untouched.Design notes
rejudgedoes not readjudgment["evidence_spans"]on its own.audit_with_tracingsaves those spans after the run, and its judge saw them only if the caller also passed anevidence_resolver. Reading them by default would change whatrejudgedoes on existing files. The README shows the one line that passes them.Not in this PR
reframing_checkand the other stored-transcript checks still grade on the transcript alone.Checks
pytest -p no:randomly -n auto: 3932 passed, 14 skipped, on Python 3.12 with thedevandtracingextras. The skips are tests that needinspect_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.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