METHOD FOR GENERATING CLOUD INFRASTRUCTURE BASED ON HIGH-LEVEL NATURAL LANGUAGE DESCRIPTIONS AND LARGE LANGUAGE MODELS - KHOMUTNYK, DMYTRO; PUKACH, ANDRII (Herald of Khmelnytskyi National University. Technical sciences, 2025)
This article investigates the problem of automated generation of cloud infrastructure descriptions from natural language user input. Traditional approaches rely on Infrastructure-as-Code (IaC) tools such as Terraform, which require precise syntax, domain-specific knowledge, and familiarity with numerous low-level configuration parameters. As a result, defining even relatively simple infrastructure components can be complex and error-prone, especially for users without deep technical expertise.The study proposes a method that combines the capabilities of large language models (LLMs) with an intermediate high-level description language. This language reduces code volume, improves readability, and decreases the number of errors during infrastructure generation. A formal model of the process is developed, encompassing natural language query formulation, generation of a structured infrastructure description, and its translation into Terraform code.A comparative evaluation is conducted using three test scenarios of increasing complexity, ranging from the deployment of a single private server to a scalable group of public servers behind a load balancer. The two approaches — direct Terraform generation and generation via the intermediate language — are compared based on several criteria: number of syntax and semantic errors, code length, and resource count. The results show that the intermediate representation reduces errors, shortens the code, and increases generation reliability.The experimental results demonstrate that using the intermediate language significantly reduces the likelihood of both syntactic and semantic errors, lowers code verbosity, and produces more reliable and interpretable configurations. The use of a high-level abstraction also simplifies the learning process for language models, enabling them to generate valid infrastructure code with fewer instructions.The proposed method is relevant for simplifying DevOps processes, infrastructure testing, and integrating generative models into development environments. Future research may include domain-specific model fine-tuning and expansion of the intermediate language with new resource types.
Keywords: cloud infrastructure; artificial neural networks; LLM; infrastructure as code; code generation