基于错误假设构建(BOBA):为何编码智能体不能单独使用
Built on Broken Assumptions (BOBA): Why Coding Agents Cannot Be Left Alone
AI总结:
该研究构建BOBA-Bench基准,发现10种编码智能体在链式请求上的完成率远低于单次请求,原因是其会遗漏错误,仅靠少量外部验证可提升链式完成率,表明编码智能体需依赖验证才能可靠工作。
摘要:
编码智能体是自主开发者,给定一个请求后会修改代码并在完成时反馈,因此它们不仅能处理独立请求,还能处理由多个请求组成的完整链,每个请求都基于前一个请求的结果。已知编码智能体常将错误工作报告为已完成,但现有基准仍仅对其进行单次请求测试,使用人类编写的代码且仅检查一次。我们构建了BOBA-Bench,该基准包含280个由20个连续请求组成的链,这些请求来自140个真实开源项目,并在该基准和单次请求设置下评估了10种编码智能体。所有10种智能体在请求链上的表现都远差于单次请求:平均而言,它们在单次请求时完成95%,而在链式请求时仅完成51%。代码质量更差并非原因:经检查后,智能体代码作为后续请求的基础,其质量几乎与人类代码相当。原因在于智能体遗漏的错误:编码智能体在自身测试通过后就会宣布请求完成,即便这些测试遗漏了错误,后续请求会基于错误代码构建,失败概率约为之前的两倍,且这类错误很少在后续被发现。智能体也无法通过代码审查发现此类错误:当被问及某个实现是否正确时,它们的正确率为53%,仅比抛硬币略好。因此,编码智能体严重依赖验证:在请求失败后,一次外部的“这是错误的”反馈和一次修复轮次,能将链式请求完成率从51%提升至59%,且修复后的错误不会再对后续请求造成影响。简言之,编码智能体的可靠性仅取决于可获取的检查:没有验证,每个后续请求都基于错误假设构建。
英文摘要:
Coding agents are autonomous developers. Given a request, they change the code and report back when done. As such, they can handle not only independent requests but whole chains of them, each request built on the last. Agents are known to report wrong work as done, yet benchmarks still test them one request at a time, on human-written code, checked once. We build BOBA-Bench, 280 chains of 20 consecutive requests drawn from 140 real open-source projects, and evaluate ten coding agents on both. All ten do far worse on chains. On average, they complete 95% of requests taken one at a time, but when requests are chained together, they complete 51%. Worse code is not the cause. Once checked, agent code is nearly as good a base for later requests as human code. The cause is the mistakes agents miss. Coding agents declare a request done once their own tests pass, even when those tests miss a mistake. The next request then builds on broken code and fails about twice as often. The mistake is rarely found later. Nor can agents catch such mistakes by reviewing code. Asked whether an implementation is correct, they are right 53% of the time, barely better than a coin flip. Coding agents are therefore heavily dependent on access to verification. A single external ``that's wrong'' after a failed request and one repair round lift chain completion from 51% to 59%, and a repaired mistake no longer hurts the requests that follow. In simpler terms, coding agents are only as reliable as the checks they can reach: without verification, every request that follows is built on broken assumptions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。