Large language model agents have made strong progress on software engineering, yet current systems suffer from a context coupling problem: the standard code editing interface conflates code inspection, modification planning, and edit execution within a single context window, forcing agents to interleave exploratory viewing with strictly formatted edit generation. Irrelevant context accumulates and edit reliability degrades. We propose SWE-Edit, which decomposes the editing interface into two specialized subagents: a Viewer that extracts task-relevant code on demand, and an Editor that executes modifications from high-level natural language plans -- letting the main agent focus on reasoning while delegating context-intensive operations to clean context windows. On SWE-Bench Verified, this decomposition raises resolve rate by 2.1 pp and cuts inference cost by 17.9%, with consistent gains across multiple reasoning-model families (Kimi-K2, MiniMax-M2.1, GLM-4.7). We further show that effective edit-format selection can be trained into a small model rather than requiring frontier-scale capacity: GRPO training on Qwen3-8B with an adaptive find-replace/whole-file-rewrite policy improves edit success by 12.5 pp and brings an 8B open-source editor to parity with GPT-5-nano on downstream SWE-Bench resolve rate. To enable rapid editor iteration, we release PR-Edit, a lightweight evaluation whose scores correlate strongly with SWE-Bench resolve rate. We release our code at https://github.com/microsoft/SWE-Edit.


翻译:大语言模型智能体在软件工程领域取得了显著进展,但现有系统存在上下文耦合问题:标准代码编辑接口将代码检查、修改规划和编辑执行混在单一上下文窗口内,迫使智能体在探索性查看与严格格式化的编辑生成之间频繁切换。无关上下文不断累积,编辑可靠性随之下降。我们提出SWE-Edit方法,将编辑接口分解为两个专门化的子智能体:一个按需提取任务相关代码的查看器(Viewer)和一个根据高层级自然语言计划执行修改的编辑器(Editor)——让主智能体专注于推理,同时将上下文密集型操作委托给独立的干净上下文窗口。在SWE-Bench验证集上,这种分解使解决率提升2.1个百分点,推理成本降低17.9%,且在多个推理模型系列(Kimi-K2、MiniMax-M2.1、GLM-4.7)上均取得一致提升。我们进一步证明,有效的编辑格式选择可以通过小型模型训练实现,而无需依赖前沿规模能力:在Qwen3-8B上采用自适应查找替换/全文件重写策略进行GRPO训练,使编辑成功率提升12.5个百分点,并使8B开源编辑器的下游SWE-Bench解决率与GPT-5-nano持平。为支持快速迭代编辑器,我们发布轻量级评估基准PR-Edit,其得分与SWE-Bench解决率高度相关。相关代码已开源至https://github.com/microsoft/SWE-Edit。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
Effective.Modern.C++ 中英文版,334页pdf
专知会员服务
69+阅读 · 2020年11月4日
Effective.Modern.C++ 中英文版,334页pdf
专知
26+阅读 · 2020年11月4日
高效的文本生成方法 — LaserTagger 现已开源
TensorFlow
30+阅读 · 2020年2月27日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
[深度学习] AlexNet,GoogLeNet,VGG,ResNet简化版
机器学习和数学
20+阅读 · 2017年10月13日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
《通过小型无人机系统将情报能力“作战化”》
专知会员服务
4+阅读 · 今天7:28
消耗优势:美军的“精确规模化”概念
专知会员服务
8+阅读 · 6月15日
《离线语言支持系统:面向空战战术决策》
专知会员服务
8+阅读 · 6月15日
相关VIP内容
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
Effective.Modern.C++ 中英文版,334页pdf
专知会员服务
69+阅读 · 2020年11月4日
相关资讯
Effective.Modern.C++ 中英文版,334页pdf
专知
26+阅读 · 2020年11月4日
高效的文本生成方法 — LaserTagger 现已开源
TensorFlow
30+阅读 · 2020年2月27日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
[深度学习] AlexNet,GoogLeNet,VGG,ResNet简化版
机器学习和数学
20+阅读 · 2017年10月13日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员