atlas

Research map / Large language models / Agents, code and math

IaC-Eval: A Code Generation Benchmark for Cloud Infrastructure-as-Code Programs

NeurIPS 2024 · Large language models › Agents, code and math · approach: Neural program synthesis and transpilation · 14 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces IaC-Eval, a 458-scenario benchmark for generating AWS Terraform IaC programs, checked by compile-time Terraform plan and OPA Rego intent specifications, and finds that contemporary LLMs score poorly (GPT-4 pass@1 19.36%).

Problem

LLMs may help write infrastructure-as-code, but no benchmark exists to measure their ability to generate IaC programs (Terraform/HCL) that meet user infrastructure intent without deployment.

Approach

A benchmark that pairs natural-language IaC problems with human-written Rego intent specifications and checks generated Terraform via terraform plan plus OPA policy evaluation, avoiding costly cloud deployment while accounting for multiple valid configurations.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add few-shot prompting (ablation)GPT-4 · IaC-Evalpass@1 accuracy: 19.36% -> 10.64%Hurt
Add chain-of-thought prompting (ablation)GPT-4 · IaC-Evalpass@1 accuracy: 19.36% -> 9.31%Hurt
Add two-turn interpreter feedback (ablation)Top-4 models on IaC-Eval · IaC-Evalpass@1 accuracy: +5.5% on averageHelped
Add retrieval-augmented generation (ablation)Evaluated models on IaC-Eval · IaC-Evalpass@1 accuracy: +6.14% average increaseHelped
Add intent specifications to Terraform compilation checks (ablation)LLM-generated IaC programs · IaC-Evalfalse positives removed: over ≈50%Helped
Increase IaC problem difficulty (ablation)Evaluated LLMs · IaC-Evalaverage scoreHurt

Surprising findings

Limitations

Experimental setup

Datasets: IaC-Eval

Benchmarks: IaC-Eval EvalPlus

Metrics: pass@1 pass@k BLEU CodeBERTScore LLM-judge precision

Baselines: GPT-3.5-turbo WizardCoder-33B-V1.1 Magicoder-S-CL-7B Gemini 1.0 Pro CodeLlama Instruct (7B/13B/34B) BLEU CodeBERTScore LLM-as-a-judge

Builds on: HumanEval EvalPlus OPA Rego Terraform

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy