让语言模型学会自动修复工具故障,提升真实场景下的任务成功率。
PALADIN: Self-Correcting Language Model Agents to Cure Tool-Failure Cases
- 通过系统注入故障和专家示范构建5万+带修复标注的轨迹数据训练模型。
- 推理时识别错误并调用55+类故障示例库,对未见过的API仍保持95.2%修复率。
- 显著提升任务成功率与恢复率,尤其适合高可靠性需求的真实应用。
增强工具的语言智能体在实际部署中常因工具异常(如超时、API异常或输出不一致)而失败,引发连锁推理错误甚至任务中断。现有训练方法仅优化成功路径,忽视了真实使用中占主导的故障场景。我们提出PALADIN,一种可泛化的框架,使语言代理具备鲁棒的故障恢复能力。该框架基于5万+经故障注入与专家示范构建的强化版ToolBench数据集进行训练,采用LoRA微调以保留基础能力并注入恢复技能。推理阶段,PALADIN实时检测错误,从55+类故障示例库中检索最相似案例,并执行对应恢复操作。该方法可泛化至训练分布外的新型故障,在未见工具API上仍保持95.2%的恢复性能。在PaladinEval和ToolReflectEval上的评估显示,其在恢复率(RR)、任务成功率(TSR)、灾难性成功率(CSR)和效率得分(ES)上均显著提升。相较ToolBench基准,恢复率由32.76%提升至89.68%(相对增长57%),优于最强基线CRITIC(76.34%)达13.3%,较原始代理(23.75%)提升66%。结果表明,PALADIN是构建真实工具环境下容错智能体的有效方案。
原文摘要 · Abstract (English)
Tool-augmented language agents frequently fail in real-world deployment due to tool malfunctions--timeouts, API exceptions, or inconsistent outputs--triggering cascading reasoning errors and task abandonment. Existing agent training pipelines optimize only for success trajectories, failing to expose models to the tool failures that dominate real-world usage. We propose \textbf{PALADIN}, a generalizable framework for equipping language agents with robust failure recovery capabilities. PALADIN trains on 50,000+ recovery-annotated trajectories constructed via systematic failure injection and expert demonstrations on an enhanced ToolBench dataset. Training uses LoRA-based fine-tuning to retain base capabilities while injecting recovery competence. At inference, PALADIN detects execution-time errors and retrieves the most similar case from a curated bank of 55+ failure exemplars aligned with ToolScan's taxonomy, then executes the corresponding recovery action. This approach generalizes to novel failures beyond the training distribution, retaining 95.2\% recovery performance on unseen tool APIs. Evaluation across PaladinEval and ToolReflectEval demonstrates consistent improvements in Recovery Rate (RR), Task Success Rate (TSR), Catastrophic Success Rate (CSR), and Efficiency Score (ES). PALADIN improves RR from 32.76% to 89.68% (+57% relative) over ToolBench and outperforms the strongest baseline CRITIC (76.34%) by +13.3%. Against vanilla agents, PALADIN achieves 89.86\% RR (+66% relative improvement from 23.75%). These results establish PALADIN as an effective method for building fault-tolerant agents capable of robust recovery in real-world tool environments.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。