何时进行干预?大语言模型智能体中错误与自我恢复的实证研究
When to Intervene? An Empirical Study of Errors and Self-Recovery in LLM Agents
AI总结:
本研究针对LLM智能体的错误与自我恢复开展实证研究,构建ReInBench数据集,提出ReCoF方法预测错误是否会自我恢复,在ReInBench上实现9.02%的Macro-F1平均相对提升。
摘要:
大语言模型(LLM)智能体与Web服务交互以代表用户执行任务,交互过程中出现的错误会中断执行并阻碍任务完成,这促使人们进行外部干预。然而,智能体可能通过继续执行实现自我恢复,由此产生了何时干预、何时等待自我恢复的问题。我们针对LLM智能体中的错误与自我恢复开展实证研究,构建了ReInBench数据集,该数据集包含1259条智能体轨迹以及计算机使用和Web任务中的1403个错误事件。本研究考察了智能体自我恢复的频率与速度、自我恢复与后续执行及任务完成的关联,以及错误发生时能否预测自我恢复。研究发现,725个错误事件可实现自我恢复,且通常在几步内完成,不同执行LLM的自我恢复表现存在差异;自我恢复还能帮助智能体从后续同类错误中恢复,支持整体任务完成。因此,干预应优先针对不太可能自我恢复的错误,而在自我恢复可能性较高时允许智能体继续执行。基于这些实证发现,我们提出ReCoF方法,该方法可预测错误是否会自我恢复,以判断是否需要额外干预;在ReInBench数据集上,ReCoF相较于最强基线方法,在Macro-F1指标上实现了9.02%的平均相对提升。我们的代码和数据可在该https URL获取。
英文摘要:
LLM agents interact with Web services to perform tasks on users' behalf. Errors during these interactions can disrupt execution and prevent task completion, motivating external intervention. However, agents may self-recover through continued execution, raising the question of when to intervene and when to wait for self-recovery. We present an empirical study of errors and self-recovery in LLM agents. We construct ReInBench, a dataset containing 1,259 agent traces and 1,403 error events across computer-use and Web tasks. Our study examines how often and how quickly agents self-recover, how self-recovery relates to subsequent execution and task completion, and whether self-recovery can be predicted when an error occurs. We find that 725 error events self-recover, often within a few steps, with self-recovery performance differing across Execution LLMs. Self-recovery can also help agents recover from subsequent errors of the same type and support overall task completion. Intervention should therefore prioritize errors unlikely to self-recover, while allowing agents to continue when self-recovery is likely. Building on these empirical findings, we propose ReCoF, a method that predicts whether an error will self-recover to inform whether additional intervention is needed. ReCoF achieves an average relative improvement of 9.02% in Macro-F1 over the strongest baseline on ReInBench. Our code and data can be found at https://method-notes.github.io/ReCoF/.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。