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

RepoGraph:通过仓库级代码图增强AI软件工程能力

RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graph

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Tencent AI Seattle Lab(腾讯AI西雅图实验室);Rice University(莱斯大学);University of Notre Dame(圣母大学)

Siru Ouyang, Wenhao Yu, Kaixin Ma, Zilin Xiao, Zhihan Zhang, Mengzhao Jia, Jiawei Han, Hongming Zhang, Dong Yu

AI总结:

针对现有方法缺乏仓库级代码理解的问题,提出插件模块RepoGraph作为全仓库导航工具,接入多类方法后在SWE-bench等基准上显著提升性能,刷新开源框架最优水平。

摘要:

大语言模型(LLMs)在代码生成方面表现优异,但在应对现代AI软件工程任务时仍存在困难。与传统的函数级或文件级编码任务不同,AI软件工程不仅要求基础编码能力,还需要具备管理代码仓库并与之交互的高阶技能。然而现有方法往往忽视了仓库级代码理解的需求,而这一点对于准确把握更广泛的上下文、制定有效解决方案至关重要。基于此,我们提出RepoGraph——一种为现代AI软件工程方案管理仓库级结构的插件模块。RepoGraph能够提供所需的引导,充当AI软件工程师的全仓库导航工具。我们在SWE-bench基准上对RepoGraph进行评估,将其接入两类技术路线的四种不同方法中,结果显示RepoGraph大幅提升了所有系统的性能,在开源框架中创下新的最优水平。我们还在另一个仓库级编码基准CrossCodeEval上进行测试,验证了RepoGraph的可扩展性与灵活性。我们的代码可在https://github.com/ozyyshr/RepoGraph获取。

英文摘要:

Large Language Models (LLMs) excel in code generation yet struggle with modern AI software engineering tasks. Unlike traditional function-level or file-level coding tasks, AI software engineering requires not only basic coding proficiency but also advanced skills in managing and interacting with code repositories. However, existing methods often overlook the need for repository-level code understanding, which is crucial for accurately grasping the broader context and developing effective solutions. On this basis, we present RepoGraph, a plug-in module that manages a repository-level structure for modern AI software engineering solutions. RepoGraph offers the desired guidance and serves as a repository-wide navigation for AI software engineers. We evaluate RepoGraph on the SWE-bench by plugging it into four different methods of two lines of approaches, where RepoGraph substantially boosts the performance of all systems, leading to a new state-of-the-art among open-source frameworks. Our analyses also demonstrate the extensibility and flexibility of RepoGraph by testing on another repo-level coding benchmark, CrossCodeEval. Our code is available at https://github.com/ozyyshr/RepoGraph.

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

↑