arXiv:2611.09291cs.AINov 2026

Manuscript Offprint

arXiv:2611.09291

AutoRefine: Auto-Calibrating Code Judges from Workflow Outcomes

Shervin Shahidi, James Poon, Hang Xie, Kenneth O. Xu, Robin Håkanson, Vikram Nair, Jens Pillgram-Larsen, Nachiappan Nagappan

Shervin Shahidi*

Meta Platforms

shervin@meta.com

James Poon*

Meta Platforms

jypoon@meta.com

Hang Xie

Meta Platforms

hangxie@meta.com

Kenneth O. Xu

Meta Platforms

kennethoxu@meta.com

Robin Håkanson

Meta Platforms

matshakanson@meta.com

Vikram Nair

Meta Platforms

vikramnair@meta.com

Jens Pillgram-Larsen

Meta Platforms

jenspl@meta.com

Nachiappan Nagappan

Meta Platforms

nnachi@meta.com

Abstract—LLM judges increasingly serve as quality gates for code changes that have no test oracle, but a judge prompt must be calibrated for its task and recalibrated as the system it judges evolves, while hand labels for the calibration are resource intensive and go stale. Development workflows emit outcome labels for free (tests pass or fail, changes land or are abandoned), but these labels are noisy. We present AutoRefine, a loop that rewrites a deployable judge's prompt to reproduce outcome labels, with an informed teacher that sees the judge's input plus the outcome, explains each label it keeps, and abstains when the outcome cannot be explained from what the judge sees. On a held-out dataset with an execution oracle, calibration raised chance-corrected agreement (Scott's π\pi) from 0.36 to 0.60. On a deployed agent's outcome labels, with 25% flipped at random to introduce noise, the teacher set aside flipped FAIL labels at more than twice the rate of genuine ones, cutting overall label noise from 25% to 20%. Recalibrating that agent's judge using AutoRefine raised its agreement with merge/abandon outcomes on 17 independently held-out diffs from the current workflow (π\pi 0.16 to 0.51); on 16 diffs from older workflows, the previous judge stayed ahead, illustrating the need for recalibration as the agent evolves. By abstaining, the teacher not only removes noisy labels but also flags changes whose outcome the judge's input cannot explain, telling a team when a judge needs better inputs rather than a better prompt.

I. INTRODUCTION

Coding agents now author code changes (diffs) at scale, and most of what they produce is not verifiable by a test: refactors, performance optimizations, cleanups and open-ended fixes. In an agent's pipeline, an LLM judge [1] is an increasingly common quality-assurance step for such changes: it helps decide which diffs reach human reviewers. A judge, however, is only as good as its calibration (fitting the prompt to labels) for the task at hand: even strong judges are unreliable on objective correctness [2], and agreement with humans varies so much across evaluation tasks that no judge is a drop-in replacement [3]. 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. Keeping a judge

trustworthy is therefore a life-cycle task: calibration must run unattended and be rerun whenever the agent it judges evolves.

The development workflow already emits labels continuously: tests pass or fail, and changes land or are abandoned. We expect merge and abandon outcomes to be most informative when the judge evaluates an automated system that produces changes, and our use case is consistent with this (Sec. IV-B). Outcome labels can still 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. A judge fitted to these labels learns to predict noise.

We present AutoRefine, a loop that rewrites a deployable judge's prompt to reproduce outcome labels, together with an informed teacher that curates those labels before the loop sees them. The teacher reads exactly what the judge will read plus the outcome. It explains each label it keeps, and when the outcome cannot be explained from the judge's view it abstains, removing the sample instead of inventing a label. Its abstention rate doubles as a monitoring signal: when the teacher abstains on many samples, the judge needs better inputs, not a better prompt. We contribute:

  • The loop and the abstaining, explaining teacher (Sec. II), used as a quality-assurance component on an internal agent-evaluation platform.

  • Calibration under trustworthy labels (Sec. III): on an execution oracle, calibration significantly improves a rubric judge beyond what threshold tuning achieves.

  • Reducing label noise by abstention, and keeping a workflow's judge current (Sec. IV): in a controlled noise test and on a performance-optimization agent's merge/abandon labels, plus the recalibration of that agent's judge after the agent evolved.