arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.24820cs.CL
收藏

SHERLOC: 代码修复智能体的结构化诊断定位

SHERLOC: Structured Diagnostic Localization for Code Repair Agents

NVIDIA(英伟达);Santa Clara, CA 95051, USA(美国加利福尼亚州圣克拉拉);TU Darmstadt(达姆施塔特工业大学);National Research Center for Applied Cybersecurity ATHENE(国家应用网络安全研究中心 ATHENE)

Hovhannes Tamoyan, Sean Narenthiran, Erik Arakelyan, Mira Mezini, Boris Ginsburg

AI总结:

提出SHERLOC框架,通过推理LLM与紧凑仓库工具及自恢复机制,实现无需微调的结构化诊断定位,在SWE-Bench上达到最优定位精度,并提升修复率、降低令牌消耗。

摘要:

LLM智能体通过多轮工具使用解决仓库级编码任务,但在编辑前将一半预算用于定位故障。专用的定位框架已经出现,但仍被评估为文件检索而非可操作的诊断,产生的位置缺乏修复智能体所需的诊断上下文。我们引入了SHERLOC(结构化假设驱动的探索与推理定位),这是一个无需训练的框架,将推理LLM与紧凑的仓库工具及自恢复相结合,无需微调或多智能体编排。SHERLOC在不同模型规模上达到了最先进的定位性能:在SWE-Bench Lite上准确率@1为84.33%,在SWE-Bench Verified上召回率@1为81.27%;在约30B参数下,它匹配或超越了其他智能体方法。将我们的位置和诊断发现注入修复智能体,在SWE-Bench Verified上平均解决率提高了5.95个百分点,同时将定位和总令牌消耗分别降低了36.7%和23.1%。

英文摘要:

LLM agents solve repository-level coding tasks through multi-turn tool use, but utilize half their budget on locating faults before editing. Dedicated localization frameworks have emerged, yet are still evaluated as file retrieval rather than actionable diagnosis, producing locations without the diagnostic context a repair agent needs. We introduce SHERLOC (Structured Hypothesis-driven Exploration and Reasoning for Localization), a training-free framework pairing a reasoning LLM with compact repository tools and self-recovery, without fine-tuning or multi-agent orchestration. SHERLOC reaches state-of-the-art localization across model scales: 84.33% accuracy@1 on SWE-Bench Lite and 81.27% recall@1 on SWE-Bench Verified; at ~30B parameters, it matches or outperforms other agentic methods. Injecting our locations and diagnostic findings into repair agents yields an average +5.95 pp resolve-rate gain from the best SHERLOC result per setting on SWE-Bench Verified. SHERLOC cuts localization and total tokens by 36.7% and 23.1% on average.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑