以部署为中心的基础设施即代码生成:通过LLM赋能的DevOps模拟实现失败、学习、细化和成功
Deployability-Centric Infrastructure-as-Code Generation: Fail, Learn, Refine, and Succeed through LLM-Empowered DevOps Simulation
AI总结:
本文提出IaCGen框架,通过迭代反馈机制提升IaC模板的部署性,实验表明其在10次迭代内可使模板部署成功率提升至91.6%,并进一步通过人工反馈将性能提升至90%以上。
摘要:
基础设施即代码(IaC)生成在自动化云基础设施部署方面具有重要潜力。近年来,大型语言模型(LLMs)的进步为通过自然语言描述生成可部署的基础设施模板提供了民主化IaC开发的机会。然而,当前的评估仅关注语法正确性,而忽略了部署性,这是IaC配置文件实用性的关键衡量标准。六种最先进的LLMs在部署性上表现不佳,在首次尝试中仅能达到20.8~30.2%的部署成功率。在本文中,我们构建了DPIaC-Eval,第一个以部署性为中心的IaC模板基准,包含153个真实世界场景跨58种独特服务。此外,我们提出了一种基于LLM的以部署性为中心的框架,称为IaCGen,它使用包含格式验证、语法检查和实时部署阶段的迭代反馈机制,从而更贴近真实的DevOps工作流。结果表明,IaCGen可以将所有评估模型生成的IaC模板在前10次迭代中使部署性达到54.6~91.6%。此外,通过提供直接指导部署性错误的人工反馈,可以进一步将性能提升到所有评估LLMs的90%以上。此外,我们还探讨了生成的IaC模板在用户意图对齐和安全合规方面的可信度。较差的表现(25.2%的用户需求覆盖和8.4%的安全合规率)表明在这一领域仍需要持续的研究。
英文摘要:
Infrastructure-as-Code (IaC) generation holds significant promise for automating cloud infrastructure provisioning. Recent advances in Large Language Models (LLMs) present a promising opportunity to democratize IaC development by generating deployable infrastructure templates from natural language descriptions. However, current evaluation focuses on syntactic correctness while ignoring deployability, the critical measure of the utility of IaC configuration files. Six state-of-the-art LLMs performed poorly on deployability, achieving only 20.8$\sim$30.2% deployment success rate on the first attempt. In this paper, we construct DPIaC-Eval, the first deployability-centric IaC template benchmark consisting of 153 real-world scenarios cross 58 unique services. Also, we propose an LLM-based deployability-centric framework, dubbed IaCGen, that uses iterative feedback mechanism encompassing format verification, syntax checking, and live deployment stages, thereby closely mirroring the real DevOps workflows. Results show that IaCGen can make 54.6$\sim$91.6% generated IaC templates from all evaluated models deployable in the first 10 iterations. Additionally, human-in-the-loop feedback that provide direct guidance for the deployability errors, can further boost the performance to over 90% passItr@25 on all evaluated LLMs. Furthermore, we explore the trustworthiness of the generated IaC templates on user intent alignment and security compliance. The poor performance (25.2% user requirement coverage and 8.4% security compliance rate) indicates a critical need for continued research in this domain.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。