The recent improvement in code generation capabilities due to the use of large language models has mainly benefited general purpose programming languages. Domain specific languages, such as the ones used for IT Automation, have received far less attention, despite involving many active developers and being an essential component of modern cloud platforms. This work focuses on the generation of Ansible-YAML, a widely used markup language for IT Automation. We present Ansible Wisdom, a natural-language to Ansible-YAML code generation tool, aimed at improving IT automation productivity. Ansible Wisdom is a transformer-based model, extended by training with a new dataset containing Ansible-YAML. We also develop two novel performance metrics for YAML and Ansible to capture the specific characteristics of this domain. Results show that Ansible Wisdom can accurately generate Ansible script from natural language prompts with performance comparable or better than existing state of the art code generation models.
翻译:近年来,由于大语言模型的应用,代码生成能力取得了显著提升,但这一进步主要惠及通用编程语言。领域特定语言(如IT自动化领域所使用的语言)尽管涉及大量活跃开发者且是现代云平台的关键组成部分,却鲜少受到关注。本研究聚焦于Ansible-YAML——一种IT自动化领域广泛使用的标记语言的生成。我们提出了Ansible Wisdom,这是一种面向自然语言到Ansible-YAML代码生成的工具,旨在提升IT自动化效率。Ansible Wisdom基于Transformer架构,通过引入包含Ansible-YAML的新数据集进行扩展训练。此外,我们针对YAML和Ansible开发了两项创新性能指标,以捕捉该领域的特定特征。实验结果表明,Ansible Wisdom能够从自然语言提示中准确生成Ansible脚本,其性能与现有最先进的代码生成模型相当或更优。