Repository navigation
feat(rubrics_verifier): grade long rubrics in judge batches and retry bulk verdicts - #274
Merged
Merged
Conversation
… bulk verdicts judge_batch_size splits the criteria into batches, each graded by its own judge call (judge_batch_concurrency at once, default 4), and merges the rows. With it set, a batch whose rows share one justification or are mostly very short is retried with a correction, then kept and flagged in judge_output_discrepancies. A single judge facing hundreds of criteria was grepping for keywords and defaulting the rest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…carded judges - judge_batch_concurrency is read from user_overrides like judge_batch_size, and both take an override when present, so an invalid one is reported instead of falling back to the stored value. - Only rubric_binary and rubric_partial batch: trajectory_mistakes adds whole-run rows that each batch would repeat. - A batch cancelled because a sibling failed cancels its remote A2A task. - The bulk-verdict log line and stored entry keep a bounded excerpt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
psinghal20
approved these changes
Oct 21, 2026
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
When one agent judge gets a rubric with hundreds of criteria, it stops grading them one by one. In a real run with 419 criteria, the judge grepped the trajectory for a handful of keywords, wrote a script that hard-coded a short list of failing ids, and gave every other row the same one-word justification. Ten runs on the same task returned pass counts anywhere from 75 to 370 of 419, so the score carried no signal.
What
rubrics_verifiergets two optional fields. Likejudge_effort, both are also read fromuser_overrides:judge_batch_size: splits the criteria into batches of N. Each batch gets its own judge call with the same prompt, trajectory and env access, and the rows are merged back in criterion order. The judge still sees the short keysc1..cN, so ids come back as before. A failure in any batch fails the step with that batch's error, as the unbatched judge would.judge_batch_concurrency: how many batches run at once (default 4). Every A2A call is already a fresh judge session (context_id=None), so batches can share the judge's sandbox.With
judge_batch_sizeset, each prompt also says to grade every row on its own evidence and cite it. A batch whose rows read as bulk verdicts gets a correction prompt and is retried within the existing retry budget. Bulk verdicts means at least 25% of rows (and at least 5) share one justification, or at least half the justifications are under 20 characters. If the last attempt is still bulk, the rows are kept and the batch is logged injudge_output_discrepancieswithaccepted: true, so the verify doesn't fail on it. A batched entry also recordsjudge_batchesandjudge_batch_trajectory_object_urls.Without
judge_batch_size, the step behaves exactly as before: one call, no bulk check, and the same error types.rubric_evidence*formats reject batching, because their single reasoning/checks/mistakes block would be split across batches.Testing
tst/unit/task_step/verifiers/test_rubrics_verifier_judge_batches.py(16 tests): batches merge in order; the batch size can come fromuser_overrides; there's no bulk check without batching; the concurrency cap holds; bulk verdicts are retried with a correction, then kept and flagged on the last attempt; a failing batch raises its own error; options round-trip and validate; batch size and concurrency come fromuser_overridesand an invalid override raises; formats with whole-run rows reject batching; a cancelled batch cancels its remote judge task.tst/unit/task_step/verifiers: 363 pass. Fulltst/unit: 8728 pass. The 2 failures intest_mcp_cli_builder.pyfail the same way on cleanmain.End to end: I re-graded one real 419-criterion run with an agent judge that has read-only env access, at
effort=high, three ways: as one judge call (two runs), and withjudge_batch_size=30(concurrency 4).The batched rows came back in criterion order with the real ids, and they agree with each single-call run on 407 of 419 rows (the two single-call runs agree with each other on 409). For comparison, the same run graded today at
effort=lowin one call made 6 tool calls and gave 339 rows the justification "Addressed." Replaying that output through the bulk check in batches of 30 flags all 14 batches. The same replay over the two single-calleffort=highoutputs flags 0/14 and 2/14; the two flagged batches were mostly terse "Not recorded." fails, so they would be retried and then kept.Docs: the site's
rubrics_verifierreference should listjudge_batch_sizeandjudge_batch_concurrency.🤖 Generated with Claude Code