What it says

AutoRefine calibrates an LLM code judge from labels the development workflow already emits (tests pass or fail, changes land or are abandoned) instead of from hand-labeled datasets. An iterative optimizer rewrites the judge’s prompt against agreement with outcomes, scored by Scott’s chance-corrected pi, while an informed teacher curates the training labels: it explains every kept label, corrects rare contradictions, and abstains when the outcome cannot be explained from the judge’s exact view. Under trustworthy execution-oracle labels, calibration raised the rubric judge from pi 0.36 to 0.60, beyond what threshold tuning achieves; when the judge’s view lacks the evidence for a failure (hidden tests), the teacher abstains on most failures and no passes, flagging that the judge needs better inputs, not a better prompt. On a deployed performance-optimization agent, recalibration after the agent evolved raised pi from 0.16 to 0.51 on an independent held-out test, while the old judge stayed ahead on legacy diffs.

Claims drawn from this source

  • Judge calibration is a life-cycle task: it must run unattended and rerun whenever the agent or its workflow changes. Calibrating against manually labeled datasets is resource intensive and the labels go stale whenever the agent, the model or the code distribution moves, so in practice many judge prompts are never validated at all.
  • Workflow outcome labels are noisy and teach the judge to predict noise when the outcome is decided by information the judge never sees. Outcome labels can mislead a judge in two ways: the outcome may be decided by information the judge never sees, such as a hidden test, or by something other than the code, such as scope, process or a broken pipeline.
  • The calibration loop rewrites the judge prompt iteratively, scored by chance-corrected agreement, with disagreement analysis driving balanced edits. Each iteration runs the current prompt on the training split and scores verdicts with Scott’s pi; for every disagreement an LLM reads the verdict and reasoning next to the label and proposes balanced edits (every new reason to fail paired with a reason to pass); a separate uncurated validation split selects the final prompt; the loop stops at a target agreement, when no disagreements remain, or at a maximum of five iterations.
  • The informed teacher explains kept labels and abstains when the outcome cannot be explained from the judge’s exact view. The teacher sees exactly the judge’s view x plus the outcome y; it writes a justification grounded in x, may correct the label in either direction (rare: 2 of 512 merge/abandon diffs), and returns skip when y cannot be explained from x. Abstained samples are dropped from calibration and from disagreement analysis, and the teacher prefers abstaining to a low-confidence flip.
  • Calibration gains are not explained by threshold tuning, and are reported with paired intervals, not point estimates. On the execution-oracle benchmark, the rubric judge rose from pi 0.36 to 0.60 (0.50 to 0.64 failure recall, 0.89 to 0.95 pass recall); at the training-chosen threshold the uncalibrated prompt reached similar failure recall only by flagging four times as many good patches (pi 0.33), and even the best threshold picked on the test set gave only 0.42. Paired bootstrap gains of +0.27 to +0.30 with McNemar p⇐0.013 in every replay.
  • Without reference-patch evidence, failures are invisible to the judge, the teacher and human engineers alike. On the reference-free setting, the teacher retrospectively abstained on 12 of 13 hidden-test failures and none of the 72 passes; engineers blind to outcome and teacher missed nearly all failures (23 and 22 of 25, and 10 of 11 kept ones), calling 54% of failure ratings correct and 36% undecidable.
  • Abstaining filters injected label noise without dropping genuine good diffs. With 25% of labels flipped at random on a 185-diff calibration set, the teacher set aside 13 of the 24 landed diffs relabeled abandoned but only 16 of the 73 genuinely abandoned ones (Fisher p=0.004), cutting noise from 24.9% to 20.4%; dropping the same number of labels at random left noise at 24.9%.
  • Recalibration raises recall on the current workflow but loses to the old judge on legacy diffs, so recalibration must track evolution. The performance-optimization agent’s judge (v1) had been tuned on earlier workflow diffs; recalibrating to v2 on 125 training diffs (19 abstained by the teacher) raised pi from 0.16 to 0.51 on 17 independently held-out diffs and landed-recall from 6/8 to 8/8, while on 16 older diffs the v1 judge stayed ahead.