智能体能否学会预测自身失败?LLM智能体中基于结果置信度校准

·

研究论文 · 2026/10/14

控制一个执行任务的LLM智能体意味着在长时程任务的每一步决定是信任其下一步动作、弃权还是转交人类。这一决策需要每一步的置信度信号来预测当前轨迹最终是否会成功。智能体自我报告的语言化置信度是自然候选,但现有强化学习方法将其校准为当前步骤决策的正确性。我们提出一种方法,将其校准为多步回合的最终结果:在GRPO下,一个任务的轨迹组提供成功标签,一个适当的评分规则根据实际结果对每一步的置信度进行评分。在Qwen2.5-7B智能体于ALFWorld、TextWorld和WebShop环境的记录轨迹上进行离线RL,步骤置信度对回合结果的AUROC从接近随机升至0.68-0.85,智能体最自信的前10%步骤成功率约为平均的4.3倍。在实时ALFWorld智能体上进行在线RL,四种校准奖励提升了早期步骤的AUROC,期望校准误差从0.42降至0.12以下,选择性执行优于未训练智能体和仅格式RL控制,且不降低任务成功率。我们还引入了一种评估协议,分离回合深度、任务难度和尝试级预见性,显示增益所在:训练后的智能体从第一步就能识别哪些任务会失败,而区分同一任务的成功与失败尝试更难,在TextWorld上出现了一些早期窗口信号。

该研究解决了LLM智能体在长时程任务中可靠决策的关键问题,通过将置信度校准到最终结果,显著提升了失败预测能力,并提供了可分离评估的协议,对构建可信赖的自主智能体具有重要价值。

Controlling an acting LLM agent means deciding, at each step of a long-horizon task, whether to trust its next action, abstain, or hand off to a human. That decision needs a per-step confidence signal predicting whether the current rollout will eventually succeed. The agent's own self-reported verbalized confidence is the natural candidate, but existing reinforcement learning methods calibrate it against the correctness of a decision at the current step. We propose a method to calibrate it against the eventual outcome of a multi-step episode: under GRPO, the group of rollouts for a task supplies success labels, and a proper scoring rule scores each step's confidence against the realized outcome. In offline RL on recorded trajectories of a Qwen2.5-7B agent in ALFWorld, TextWorld, and WebShop environments, the AUROC of step confidence against episode outcome rises from near chance to 0.68-0.85, and the top-10% of steps the agent is most confident about succeed ~4.3x more often than average. In online RL on the live ALFWorld agent, four calibration rewards improve early-step AUROC, expected calibration error goes from 0.42 to below 0.12, and selective execution improves over both the untrained agent and a format-only RL control, without degrading task success. We also introduce an evaluation protocol that separates episode depth, task difficulty, and attempt-level foresight, which shows where the gain lies: the trained agent recognizes from its first step which tasks it will fail, while telling a succeeding attempt from a failing one at the same task is harder, with some early-window signal emerging on TextWorld.

阅读原文

参与讨论