arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.06770cs.CLcs.AIcs.SE
收藏

SWE-bench:语言模型能解决真实的 GitHub 问题吗?

SWE-bench: Can Language Models Resolve Real-World GitHub Issues?

Princeton University(普林斯顿大学);University of Chicago(芝加哥大学)

Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, Karthik Narasimhan

AI总结:

本文提出 SWE-bench 评估框架,包含 2,294 个来自真实 GitHub 问题的软件工程任务,发现当前最先进模型(如 Claude 2)仅能解决 1.96% 的问题,揭示了语言模型在复杂代码推理上的局限性。

摘要:

语言模型的发展已经超出了我们有效评估它们的能力,但研究其能力的前沿对于其未来的发展至关重要。我们发现现实世界的软件工程是评估下一代语言模型的一个丰富、可持续且具有挑战性的测试平台。为此,我们引入了 SWE-bench,这是一个评估框架,包含从真实的 GitHub 问题和相应的拉取请求中提取的 2,294 个软件工程问题,涵盖 12 个流行的 Python 代码库。给定一个代码库以及要解决的问题描述,语言模型的任务是编辑代码库以解决该问题。在 SWE-bench 中解决问题通常需要同时理解和协调跨多个函数、类甚至文件的更改,这要求模型与执行环境交互,处理超长上下文,并执行远超传统代码生成任务的复杂推理。我们的评估表明,最先进的专有模型和我们微调的模型 SWE-Llama 只能解决最简单的问题。表现最好的模型 Claude 2 仅能解决 1.96% 的问题。在 SWE-bench 上的进展代表着迈向更实用、更智能、更自主的语言模型的步伐。

英文摘要:

Language models have outpaced our ability to evaluate them effectively, but for their future development it is essential to study the frontier of their capabilities. We find real-world software engineering to be a rich, sustainable, and challenging testbed for evaluating the next generation of language models. To this end, we introduce SWE-bench, an evaluation framework consisting of $2,294$ software engineering problems drawn from real GitHub issues and corresponding pull requests across $12$ popular Python repositories. Given a codebase along with a description of an issue to be resolved, a language model is tasked with editing the codebase to address the issue. Resolving issues in SWE-bench frequently requires understanding and coordinating changes across multiple functions, classes, and even files simultaneously, calling for models to interact with execution environments, process extremely long contexts and perform complex reasoning that goes far beyond traditional code generation tasks. Our evaluations show that both state-of-the-art proprietary models and our fine-tuned model SWE-Llama can resolve only the simplest issues. The best-performing model, Claude 2, is able to solve a mere $1.96$% of the issues. Advances on SWE-bench represent steps towards LMs that are more practical, intelligent, and autonomous.

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

↑