Large language models (LLMs) exhibit strong performance on self-contained programming tasks. However, they still struggle with repository-level software engineering (SWE), which demands (1) deep codebase navigation with effective context management for accurate localization, and (2) systematic approaches for iterative, test-driven code modification to resolve issues. To address these challenges, we propose SWE-Adept, an LLM-based two-agent framework where a localization agent identifies issue-relevant code locations and a resolution agent implements the corresponding fixes. For issue localization, we introduce agent-directed depth-first search that selectively traverses code dependencies. This minimizes issue-irrelevant content in the agent's context window and improves localization accuracy. For issue resolution, we employ adaptive planning and structured problem solving. We equip the agent with specialized tools for progress tracking and Git-based version control. These tools interface with a shared working memory that stores code-state checkpoints indexed by execution steps, facilitating precise checkpoint retrieval. This design enables reliable agent-driven version-control operations for systematic issue resolution, including branching to explore alternative solutions and reverting failed edits. Experiments on SWE-Bench Lite and SWE-Bench Pro demonstrate that SWE-Adept consistently outperforms prior approaches in both issue localization and resolution, improving the end-to-end resolve rate by up to 4.3%.


翻译:大语言模型(LLMs)在自包含编程任务中表现出色,但在仓库级软件工程(SWE)任务中仍面临挑战。此类任务要求:(1)深度代码库导航与有效上下文管理以实现精准定位,(2)采用系统性方法进行迭代式测试驱动的代码修改以解决问题。为应对这些挑战,我们提出SWE-Adept框架——一种基于LLM的双智能体架构,其中定位智能体负责识别与问题相关的代码位置,解决智能体则实施相应修复。针对问题定位,我们引入了智能体引导的深度优先搜索方法,该方法选择性遍历代码依赖关系,最大限度减少智能体上下文窗口中与问题无关的内容,从而提升定位精度。针对问题解决,我们采用自适应规划与结构化问题求解策略。我们为智能体配备专用工具以实现进度追踪和基于Git的版本控制,这些工具通过共享工作记忆交互,该工作记忆存储按执行步骤索引的代码状态检查点,便于精确检索检查点。该设计使智能体驱动的版本控制操作具备可靠性,可实现系统性问题解决,包括分支探索替代解决方案与回滚失败编辑。在SWE-Bench Lite和SWE-Bench Pro上的实验表明,SWE-Adept在问题定位与解决方面持续优于现有方法,端到端解决率最高提升4.3%。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
基于大语言模型的智能体化软件问题解决:综述
专知会员服务
23+阅读 · 2025年12月31日
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
13+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 5月18日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
4+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
6+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
3+阅读 · 6月17日
相关VIP内容
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
13+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员