RefactorBench:通过代码评估语言智能体中的有状态推理
RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Code
AI总结:
RefactorBench通过100个多文件重构任务评估语言智能体的有状态推理能力,发现当前智能体仅解决22%的任务,并提出状态感知方法使解决率提升43.9%。
摘要:
语言模型(LM)智能体和函数调用的最新进展,使得自主的、反馈驱动的系统能够在各种数字领域中解决问题。为了更好地理解LM智能体的独特局限性,我们引入了RefactorBench,这是一个由100个大型手工制作的多文件重构任务组成的基准,这些任务位于流行的开源仓库中。解决RefactorBench中的任务需要对多个文件之间的依赖关系进行彻底探索,并严格遵守相关指令。每个任务由3条不同具体程度的自然语言指令定义,并且相互独立,从而允许在同一仓库上创建更长的组合任务。在RefactorBench上的基线实验表明,当前的LM智能体在简单的组合任务上存在困难,使用基础指令时仅能解决22%的任务,相比之下,一个时间受限的人类开发者能够解决87%的任务。通过轨迹分析,我们识别了LM智能体的多种独特失败模式,并进一步探索了跟踪过去动作的失败模式。通过调整基线智能体以基于状态表示进行条件化,我们在解决RefactorBench任务方面实现了43.9%的提升。我们进一步将状态感知方法扩展到涵盖整个数字环境,并概述了未来研究的潜在方向。RefactorBench旨在通过提供一组代码领域内的真实世界多跳任务,支持对LM智能体的研究。
英文摘要:
Recent advances in language model (LM) agents and function calling have enabled autonomous, feedback-driven systems to solve problems across various digital domains. To better understand the unique limitations of LM agents, we introduce RefactorBench, a benchmark consisting of 100 large handcrafted multi-file refactoring tasks in popular open-source repositories. Solving tasks within RefactorBench requires thorough exploration of dependencies across multiple files and strong adherence to relevant instructions. Every task is defined by 3 natural language instructions of varying specificity and is mutually exclusive, allowing for the creation of longer combined tasks on the same repository. Baselines on RefactorBench reveal that current LM agents struggle with simple compositional tasks, solving only 22% of tasks with base instructions, in contrast to a human developer with short time constraints solving 87%. Through trajectory analysis, we identify various unique failure modes of LM agents, and further explore the failure mode of tracking past actions. By adapting a baseline agent to condition on representations of state, we achieve a 43.9% improvement in solving RefactorBench tasks. We further extend our state-aware approach to encompass entire digital environments and outline potential directions for future research. RefactorBench aims to support the study of LM agents by providing a set of real-world, multi-hop tasks within the realm of code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。