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
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 ) 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 \textsc{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 ( 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.
Create a lesson
Related papers
Does a Frontier Large Language Model Know What It Can Solve? A 100-Conjecture Calibration Study
Shared title terminology · Ayush Khaitan, Liam Fowl, Tomàs Ortega et al.
Can Your AI Twin Meet People for You? It Can Hold a Conversation. But What Does It Need to Judge Like You?
Shared title terminology · Wanghao Ye, Sihan Chen, Bowei Tian et al.
ESM-Bench: A Benchmark for Evaluating Whether AI Agents Understand Earth System Model Physics and Code
Shared title terminology · Koutian Wu, Yuxuan Cao, Gengchen Mai et al.
Trained on Harm, Still Refusing: A Training-Time Defense for Code Generation
Shared title terminology · Miaoqing Tian, Ruohan Li, Qian Lu et al.
Let the Fixer Decide: Training a Code Localizer from the Fixer's Likelihood
Shared title terminology · Khalil Hennara, Muhammad Hreden, Zeina Aldallal et al.
Toward Sustainable Agentic AI: Carbon Tradeoffs Across Iterative Self-Refinement and Tool-Augmented Coding
Shared title terminology · Boris Ruf, Adrien de Mailly Nesle, Marcin Detyniecki