Can agents learn to predict their own failures: outcome-based confidence calibration for LLM agentsCan an Agent Learn to Predict Its Own Failure? Outcome-Grounded Confidence Calibration in LLM Agents
Using outcome-anchored GRPO to calibrate Qwen2.5-7B: offline WebShop pooled AUROC goes from 0.462 to 0.850.
- A long-horizon agent must decide at each step whether to trust an action, abstain, or hand off to a human, which requires estimating whether the current rollout will ultimately succeed. Existing RL calibration aligns verbal confidence to current-step correctness; the authors argue this does not guarantee predictive power for the final outcome.
- A group of rollouts under GRPO comes with success/failure labels. A proper scoring rule (Brier by default) scores each step's verbal confidence, with format and spread terms added. Offline runs on recorded trajectories; online runs on a live agent. Evaluation separates depth, difficulty, and attempt-level foresight.
- Offline after training across three environments, pooled AUROC of confidence against episode success is higher than untrained, and the success multiplier for the most confident 10% of steps is also higher. Online ALFWorld improves early AUROC and reduces ECE without lowering task success rate. The authors state the gains are in task ordering, not in same-task attempt discrimination.
- The authors leave attempt-level signals on ALFWorld to future work. Positive live results cover two text environments and 7B; 14B corroborates the pooled effect. Live WebShop is inconclusive. Online each arm has a single seed, and there is no pure Brier arm.
- Evaluated models
- Qwen2.5-7B-InstructQwen2.5-14B-Instruct
- Benchmarks
- ALFWorldTextWorldWebShop
- Metrics
- pooled AUROCbetween-task AUROCwithin-task AUROCECEBrier scoretop-10% successepisode success
The paper proposes calibrating the self-reported confidence of each step of an LLM agent using success labels provided by a set of rollouts for the same task under the GRPO framework, based on the actual outcome of the entire task. In offline RL experiments with Qwen2.5-7B on ALFWorld, TextWorld, and WebShop, the AUROC of step-level confidence for whole-task outcomes rose from near random to 0.68-0.85, and the success rate of the top 10% highest-confidence steps was about 4.3 times the average. In online RL experiments, four calibrated rewards improved the AUROC of early steps, expected calibration error dropped from 0.42 to below 0.12, and selective execution outperformed untrained agents and format-only training controls without reducing task success rate. The paper also proposes an evaluation protocol that separates task depth, task difficulty, and the foresight of different attempts at the same task; results show that agents can identify from the first step which tasks will fail, while distinguishing successful from failed attempts of the same task is harder, with some early signals appearing on TextWorld.
Paper analysis
What problem does this paper attempt to solve?
Long-horizon agents need stepwise confidence to predict the final success or failure of the entire task, not the correctness of the current step.
How to make a long-horizon agent's stepwise verbal confidence predict whether the whole task will ultimately succeed, rather than whether the current step is right.
- Control need: The authors argue that action LLM agents operate in long-horizon, partially observable environments, where a single episode can span dozens of actions and uncertainty accumulates. At runtime, the agent must decide whether to continue, verify with observations, or hand off to a human, so it needs the probability that the current attempt will ultimately succeed (§1).
- Existing gap: Without dedicated training, the authors say smaller LLMs calibrate poorly and have weak predictive power (§6). Existing RL calibration aligns confidence to a single answer or step-level correctness; the authors argue such greedy signals train only local predictability and do not promise to predict the final outcome.
- Core approach: Under GRPO, a group of rollouts on the same task comes with success labels. A proper scoring rule aligns each step's confidence to the realized episode outcome, then updates the policy together with other rewards.
- Three outputs: The authors list outcome-anchored calibration training, an evaluation protocol separating episode depth, task difficulty, and attempt-level foresight, and an empirical analysis of what is learned during training.
What related research exists?
Existing RL calibration targets single-step correctness; the authors align verbalized confidence to final rollout success or failure.
Reading confidence without additional training
- Lin et al. (2022), Tian et al. (2023) use verbalized probabilities; Kadavath et al. (2022) use self-consistency and self-evaluation; Xiong et al. (2024) discuss elicitation for black-box models.
- Guo et al. (2017) document that post-hoc calibration of neural classifiers worsens with scale and training. The authors state that this line mainly targets synchronous single-answer correctness, and confidence worsens on weak models, which is the area this paper addresses.
Calibrating confidence with RL
- RLCR (Damani et al., 2025) optimizes verbalized confidence with a Brier reward.
- Bani-Harouni et al. (2026), Xu et al. (2024), Zhang et al. (2026), Leng et al. (2025), Yaldiz et al. (2026), Li et al. (2026), Wang et al. (2026a) connect confidence to reward shaping, uncertainty, or abstention, set in non-agent settings. The authors state they all calibrate single synchronous outputs and do not target final success after agents traverse long-horizon tasks.
Concurrent tool-use and reasoning methods
- CAR/MSCR (Xuan et al., 2026), CAPO (Wang et al., 2026b) train confidence in tool use and reasoning; RLCR trains in single-answer QA. The authors state they align confidence to the current answer or current-step synchronous correctness, whereas this paper aligns to predicted success of the final rollout.
- Signal sources differ: CAPO reads perplexity-derived confidence and reshapes advantage with consistency-and-regret; MSCR uses margin reward. The authors state this paper trains explicit verbalized tokens, and the reward is a lightweight per-completion calibration term.
Selective prediction and belief uncertainty
- The authors frame the governance mechanism as an instance of selective prediction, evaluated with risk-coverage curves (Geifman and El-Yaniv, 2017; Kamath et al., 2020), and trained with proper scoring rules (Brier, 1950; Gneiting and Raftery, 2007).
- Belief-uncertainty agents like Singh et al. (2026) estimate internal beliefs. The authors separate this from outcome-predictive confidence in §4.
Baseline methods and environments
- Comparisons include untrained model, format-only reward, negative mean token entropy, sequence log-probability, depth-only baseline scored by −t, and texture regression of depth plus output length. Advantage estimators also compare RLOO and PPO with a learned value head.
- Environments are ALFWorld, TextWorld, WebShop; labels are binary episode success.
The authors position this paper as: aligning stepwise verbalized confidence to final success in long-horizon tasks, and using an evaluation protocol to separate depth, difficulty, and attempt-level foresight.
How does the paper address this problem?
GRPO labels each step by within-group success or failure and trains verbalized confidence with a proper scoring rule.
Outcome-grounded calibration: A set of rollouts already sampled by GRPO carries success or failure at the end, and these labels are assigned to each step for free; a proper scoring rule is then used to train an inline verbal confidence so that it approaches the probability that this episode ultimately succeeds given the history.
Prediction target
- The agent is modeled as a partially observable decision process, with policy πθ. At step t it observes history ht (prompt, existing actions, environment feedback) and outputs action at and confidence ct, ct∈[0,1].
- ct is parsed from the label
<conf>NN</conf>, with integers 0–100 scaled to [0,1]. When missing or malformed, the format indicator e=0 and ct defaults to 0.5 (§3.1). - At the end of the rollout a binary Y is obtained, which is 1 if the task is solved. The target is
ct ≈ P(Y=1 ∣ ht) i.e., the probability that this episode ultimately succeeds given the history so far, not the probability that the current step is correct synchronously.
- The authors hold that long-horizon tasks have multiple legitimate solution paths, that multiple actions at the same step may all be correct, that local correctness is ill-defined, and that only the final outcome can serve as a label.
Four estimators
- All estimators are the AUROC of step-wise confidence against episode success; the only difference is which steps can be compared. The windows are all steps, the early window k≤2 (steps 0–2), and step 0 alone. Formal definitions are in Appendix A.
- Pooled compares any successful step with any failed step, mixing difficulty, attempt quality, and depth together. Between-task collapses each task into the average confidence within the window, leaving only task difficulty.
- Within-task compares only successful attempts and failed attempts of the same task, canceling out difficulty and leaving attempt-level foresight. Depth-matched within-task further fixes the step index, so that neither difficulty nor depth contributes.
- Depth-only is a baseline that does not look at the model and scores each step as −t. The authors state that over all steps it can match or exceed the real signal, but in the early window and at step 0 it falls to chance, and only there can the gain not be explained by position. At step 0 all attempts see the same observation, so the gain can only come from task ranking or the first sampled action, when there is not yet any environment feedback.
Group-relative advantage and step-wise reward
- Online, the advantage at each step is the within-group outcome deviation plus the within-group reward deviation: As,i,t = (Ys,i − Ȳs) + (rs,i,t − r̄s). Ȳs is the success rate of the task over G attempts (§4.1).
- The step-wise reward is r = wcal cal(c, Y) + wφ φ(c) + wfmt e. Throughout, wfmt=0.2. e=1 if and only if that step emits a correctly formatted conf label.
- By default cal is the Brier reward
rB(c, Y) = 1 − (c − Y)2 which the authors state is strictly proper: at p=P(Y=1|h), the expected reward is maximized at c=p. Offline they also test logarithmic, spherical (proper), L1 (improper), decision/selective, and ranking surrogate; each form is given in Appendix I.
- Balanced Brier reweights wins and losses within the group, with wins weighted 0.5/Ȳs and losses weighted 0.5/(1−Ȳs). The spread term φ(c)=4c(1−c) is maximal at c=1/2 and 0 at the endpoints; the authors state that it keeps confidence inside the scale so that the calibration reward does not collapse to 0 or 1, at the cost of ranking quality (§6.2). The dispersion variant instead rewards dispersion relative to the group mean.
- Comparison optimizers: RLOO uses the mean of the remaining rollouts as the baseline; PPO uses a learned value head and does not use a group-relative baseline (§6.1).
Offline and online
- Offline: rows of (prefix → action+conf) are cut from one untrained Qwen2.5-7B-Instruct trajectory per game, and the label is the outcome of that trajectory. The policy does not act on its own outputs. The 8 generations for the same prefix share the recorded outcome, so there is no label contrast within the group; the action-matching term rewards reproducing the recorded action. The reward is roff = 0.5 a + 0.2 e + wcal cal(c, Y) + wφ φ(c), with default wcal=0.3; the reward-form arms in Table 2 use wcal=1.0. Because each offline rollout has only one trajectory, within-task and between-task can only be measured in the online route.
- Online: the live agent trains with its own rollouts for 120 rounds. Each round samples 4 tasks from the training pool, with 6 rollouts per task (G=6), learning rate 10−6, clip 0.2, KL coefficient 10−3.
- The prompt requires the first line to give an actionable action and the next line to give, with a conf label, the confidence that this episode ultimately succeeds; Appendix I gives the full prompt. The models are Qwen2.5-7B-Instruct and Qwen2.5-14B-Instruct, with LoRA rank 32, α=64.
Training arms and evaluation conventions
- Online arms: format-only (wcal=wφ=0), plus Brier+φ, balanced Brier, Brier+dispersion, balanced+dispersion. Every calibration arm carries a spread or dispersion term with wφ=0.10; there is no pure-Brier online arm. Each online arm has one training seed.
- Fixed in advance: the metric is within-task AUROC for k≤2; the checkpoints for balanced, dispersion, and balanced+dispersion are selected by argmax on the validation set over {40, 80, 120}; and the evaluation criteria (§5).
- Calibration reports ECE (10 equal-width bins) and Brier score. Selective execution reports the success rate of the most confident 10% and 25% of steps within the window, and the success rate when attempting only the top 50% of tasks by early average confidence. Online intervals are 95% task-level cluster bootstrap. Offline intervals are step-wise 95% bootstrap; the authors state that steps of the same trajectory share a label, so these intervals underestimate uncertainty.
What experiments did the paper conduct?
Offline after training, pooled AUROC across the three environments is 0.681, 0.722, 0.850 (Table 1).
Experimental setup
- Models: Qwen2.5-7B-Instruct is primary; Qwen2.5-14B-Instruct uses the same LoRA configuration as an online ALFWorld comparison. Success is determined by environment binary labels; the paper does not use LLM judges.
- Data: Balanced training sets are ALFWorld 1,068 rows/200 games, TextWorld 943 rows/200, WebShop 1,066 rows/372. Each environment is trained independently. Multi-environment checkpoints are at 150 steps; the WebShop reward-form ablation is at 600 steps. Appendix I states that offline, no game contains both success and failure.
- Online split: 7B training tasks are 45 mixed-outcome tasks from seeds 18–245; validation seeds 500–563, test seeds 1000–1127, mutually disjoint. Held-out in Table 6 and Table 12 is 128 tasks.
- Baselines: Untrained, format-reward only, negative mean token entropy, sequence log-probability, depth-only (score −t), and OLS texture regression with depth plus output length. Advantage estimators additionally compare RLOO and PPO with a value critic.
- Metrics: pooled, between-task, within-task, depth-matched AUROC; windows are all steps, k≤2, step 0. Also ECE, Brier, top-10%/top-25% success rate, top-50% task triage, episode success rate, and format parse rate.
- Intervals and seeds: Online uses 95% task-level cluster bootstrap; offline uses step-level bootstrap. Within-task paired differences use only tasks that are mixed-outcome on both sides. One training seed per online arm.
Main results
Per Table 4, online ALFWorld, Qwen2.5-7B-Instruct. ECE is all steps, 10 equal-width bins. Cells are point estimates; intervals are in the original text.
Swipe horizontally to read the table
Training arm Episode success rate k≤2 pooled AUROC All-step ECE k≤2 top-10% success Untrained 0.201 0.689 0.419 0.493 Format-only 0.188 0.708 0.429 0.465 Brier+φ 0.194 0.761 0.115 0.561 Balanced Brier 0.197 0.765 0.114 0.609 Brier+dispersion 0.189 0.790 0.054 0.635 Balanced+dispersion 0.203 0.737 0.053 0.657 - The four calibrated arms' k≤2 pooled AUROC differences versus untrained are +0.072 [.026,.112], +0.076 [.038,.111], +0.101 [.069,.134], +0.048 [.002,.086]; paired 95% CIs exclude 0. Format-only is +0.019 [-.010,.051]. The authors call marginal the balanced+dispersion +0.048 and the Brier+φ top-10% difference +0.080 [-.000,.185].
- Relative to format-only, Brier+φ adds +0.053 [.016,.090], and Brier+dispersion adds +0.082 [.050,.114]. Format parse rate goes from 0.978 to 1.000. k≤2 top-25% success rate goes from 0.363 to 0.415–0.446, with all four calibrated differences' CIs above 0; format-only is −0.012. The authors say the gains come from the calibration term and do not hurt task success.
- The authors say a large part of the ECE and Brier decreases comes from learning the base rate: mean confidence drops from 0.475 to 0.082–0.163, step-level success rate is 0.057; a constant predictor at that base rate gives ECE near 0. At the early-window base rate of 0.201, ECE goes from 0.277 to 0.051–0.133, and Brier from 0.229 to 0.137–0.157 (Appendix F). The abstract writes ECE from 0.42 to below 0.12; §6.2 writes 0.419 to 0.053–0.115. Figure 2 labels untrained ECE 0.42, Brier+φ 0.11, Brier+dispersion 0.05.
Offline three environments and white-box signals
- Table 1: On held-out single-trajectory recordings, pooled AUROC goes from untrained 0.517, 0.578, 0.462 to 0.681, 0.722, 0.850 (ALFWorld / TextWorld / WebShop); top-10% success multiplier goes from 1.55×, 1.57×, 1.11× to 4.33×, 4.35×, 4.35×. The abstract writes near chance to 0.68–0.85, and ∼4.3×. Appendix G marks ALFWorld's 0.681 at step 300; the same split at step 150 is 0.689; WebShop's 0.850 corresponds to 18–23 successes, with wide intervals.
- Before training, negative mean token entropy is more accurate than verbal confidence in all three environments: 0.741, 0.667, 0.806 (Appendix G). After training, verbal confidence overtakes it: TextWorld 0.722 vs 0.399, WebShop 0.850 vs 0.430. The authors say mean content-token entropy drops to about one-sixth; Appendix G writes ALFWorld from 0.145 to 0.025.
- A predictor using only step depth and output length has AUROC 0.787, 0.855, 0.799, reaching or exceeding trained confidence on ALFWorld and TextWorld, but not WebShop. After residualizing depth and length, trained confidence remains 0.626, 0.677, 0.811; the same treatment drops untrained confidence to 0.534, 0.479, 0.509. The authors say the depth-independent part is a product of training. Offline is single-trajectory, so within/between-task cannot be constructed.
Where gains sit, TextWorld, and scale
- §7.1 and Table 5, Table 7: Gains are mainly between-task. Early-window between-task AUROC goes from 0.825 to 0.848–0.897, with only Brier+dispersion's +0.072 [.029,.115] paired CI excluding 0. Within-task does not move: untrained 0.606, calibrated arms 0.585–0.661, paired point estimates −0.026 to −0.092. The authors say no experiment met the §5 preregistered within-task criterion. On all-step within-task, format-only difference is −0.077 [-.114,-.045], balanced+dispersion difference is −0.072 [-.114,-.031], CIs exclude 0.
- Step-0 pooled AUROC goes from 0.562 [.530,.600] to 0.642–0.700; within-task step 0 remains 0.450–0.602, with every CI crossing 0.5. The authors say the model is ranking tasks, not scoring first-step actions. On the 64-task probe, untrained 7B greedy decoding outputs exactly 0.50 at step 0 for every task (Appendix B). Relative to format-only, early within-task differences are Brier+φ +0.062 [-.034,.177], Brier+dispersion +0.127 [.062,.189]; depth-matched differences the authors call not significant (Appendix C; here "significant" is the paper's usage of CI excluding 0).
- TextWorld online, Brier+φ: episode success rate goes from 0.146 to 0.262, format from 0.971 to 0.979. Paired within-task AUROC is +0.265 [.107,.428] at step 0, +0.070 [.010,.130] over the first three steps, and −0.029 [-.087,.029] over the full episode (§6.2, Appendix D, Figure 4). The authors say no detectable change in attempt-level foresight on ALFWorld, but it appears in the early window on TextWorld. Appendix D writes that format-only cannot cleanly separate the early gain into de-censoring or calibration, so the gain is not attributed to either alone.
Other ablations and analyses
- Table 2, WebShop offline, reward form: spherical 0.882, Brier 0.864, ranking 0.845, L1 0.839, logarithmic 0.828, decision 0.820; the authors say statistically indistinguishable; task-reward only 0.559, untrained 0.502. Format rates are 1.00, 0.56, 0.08 respectively. This untrained 0.502 is not the same cell as Table 1's 0.462.
- Table 3, WebShop, ranking+spread with w=0.10: RLOO two seeds 0.801, 0.876; GRPO 0.613, 0.676; PPO+value critic both seeds 0.500. The authors say PPO did not learn a parseable response format.
- 14B online ALFWorld, Brier+φ: matched-emission pooled AUROC goes from 0.697 to 0.729, paired Δ +0.032 [-.016,.073]; episode success rate 36.9% to 38.1%, format 1.000 on both sides. Within-task early window is not identifiable: 6 held-out tasks with both success and failure untrained, 7 after training (Appendix E).
- WebShop online: held-out success rate 0.9% untrained, 1.6% Brier+φ. The authors say too few success/failure changes for within-task early gains to be estimated (2–3 tasks with both success and failure). Stepwise pooled is 0.825 [.785,.889] and 0.877 [.784,.951], intervals overlapping (Appendix D).
- Depth-only beats or ties each training experiment on all-step pooled AUROC, falling to 0.499–0.500 in the early window (§7.3, Figure 5). Untrained most-confident quartile task success rate is 0.557, versus base rate 0.201; after training, top-50% triage is 0.349–0.362, versus untrained 0.362, and task-level AUROC difference CIs all contain 0.
- The authors say higher confidence within the top 10% does not stably correspond to higher success (Figure 3); the most-confident bin on all steps is overconfident (Figure 2). In Appendix H's spread-weight sweep, w from 0.00 to 0.30, sampled AUROC goes from 0.746 to 0.556.
What are some points that can be further explored?
The authors leave broad construction of attempt-level foresight, as well as more model families, to future work.
Limitations and future directions noted by the authors
- The strongest evidence is the between-task effect: on live ALFWorld, training strengthens which tasks the model succeeds on; building the same signal more broadly at the attempt level is left to future work (Limitations).
- The within-task estimator moves only in the early window on TextWorld and has not moved on ALFWorld (Limitations).
- Positive live multi-turn results cover two text environments, ALFWorld and TextWorld, at scale 7B; the larger 14B corroborates the pooled effect in Appendix E (Limitations).
- Live WebShop results are inconclusive: held-out success rates are low on both sides, and there are too few informative held-out tasks to evaluate the signal (Limitations, Appendix D).
- Extending the live study to more model families is left to future work (Limitations).
Experimental coverage
- The models the authors trained and evaluated themselves are Qwen2.5-7B-Instruct and Qwen2.5-14B-Instruct; environments are ALFWorld, TextWorld, WebShop (§5, Appendix D, Appendix E).
- Online multi-arm comparison is on ALFWorld, with arms format-only, Brier+φ, balanced Brier, Brier+dispersion, balanced+dispersion. TextWorld online reports untrained, Brier+φ, and format-only; WebShop online reports untrained and Brier+φ (Table 4, Appendix D).
- Each online calibration arm includes spread or dispersion with wφ=0.10; there is no pure Brier online arm; each online arm has one training seed (§5).
- The preregistered metric is within-task AUROC for k≤2. Checkpoints for balanced, dispersion, and balanced+dispersion are selected by validation argmax over {40, 80, 120} (§5). §7.1 states that no experiment meets that preregistered criterion.
- Online intervals are 95% task-level cluster bootstrap; offline are step-level bootstrap, which the authors note underestimates uncertainty. Within-task paired differences use only tasks with mixed outcomes on both sides; the authors note few clusters and wide intervals (§3.3).
Summarize the main content of the paper
Outcome-grounded calibration lets the 7B agent recognize failing tasks earlier, but does not improve attempt discrimination within the same task.
- Positioning: Under GRPO, calibrate stepwise verbal confidence of an action LLM to final success/failure in multi-step tasks, with an evaluation suite that separates depth, difficulty, and attempt-level foresight.
- Problem: Controlling long-horizon agents requires estimating whether the current rollout will ultimately succeed. The authors argue that RL aligning confidence to current-step correctness does not promise such predictive power.
- Method: A group of rollouts on the same task provides success/failure labels. By default, a Brier reward scores each step's confidence, plus a format term and optional spread; offline on recorded trajectories from an untrained policy, online on a live agent. Missing labels default to confidence 0.5.
- Offline numbers: Qwen2.5-7B on ALFWorld, TextWorld, WebShop: pooled AUROC reaches 0.681, 0.722, 0.850; top-10% success multiplier reaches 4.33×, 4.35×, 4.35× (Table 1). Abstract writes 0.68–0.85 and ∼4.3×. After training, verbal confidence exceeds token entropy; depth plus length still explains part of the pooled scores on ALFWorld and TextWorld.
- Online numbers: On ALFWorld 7B, four calibrated reward arms improve k≤2 pooled AUROC, Brier+dispersion to 0.790 (Δ +0.101); all-step ECE from 0.419 to 0.053–0.115; episode success rate stays at 0.189–0.203, versus 0.201 for untrained (Table 4). The authors say no arm met the preregistered within-task criterion. On TextWorld, the step-0 within-task paired difference is +0.265; WebShop online is inconclusive.
- Authors' conclusion: Outcome-anchored RL turns confidence tokens into an early triage signal without hurting task success. What is learned is earlier recognition of which tasks will fail, not which attempts will succeed. The authors argue controllers should use a band of high confidence rather than only the maximum; within-task discrimination requires training signals that can compare different attempts on the same task.