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

SWE-Adept:基于LLM的深度代码库分析与结构化问题解决代理框架

SWE-Adept: An LLM-Based Agentic Framework for Deep Codebase Analysis and Structured Issue Resolution

Electrical and Computer Engineering, Purdue University(电子工程与计算机工程系,普渡大学)

Kang He, Kaushik Roy

AI总结:

提出SWE-Adept双代理框架,通过代理引导的深度优先搜索进行代码定位,结合自适应规划和结构化问题解决,在SWE-Bench上提升端到端解决率最多4.3%。

摘要:

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

英文摘要:

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%.

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

↑