编码智能体是否仍需要调试器?基于前沿模型的故障定位已达精度上限
Do Coding Agents Still Need a Debugger? Frontier-Model-Based Fault Localization at the Accuracy Ceiling
AI总结:
该研究评估前沿编码智能体的故障定位能力,发现其仅靠源代码即可定位几乎所有故障,调试器辅助可消除大部分剩余错误,且智能体更倾向于执行程序而非逐步调试。
摘要:
背景:为定位故障,编码智能体可仅从源代码推理,或通过交互式调试器运行程序并逐步执行以借助调试器辅助。早期智能体在静态执行追踪和调试器操作上存在困难,而前沿大语言模型(LLM)在这两方面均有提升。目标:我们评估编码智能体在无工具情况下对原始及转换后程序的故障定位精度,调试器辅助能提升多少精度及成本,以及智能体在可选情况下如何使用调试器。方法:我们在144个LeetCodeDataset解决方案中植入610个单行故障,并通过5种保留行为的转换方法重写每个故障程序。基于Sol 6.1、Luna 6和Qwen 3.8的智能体分别在无调试器、可选调试器、鼓励使用调试器的条件下定位每个故障。结果:无工具时,智能体对原始程序的故障定位精度为98.2%至99.9%,对转换后程序为96.7%至99.9%,精度损失主要出现在转换方法重构循环和条件的场景。鼓励使用调试器辅助时,Luna 6和Qwen 3.8的剩余转换错误分别减少63%和61%(精度提升2.1和1.3个百分点),但token使用量为14.7至27.0倍,而Sol 6.1的精度保持99.9%。可选调试器辅助时,Luna 6和Qwen 3.8仍分别提升1.5和1.3个百分点,不过智能体仅在0.2%至6.2%的运行中使用交互式调试器。结论:在短且精确指定的程序上,当前编码智能体仅通过源代码就能定位几乎所有故障,调试器辅助可消除大部分剩余错误。在可选情况下,智能体执行程序的频率远高于逐步执行,且仍保留大部分收益。
英文摘要:
Background: To localize a fault, a coding agent can reason from source code alone or use debugger assistance by running the program and stepping through it in an interactive debugger. While earlier agents struggled with static execution tracing and debugger operation, frontier LLMs have improved at both. Objective: We evaluate how accurately coding agents localize faults without tools across original and transformed programs, how much debugger assistance improves accuracy and at what cost, and how agents use it when optional. Methods: We seed 610 single-line faults into 144 LeetCodeDataset solutions and rewrite each faulty program with five recipes of behavior-preserving transformations. Agents based on Sol 6.1, Luna 6, and Qwen 3.8 localize each fault with no, optional, or encouraged debugger assistance. Results: Without tools, the agents localized 98.2 to 99.9% of faults in original and 96.7 to 99.9% in transformed programs, losing accuracy mainly where recipes restructured loops and conditions. Encouraged assistance removed 63% and 61% of Luna 6's and Qwen 3.8's remaining transformed errors (+2.1 and +1.3 percentage points) at 14.7 to 27.0 times the token use, while Sol 6.1 stayed at 99.9%. With optional assistance, Luna 6 and Qwen 3.8 still gained +1.5 and +1.3 points, though the agents used the interactive debugger in only 0.2 to 6.2% of runs. Conclusions: On short, precisely specified programs, current coding agents localize nearly all faults from source code alone, and debugger assistance removes most errors that remain. Given the choice, agents executed the program far more often than they stepped through it, yet kept most of the benefit.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。