arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.17927cs.SEcs.AI
收藏

MAGIS:基于 LLM 的多智能体框架用于 GitHub Issue 解决

MAGIS: LLM-Based Multi-Agent Framework for GitHub Issue Resolution

Fudan University(复旦大学);University of Macau(澳门大学);Sun Yat-sen University(中山大学);Chongqing University(重庆大学);The Chinese University of Hong Kong(香港中文大学)

Wei Tao, Yucheng Zhou, Yanlin Wang, Wenqiang Zhang, Hongyu Zhang, Yu Cheng

AI总结:

针对LLM解决仓库级GitHub Issue的困难,本文提出多智能体框架MAGIS,通过四个专门智能体协作完成规划与编码,在SWE-bench上解决率达13.94%,较直接使用GPT-4提升八倍。

摘要:

在软件开发中,解决 GitHub 仓库中出现的新问题是一项复杂的挑战,不仅涉及引入新代码,还涉及维护现有代码。大型语言模型(LLMs)在代码生成方面展现出潜力,但在解决 GitHub issue 时面临困难,尤其是在仓库级别。为克服这一挑战,我们实证研究了 LLMs 未能解决 GitHub issue 的原因,并分析了主要因素。受实证发现的启发,我们提出了一种基于 LLM 的多智能体框架用于 GitHub Issue 解决,即 MAGIS,由四个为软件演化定制的智能体组成:Manager、Repository Custodian、Developer 和 Quality Assurance Engineer 智能体。该框架利用各智能体在规划和编码过程中的协作,释放 LLMs 解决 GitHub issue 的潜力。在实验中,我们采用 SWE-bench 基准将 MAGIS 与流行的 LLMs 进行比较,包括 GPT-3.5、GPT-4 和 Claude-2。MAGIS 能解决 13.94% 的 GitHub issue,显著优于基线。具体而言,相较于直接应用先进 LLM GPT-4,MAGIS 的解决率提升了八倍。

英文摘要:

In software development, resolving the emergent issues within GitHub repositories is a complex challenge that involves not only the incorporation of new code but also the maintenance of existing code. Large Language Models (LLMs) have shown promise in code generation but face difficulties in resolving Github issues, particularly at the repository level. To overcome this challenge, we empirically study the reason why LLMs fail to resolve GitHub issues and analyze the major factors. Motivated by the empirical findings, we propose a novel LLM-based Multi-Agent framework for GitHub Issue reSolution, MAGIS, consisting of four agents customized for software evolution: Manager, Repository Custodian, Developer, and Quality Assurance Engineer agents. This framework leverages the collaboration of various agents in the planning and coding process to unlock the potential of LLMs to resolve GitHub issues. In experiments, we employ the SWE-bench benchmark to compare MAGIS with popular LLMs, including GPT-3.5, GPT-4, and Claude-2. MAGIS can resolve 13.94% GitHub issues, significantly outperforming the baselines. Specifically, MAGIS achieves an eight-fold increase in resolved ratio over the direct application of GPT-4, the advanced LLM.

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

↑