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自动化效率。该工具基于Transformer架构,并通过包含Ansible-YAML的新数据集进行扩展训练。同时,我们针对YAML与Ansible开发了两项新颖的性能指标,以捕捉该领域的特定特征。实验结果表明,Ansible Wisdom能够从自然语言提示准确生成Ansible脚本,其性能与现有最先进的代码生成模型相当或更优。