GitChameleon 2.0:评估AI代码生成应对Python库版本不兼容的能力
GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilities
AI总结:
本文提出GitChameleon 2.0,用328个带版本条件和可执行单元测试的Python补全问题评估LLM及智能体,发现先进系统成功率仅48%–51%。
摘要:
软件库的快速演进给代码生成带来了相当大的障碍,这要求系统在保持向后兼容性的同时,持续适应频繁的版本更新。尽管现有代码演进基准提供了有价值的洞见,但它们通常缺乏基于执行的评估,无法衡量生成符合特定库版本代码的能力。为解决这一问题,我们提出GitChameleon 2.0,这是一个新颖且经过精心整理的数据集,包含328个Python代码补全问题;每个问题都以特定库版本为条件,并配有可执行的单元测试。GitChameleon 2.0严格评估当代大型语言模型(LLM)、由LLM驱动的智能体、代码助手和RAG系统执行版本条件化代码生成的能力,并通过执行证明功能正确性。我们的广泛评估表明,最先进的系统在该任务上面临重大挑战;企业级模型的基线成功率仅处于48%至51%的区间,凸显了该问题的复杂性。通过提供一个强调代码库动态特性的基于执行的基准,GitChameleon 2.0使人们能够更清晰地理解这一挑战,并帮助指导更具适应性、更可靠的AI代码生成方法的开发。我们在https://github.com/mrcabbage972/GitChameleonBenchmark公开发布数据集和评估代码。
英文摘要:
The rapid evolution of software libraries poses a considerable hurdle for code generation, necessitating continuous adaptation to frequent version updates while preserving backward compatibility. While existing code evolution benchmarks provide valuable insights, they typically lack execution-based evaluation for generating code compliant with specific library versions. To address this, we introduce GitChameleon 2.0, a novel, meticulously curated dataset comprising 328 Python code completion problems, each conditioned on specific library versions and accompanied by executable unit tests. GitChameleon 2.0 rigorously evaluates the capacity of contemporary large language models (LLMs), LLM-powered agents, code assistants, and RAG systems to perform version-conditioned code generation that demonstrates functional accuracy through execution. Our extensive evaluations indicate that state-of-the-art systems encounter significant challenges with this task; enterprise models achieving baseline success rates in the 48-51% range, underscoring the intricacy of the problem. By offering an execution-based benchmark emphasizing the dynamic nature of code libraries, GitChameleon 2.0 enables a clearer understanding of this challenge and helps guide the development of more adaptable and dependable AI code generation methods. We make the dataset and evaluation code publicly available at https://github.com/mrcabbage972/GitChameleonBenchmark.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。