arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.21073cs.SEcs.AIcs.CLcs.LG
收藏

跳过压缩器:编码智能体选择完整文件时能修复更多问题

Skip the Compressor: Coding Agents Fix More Issues When They Pick Whole Files

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Xiaocong Yang, Rishit Chatterjee, Himanshu Udupi, Vikram Ramavarapu, ChengXiang Zhai

AI总结:

该研究提出编码智能体选择完整文件的方法 CQ2-CARE,在相同 token 预算下,其解决 SWE-rebench 问题的表现优于压缩器、检索器及相关训练方法。

摘要:

编码智能体处理的代码仓库规模可能远超其上下文窗口的容量,提示压缩器和检索器为该问题提供了解决方案,但修复问题需同时满足两个条件:必须修改的文件,以及其精确的代码内容,因为模型必须重现其编辑的代码行。检索器根据代码与问题的相似度而非是否必须修改来排序,压缩器则删除文本以适配预算。我们表明,在相同的 token 预算下,当预算用于选择逐字显示的文件时,我们的简单选择器 CQ2-CARE 能让智能体解决更多问题,而非将预算用于修剪 token 或检索代码块。我们在 300 个最新的 SWE-rebench 问题上为每个上下文适配相同的单问题预算,并使用基准测试评估每个补丁。在 GPT-5.6 和 Claude Opus 5 模型下,CQ2-CARE 解决了 43.7% 和 46.7% 的问题,比两种模型中三种压缩器的最佳表现分别高出 6.3 个百分点,比三种检索器的最佳表现分别高出 9.3 和 12.7 个百分点。CQ2-CARE 甚至比两种针对问题解决训练的方法解决了更多问题:比 SweRank 分别高出 0.7 和 1.7 个百分点,比 SWE-Pruner 分别高出 2.0 和 7.3 个百分点。我们的分析显示了基线方法的缺陷:检索器经常遗漏需编辑的文件,压缩器虽保留文件但会修改其文本,因此更少的补丁能生效。选择完整文件无需压缩模型,且会显示仓库中的每一行代码,因此模型可以引用其编辑的代码。

英文摘要:

A coding agent works on repositories that can be far larger than its context window can hold. Prompt compressors and retrievers offer solutions to this problem, but patching an issue needs two things at once: the files that must change, and their code exactly as written, since the model must reproduce the lines it edits. Retrievers rank code by its similarity to the issue rather than by whether it must change, and compressors delete text to fit the budget. We show that at an equal token budget, an agent resolves more issues when the budget goes to choosing which files to show verbatim, as our simple selector CQ2-CARE does, than when it goes to pruning tokens or retrieving chunks. We fit every context to the same per-issue budget on 300 recent SWE-rebench issues and grade each patch with the benchmark's tests. With GPT-5.6 and Claude Opus 5, CQ2-CARE resolves 43.7% and 46.7% of the issues, 6.3 points more than the best of three compressors with either model, and 9.3 and 12.7 points more than the best of three retrievers. CQ2-CARE even resolves more issues than two methods trained for issue resolution, SweRank (by 0.7 and 1.7 points) and SWE-Pruner (by 2.0 and 7.3). Our analysis shows the defects of the baseline methods: retrievers often miss the files to edit, and compressors keep them but alter their text, so fewer patches apply. Exact-file selection needs no compression model and shows every line as the repository has it, so the model can quote the code it edits.

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

↑