返回全部动态

跳过压缩器:代码智能体整文件选择解决更多问题

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

arXiv cs.SE一手来源研究质量 88

AI 摘要

该研究比较了在固定 token 预算下,代码智能体处理仓库级 issue 时三种上下文压缩策略的效果:检索器、提示压缩器和整文件选择。作者提出简单选择器 CQ2-CARE,通过两次独立采样让模型选出必须修改的文件并整文件原样展示,再补充 grep 找到的相关代码片段。在 300 个 SWE-rebench issue 上,使用 GPT-5.6 和 Claude Opus 5 时,CQ2-CARE 分别解决 43.7% 和 46.7% 的 issue,比最佳压缩器高 6.3 个百分点,比最佳检索器高 9.3 和 12.7 个百分点,也优于专门训练的 SweRank 和 SWE-Pruner。分析表明检索器常漏掉需编辑文件,压缩器会改动代码文本导致补丁无法应用。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

Skip the Compressor: Coding Agents Fix More Issues When They Pick Whole Files Abstract 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,


发布时间:2026-10-16 12:00
抓取时间:2026-10-16 13:17
来源机构:arXiv
阅读原文arxiv.org