通过探测与精炼优化代码库指引,显著提升编码智能体修复效率。
Probe-and-Refine Tuning of Repository Guidance for Coding Agents
- 用合成错误触发器迭代诊断并修补指引文件,仅靠单次调用完成优化。
- 在SWE-bench上平均修复率达33.0%,较静态基线提升7.5个百分点。
- 适合希望提升编码助手实际表现的开发者和研究者使用。
基于大模型的编码智能体需要了解代码库的高层操作知识(如文件归属、测试运行方式、历史错误修复路径等),这些信息无法从代码本身获取。工程师通常通过AGENTS.md文件提供上下文,但其有效性存在争议:现有研究对大模型生成的指引是否提升性能意见不一。本文表明,指引生成方式才是决定性因素,提出“探测与精炼调优”方法:利用合成缺陷修复探针,通过单次大模型调用迭代诊断并修补代码库指引文件,无需代理循环或工具调用。在SWE-bench Verified上,四次独立实验中使用Qwen3.5-35B-A3B模型,200步下探测精炼调优达到33.0%的平均修复率,显著优于初始静态知识库的28.3%和无指引基线的25.5%(均p < 0.001)。改进主要来自覆盖范围而非精确度:优化后的指引使可评估补丁覆盖多出14.5个百分点,而每补丁精确度保持稳定约59%(p = 0.119),说明优化指引帮助智能体定位正确文件,而非提升修改质量。进一步实验显示,指引使智能体能有效利用更大步数预算;跨模型实验中,当模型无法生成足够诊断输出时,调优过程退化,但每补丁精确度仍保持不变。
原文摘要 · Abstract (English)
LLM-based coding agents need higher-level operational knowledge about a repository (which files house which subsystems, how to run the test suite, which workflows have historically led to wrong fixes) that does not exist in the code itself. Engineers typically maintain AGENTS.md files to supply this context as instructions for coding agents, but whether they help is contested: recent studies disagree on whether LLM-generated guidance improves or harms agent performance. In this paper we show that how the guidance is produced is the decisive variable, and introduce probe-and-refine tuning: a procedure that uses synthetic bug-fix probes to iteratively diagnose and patch a repository's guidance file through single-shot LLM calls, with no agent loop or tool use during tuning. On SWE-bench Verified across four independent trials with Qwen3.5-35B-A3B at 200 steps, probe-and-refine achieves 33.0% mean resolve rate vs. 28.3% for the static knowledge base used to initialize it and 25.5% for an unguided baseline (p < 0.001 for both probe-and-refine contrasts). The improvement comes from coverage rather than precision: refined guidance produces evaluable patches for 14.5 percentage points (pp) more instances while per-patch precision remains statistically constant (~59%, p = 0.119), showing that improved guidance helps agents reach the correct file rather than improving the quality of the changes they make. Further, a step-budget experiment shows that guidance is what lets the agent use a larger step budget productively, and a cross-model experiment with NVIDIA-Nemotron-3-Nano-30B-A3B finds that the tuning loop degrades when the model cannot generate sufficiently diagnostic output, though per-patch precision remains constant even then.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。