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

SWE-InfraBench:评估语言模型在云基础设施代码上的表现

SWE-InfraBench: Evaluating Language Models on Cloud Infrastructure Code

Amazon Web Services(亚马逊云科技)
Natalia Tarasova, Enrique Balp-Straffon, Aleksei Iancheruk, Yevhenii Sielskyi, Nikita Kozodoi, Liam H. Byrne, Jack Butler, Dayuan Jiang, Marcin Czelej, Andrew A… 展开作者

Natalia Tarasova, Enrique Balp-Straffon, Aleksei Iancheruk, Yevhenii Sielskyi, Nikita Kozodoi, Liam H. Byrne, Jack Butler, Dayuan Jiang, Marcin Czelej, Andrew Ang, Yash Shah, Roi Blanco, Sergei Ivanov

AI总结:

提出SWE-InfraBench基准,通过AWS CDK仓库中的真实代码修改任务评估LLM在云基础设施即代码(IaC)上的能力,发现当前最先进模型成功率仅34%。

摘要:

在云计算中构建基础设施即代码(IaC)是一项关键任务,支撑着现代软件系统的可靠性、可扩展性和安全性。尽管大型语言模型(LLM)在软件工程领域取得了显著进展——这在许多专用基准测试中得到了证明——但它们在开发IaC方面的能力仍未得到充分探索。与现有的IaC基准测试主要集中于声明式范式(如Terraform)并从零开始生成整个代码库不同,我们的基准测试反映了在企业开发中使用命令式工具(如AWS CDK)时常见的增量代码编辑。我们提出了SWE-InfraBench,这是一个多样化的评估数据集,来源于数十个真实的IaC代码库,挑战LLM在AWS CDK仓库中执行逼真的代码修改。每个示例要求模型基于自然语言指令对现有代码库进行更改,并通过提供的测试用例来确定成功与否。这些任务需要对云资源依赖关系和实现模式进行复杂的推理,超越了传统的代码生成挑战。我们的评估结果揭示了当前LLM的显著局限性,表明即使是最先进的系统也在许多任务上挣扎——最佳模型Sonnet 3.7仅在34%的案例中成功,而专门的推理模型如DeepSeek R1的成功率仅为24%。SWE-InfraBench数据集可在以下网址获取:https://www.kaggle.com/datasets/64e59070fd51c0278560b01eb5dc4f3c447d5268cdabe5a350d2969e4413fea5

英文摘要:

Building infrastructure-as-code (IaC) in cloud computing is a critical task, underpinning the reliability, scalability, and security of modern software systems. Despite the remarkable progress of large language models (LLMs) in software engineering -- demonstrated across many dedicated benchmarks -- their capabilities in developing IaC remain underexplored. Unlike existing IaC benchmarks that predominantly center on declarative paradigms such as Terraform and involve generating entire codebases from scratch, our benchmark reflects the incremental code edits common in enterprise development with imperative tools like the AWS CDK. We present SWE-InfraBench, a diverse evaluation dataset sourced from dozens of real-world IaC codebases that challenge LLMs to perform realistic code modifications in AWS CDK repositories. Each example requires models to implement changes to existing codebases based on natural language instructions, with success determined by passing provided test cases. These tasks demand sophisticated reasoning about cloud resource dependencies and implementation patterns beyond conventional code generation challenges. Our evaluation results reveal significant limitations in current LLMs showing that even state-of-the-art systems struggle with many tasks -- the best model, Sonnet 3.7, succeeds in only 34\% of cases, while specialized reasoning models like DeepSeek R1 achieve just 24% success. The SWE-InfraBench dataset is available at: https://www.kaggle.com/datasets/64e59070fd51c0278560b01eb5dc4f3c447d5268cdabe5a350d2969e4413fea5

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

↑