Evaluating Agents on DevOps and Infrastructure Tasks With Real Verification
Evaluating Agents on DevOps and Infrastructure Tasks With Real Verification
DevOps and infrastructure tasks are among the most consequential things an AI agent can attempt. A miswritten Terraform plan silently destroys a production database. A broken CI/CD pipeline stalls a release. A misconfigured IAM policy opens an attack surface. Evaluating agents on DevOps and infrastructure tasks with real verification is not an academic exercise: it is the only way to know whether an agent is safe to deploy in an operational context. This post gives evals engineers and post-training researchers a concrete framework for designing, verifying, and calibrating those evaluations.
Answer Capsule: Evaluating agents on DevOps and infrastructure tasks requires execution-backed verification: the agent's output must be applied to an ephemeral environment and checked against a programmatic oracle (exit codes, state diffs, policy linting, cost assertions). Rubric-only or LLM-as-judge evaluation is insufficient because infrastructure correctness is binary at the system level and the failure modes are often silent. Difficulty must be calibrated empirically per model and per task class, not assumed.
Why LLM-as-Judge Fails for Infrastructure Evaluation
LLM-as-judge evaluation fails for infrastructure tasks because correctness is not a matter of prose quality or logical coherence: it is a matter of system state. A Terraform configuration that reads correctly may fail to apply. A shell script that looks idiomatic may leave a service in a degraded state. A Kubernetes manifest that passes a schema validator may schedule a pod that crashes on startup.
The gap between syntactically plausible and operationally correct is where frontier models most often fail on infrastructure tasks. An LLM judge, lacking access to the execution environment, cannot close that gap. It evaluates the artifact, not the outcome.
This is the same structural problem that makes rubric-only evaluation unreliable for physics or circuit design tasks. As discussed in the context of simulator-backed verification for physics reward oracles, the verifier must be grounded in the same physical or computational reality as the task. For infrastructure, that reality is an ephemeral execution environment.
What Real Verification Means for DevOps Agent Evals
Real verification means the agent's output is executed and the resulting system state is checked against a defined oracle. The oracle is not a human reading the output: it is a programmatic assertion about what the world looks like after the agent acts.
A practical verification stack for infrastructure agent evaluation includes four layers:
Syntax and schema validation - Terraform validate, YAML schema checks, Dockerfile linting. Necessary but not sufficient. A task that only requires passing this layer is not a hard task.
Dry-run or plan execution - Terraform plan, Helm dry-run, kubectl diff. Catches resource conflicts, missing variables, provider errors. Still does not confirm runtime behavior.
Ephemeral environment apply - The configuration is applied to a real or containerized environment. Exit codes, resource state, and service health are checked. This is the minimum bar for a credible eval.
Behavioral assertion - After apply, the environment is probed: an HTTP endpoint returns the expected status code, a database migration completes, a security group blocks the expected port. This layer distinguishes a working deployment from a technically applied but functionally broken one.
Tasks that only require layers one and two are saturated by current frontier models. Layers three and four are where meaningful difficulty lives.
Task Taxonomy: What DevOps Evals Should Cover
Infrastructure agent evaluation is not a single task class. The failure modes differ by subdomain, and a benchmark that covers only one subdomain will produce a misleading capability picture.
Task Class | Verification Method | Primary Failure Mode |
|---|---|---|
IaC authoring (Terraform, Pulumi) | Plan + ephemeral apply + state assertion | Implicit dependency ordering; provider version drift |
CI/CD pipeline configuration | Pipeline execution in sandboxed runner; artifact presence check | Secret injection errors; conditional step logic failures |
Container and orchestration | Docker build + run; kubectl apply + pod readiness probe | Base image assumptions; resource limit misconfiguration |
IAM and policy authoring | Policy linting (e.g., AWS IAM Access Analyzer); privilege escalation simulation | Overly permissive wildcards; missing condition keys |
Incident diagnosis and remediation | Injected fault + agent action log + state recovery assertion | Symptom-to-cause reasoning errors; incomplete rollback |
Monitoring and alerting configuration | Metric injection + alert firing check | Threshold calibration errors; missing label selectors |
Each row requires a different verifier design. Reusing one verification approach across all task classes produces a benchmark that is easy to game and hard to interpret.
Difficulty Calibration for Infrastructure Agent Tasks
Difficulty in infrastructure evals is not a property of the task description alone. It is a function of the task, the agent scaffold, and the model being evaluated, measured at a specific point in time. A task that stumps a model today may be solved reliably after one post-training cycle.
The standard empirical approach is pass@k: estimate the probability that at least one of k independent agent runs produces a verified correct outcome. For infrastructure tasks, k is typically small (3-10) because environment setup and teardown are expensive. A task where pass@1 exceeds 0.80 for a frontier model is not a hard task for that model at that date.
Calibration protocol for a new infrastructure task class:
Author 20-30 tasks with expert practitioners. Do not use model-generated tasks as the primary source: they cluster around patterns the model already handles well.
Run each task against two or three frontier models with a fixed scaffold. Record pass@1 and pass@3.
Discard tasks where pass@1 exceeds 0.75 for all models tested: these are not useful for training or evaluation at the frontier.
Retain tasks where pass@1 is below 0.40 for all models tested, and where expert practitioners solve them reliably. These are the high-signal tasks.
Re-calibrate after each major model release. Difficulty drifts.
The same calibration logic applies to code review and bug localization tasks, as explored in the analysis of evaluating code review and bug localization for LLM agents. Infrastructure tasks share the same verification challenge: the oracle must be grounded in execution, not surface plausibility.
Worked Example: Terraform IAM Policy Task
Illustrative example (numbers are plausible but constructed for illustration):
Task prompt (condensed): Author a Terraform configuration that creates an AWS IAM role for a Lambda function. The role must allow the function to read from a specific S3 bucket and write to a specific DynamoDB table. It must not allow any other S3 or DynamoDB actions. The role must include a trust policy scoped to the Lambda service principal only.
Verifier design:
Layer 1:
terraform validatepasses with no errors.Layer 2:
terraform planagainst a sandboxed AWS account shows exactly two policy attachments and one role resource, no additional resources.Layer 3:
terraform applycompletes. AWS IAM Access Analyzer evaluates the resulting policy. The analyzer flags zero external access findings.Layer 4: A test Lambda invocation with the role can read from the target bucket and write to the target table. An invocation attempting to list all S3 buckets returns an access denied error.
Observed failure pattern (illustrative): In calibration runs across several frontier models, the most common failure at layer four was the use of resource wildcards (arn:aws:s3:::*) in the S3 read policy, which passed layers one through three but failed the behavioral assertion. A secondary failure was omitting the sts:AssumeRole action from the trust policy, which caused layer three to fail silently in some provider versions.
Illustrative pass@1 results: 0.45 for the best-performing model tested, 0.20 for the median model. This places the task in the high-signal range for frontier evaluation.
Common Failure Modes in Infrastructure Agent Evaluation
1. Verification stops at syntax. The eval checks that the configuration is valid, not that it works. Detection: run the configuration in an ephemeral environment and check exit codes. Fix: add at least one behavioral assertion per task.
2. Environment state leaks between tasks. A previous agent run leaves residual resources that cause the next task to pass or fail for the wrong reason. Detection: compare resource state before and after each run against a known baseline. Fix: use ephemeral environments with full teardown between runs; assert on diff, not absolute state.
3. Tasks cluster around common templates. If tasks are generated from documentation examples or common tutorials, frontier models have likely seen them in pre-training. Detection: run tasks against a frontier model before including them in the benchmark; high pass@1 on first attempt is a contamination signal. Fix: author tasks from practitioner experience, not from public documentation patterns. Task provenance matters as much as task difficulty.
4. Rubrics reward verbosity over correctness. When human reviewers score agent outputs on a rubric without executing the configuration, verbose and confident outputs score higher than terse but correct ones. Detection: compare rubric scores to execution outcomes; low correlation is a rubric validity problem. Fix: ground the rubric in execution outcomes; use rubric scores only for dimensions that cannot be verified programmatically (e.g., explanation clarity, security rationale).
5. Difficulty is assumed, not measured. Task authors rate difficulty based on their own judgment rather than empirical pass@k. This produces benchmarks that are either too easy (saturated) or too hard (no training signal). Fix: calibrate empirically before releasing the benchmark. The method is described above.
6. Incident diagnosis tasks lack reproducible fault injection. If the injected fault is not deterministic, two runs of the same task may present different symptoms, making pass@k estimates unreliable. Detection: replay the fault injection and confirm the agent sees identical inputs. Fix: use infrastructure-as-code to define the fault state; version-control the fault configuration alongside the task.
The relationship between automated step verification and expert-labeled steps is a recurring design question in complex agent evals. The trade-offs are examined in detail in the analysis of automated step verification versus expert step labels.
Where This Approach Breaks Down
Execution-backed verification is expensive. Ephemeral cloud environments cost real money and take real time to provision and tear down. For large-scale post-training data generation, the per-task cost of a full apply-and-assert cycle may be prohibitive. In those cases, teams often use layer-two verification (plan or dry-run) for data generation and reserve layer-three and layer-four verification for evaluation only. This is a defensible trade-off, but it means training signal and evaluation signal are not perfectly aligned.
Verification also cannot cover every correctness dimension. An IAM policy that passes all behavioral assertions may still be poorly structured for maintainability, or may not follow the principle of least privilege in ways that are not captured by the test cases. Expert review remains necessary for dimensions that are real but not programmatically assertable.
Finally, infrastructure tasks are tightly coupled to provider versions and API surface. A task that is hard today may become trivially solvable if a provider adds a higher-level abstraction. Benchmark maintenance is not optional: it is a continuous process.
Frequently Asked Questions
What is the minimum verification bar for a credible infrastructure agent eval?
The minimum bar is ephemeral environment apply with at least one behavioral assertion beyond exit code zero. Syntax validation and dry-run checks are necessary preprocessing steps, not verification. An eval that stops at plan output is measuring the agent's ability to generate plausible-looking configurations, not to produce working infrastructure.
How do you prevent environment state from contaminating pass@k estimates?
Use fully ephemeral environments provisioned from a known baseline for each run. Assert on the diff between pre-run and post-run state, not on absolute state. Version-control the baseline definition. Any resource present before the agent runs that is also present after must be excluded from the correctness assertion.
Can synthetic tasks work for infrastructure evals?
Synthetic tasks generated from documentation or model output tend to cluster around patterns already well-represented in pre-training data. They are useful for coverage testing but produce inflated pass rates for frontier models. High-signal tasks for frontier evaluation require practitioner authorship: tasks drawn from real operational problems that do not appear verbatim in public corpora.
How should difficulty be reported in an infrastructure benchmark?
Report pass@1 and pass@k for each task class, broken down by model family and scaffold, with the evaluation date stated. Do not report a single aggregate difficulty score: it obscures the task-class variation that is most useful for post-training decisions. Difficulty drifts as models improve; a benchmark without a versioned difficulty measurement is not reproducible.
When is expert step labeling necessary in addition to outcome verification?
Expert step labeling is necessary when you need a process reward signal for training, not just an outcome signal for evaluation. Outcome verification tells you whether the agent succeeded; step labels tell you which reasoning steps were correct along the way. For infrastructure tasks, step labels are most valuable for incident diagnosis tasks where the correct diagnostic path matters, not just the final remediation action.
How do IAM and policy tasks differ from other infrastructure task classes?
IAM tasks have a security-critical correctness dimension that is not fully captured by functional behavioral assertions. A policy can be functionally correct (the intended action is permitted) while being dangerously over-permissive (unintended actions are also permitted). Verification must include negative-case assertions: confirm that the agent's policy blocks actions it should block, not only that it permits actions it should permit.
What This Means in Practice
Infrastructure is one of the highest-stakes domains for AI agents. The evaluation frameworks that work for math, code generation, or document summarization do not transfer cleanly. Execution-backed verification, ephemeral environments, and empirically calibrated difficulty are not optional refinements: they are the baseline for a credible eval. Teams that skip them will measure the wrong thing and train toward the wrong behavior.
The domain-specific failure modes described here, wildcard policy errors, state leakage, template clustering, are not hypothetical. They are the operational realities that emerge when you run these evals at scale. Knowing them in advance shortens the design cycle considerably. For domain-specific reward model evaluation more broadly, the considerations around expert judgment are explored in the post on evaluating domain-specific reward models with expert judgments.
If you are building evals or RL environments for DevOps, infrastructure, or adjacent engineering domains, get in touch with Chiron Datalabs.
Have questions or want personalised guidance? Contact us and we'll be happy to help.
DevOps and infrastructure tasks are among the most consequential things an AI agent can attempt. A miswritten Terraform plan silently destroys a production database. A broken CI/CD pipeline stalls a release. A misconfigured IAM policy opens an attack surface. Evaluating agents on DevOps and infrastructure tasks with real verification is not an academic exercise: it is the only way to know whether an agent is safe to deploy in an operational context. This post gives evals engineers and post-training researchers a concrete framework for designing, verifying, and calibrating those evaluations.
Answer Capsule: Evaluating agents on DevOps and infrastructure tasks requires execution-backed verification: the agent's output must be applied to an ephemeral environment and checked against a programmatic oracle (exit codes, state diffs, policy linting, cost assertions). Rubric-only or LLM-as-judge evaluation is insufficient because infrastructure correctness is binary at the system level and the failure modes are often silent. Difficulty must be calibrated empirically per model and per task class, not assumed.
Why LLM-as-Judge Fails for Infrastructure Evaluation
LLM-as-judge evaluation fails for infrastructure tasks because correctness is not a matter of prose quality or logical coherence: it is a matter of system state. A Terraform configuration that reads correctly may fail to apply. A shell script that looks idiomatic may leave a service in a degraded state. A Kubernetes manifest that passes a schema validator may schedule a pod that crashes on startup.
The gap between syntactically plausible and operationally correct is where frontier models most often fail on infrastructure tasks. An LLM judge, lacking access to the execution environment, cannot close that gap. It evaluates the artifact, not the outcome.
This is the same structural problem that makes rubric-only evaluation unreliable for physics or circuit design tasks. As discussed in the context of simulator-backed verification for physics reward oracles, the verifier must be grounded in the same physical or computational reality as the task. For infrastructure, that reality is an ephemeral execution environment.
What Real Verification Means for DevOps Agent Evals
Real verification means the agent's output is executed and the resulting system state is checked against a defined oracle. The oracle is not a human reading the output: it is a programmatic assertion about what the world looks like after the agent acts.
A practical verification stack for infrastructure agent evaluation includes four layers:
Syntax and schema validation - Terraform validate, YAML schema checks, Dockerfile linting. Necessary but not sufficient. A task that only requires passing this layer is not a hard task.
Dry-run or plan execution - Terraform plan, Helm dry-run, kubectl diff. Catches resource conflicts, missing variables, provider errors. Still does not confirm runtime behavior.
Ephemeral environment apply - The configuration is applied to a real or containerized environment. Exit codes, resource state, and service health are checked. This is the minimum bar for a credible eval.
Behavioral assertion - After apply, the environment is probed: an HTTP endpoint returns the expected status code, a database migration completes, a security group blocks the expected port. This layer distinguishes a working deployment from a technically applied but functionally broken one.
Tasks that only require layers one and two are saturated by current frontier models. Layers three and four are where meaningful difficulty lives.
Task Taxonomy: What DevOps Evals Should Cover
Infrastructure agent evaluation is not a single task class. The failure modes differ by subdomain, and a benchmark that covers only one subdomain will produce a misleading capability picture.
Task Class | Verification Method | Primary Failure Mode |
|---|---|---|
IaC authoring (Terraform, Pulumi) | Plan + ephemeral apply + state assertion | Implicit dependency ordering; provider version drift |
CI/CD pipeline configuration | Pipeline execution in sandboxed runner; artifact presence check | Secret injection errors; conditional step logic failures |
Container and orchestration | Docker build + run; kubectl apply + pod readiness probe | Base image assumptions; resource limit misconfiguration |
IAM and policy authoring | Policy linting (e.g., AWS IAM Access Analyzer); privilege escalation simulation | Overly permissive wildcards; missing condition keys |
Incident diagnosis and remediation | Injected fault + agent action log + state recovery assertion | Symptom-to-cause reasoning errors; incomplete rollback |
Monitoring and alerting configuration | Metric injection + alert firing check | Threshold calibration errors; missing label selectors |
Each row requires a different verifier design. Reusing one verification approach across all task classes produces a benchmark that is easy to game and hard to interpret.
Difficulty Calibration for Infrastructure Agent Tasks
Difficulty in infrastructure evals is not a property of the task description alone. It is a function of the task, the agent scaffold, and the model being evaluated, measured at a specific point in time. A task that stumps a model today may be solved reliably after one post-training cycle.
The standard empirical approach is pass@k: estimate the probability that at least one of k independent agent runs produces a verified correct outcome. For infrastructure tasks, k is typically small (3-10) because environment setup and teardown are expensive. A task where pass@1 exceeds 0.80 for a frontier model is not a hard task for that model at that date.
Calibration protocol for a new infrastructure task class:
Author 20-30 tasks with expert practitioners. Do not use model-generated tasks as the primary source: they cluster around patterns the model already handles well.
Run each task against two or three frontier models with a fixed scaffold. Record pass@1 and pass@3.
Discard tasks where pass@1 exceeds 0.75 for all models tested: these are not useful for training or evaluation at the frontier.
Retain tasks where pass@1 is below 0.40 for all models tested, and where expert practitioners solve them reliably. These are the high-signal tasks.
Re-calibrate after each major model release. Difficulty drifts.
The same calibration logic applies to code review and bug localization tasks, as explored in the analysis of evaluating code review and bug localization for LLM agents. Infrastructure tasks share the same verification challenge: the oracle must be grounded in execution, not surface plausibility.
Worked Example: Terraform IAM Policy Task
Illustrative example (numbers are plausible but constructed for illustration):
Task prompt (condensed): Author a Terraform configuration that creates an AWS IAM role for a Lambda function. The role must allow the function to read from a specific S3 bucket and write to a specific DynamoDB table. It must not allow any other S3 or DynamoDB actions. The role must include a trust policy scoped to the Lambda service principal only.
Verifier design:
Layer 1:
terraform validatepasses with no errors.Layer 2:
terraform planagainst a sandboxed AWS account shows exactly two policy attachments and one role resource, no additional resources.Layer 3:
terraform applycompletes. AWS IAM Access Analyzer evaluates the resulting policy. The analyzer flags zero external access findings.Layer 4: A test Lambda invocation with the role can read from the target bucket and write to the target table. An invocation attempting to list all S3 buckets returns an access denied error.
Observed failure pattern (illustrative): In calibration runs across several frontier models, the most common failure at layer four was the use of resource wildcards (arn:aws:s3:::*) in the S3 read policy, which passed layers one through three but failed the behavioral assertion. A secondary failure was omitting the sts:AssumeRole action from the trust policy, which caused layer three to fail silently in some provider versions.
Illustrative pass@1 results: 0.45 for the best-performing model tested, 0.20 for the median model. This places the task in the high-signal range for frontier evaluation.
Common Failure Modes in Infrastructure Agent Evaluation
1. Verification stops at syntax. The eval checks that the configuration is valid, not that it works. Detection: run the configuration in an ephemeral environment and check exit codes. Fix: add at least one behavioral assertion per task.
2. Environment state leaks between tasks. A previous agent run leaves residual resources that cause the next task to pass or fail for the wrong reason. Detection: compare resource state before and after each run against a known baseline. Fix: use ephemeral environments with full teardown between runs; assert on diff, not absolute state.
3. Tasks cluster around common templates. If tasks are generated from documentation examples or common tutorials, frontier models have likely seen them in pre-training. Detection: run tasks against a frontier model before including them in the benchmark; high pass@1 on first attempt is a contamination signal. Fix: author tasks from practitioner experience, not from public documentation patterns. Task provenance matters as much as task difficulty.
4. Rubrics reward verbosity over correctness. When human reviewers score agent outputs on a rubric without executing the configuration, verbose and confident outputs score higher than terse but correct ones. Detection: compare rubric scores to execution outcomes; low correlation is a rubric validity problem. Fix: ground the rubric in execution outcomes; use rubric scores only for dimensions that cannot be verified programmatically (e.g., explanation clarity, security rationale).
5. Difficulty is assumed, not measured. Task authors rate difficulty based on their own judgment rather than empirical pass@k. This produces benchmarks that are either too easy (saturated) or too hard (no training signal). Fix: calibrate empirically before releasing the benchmark. The method is described above.
6. Incident diagnosis tasks lack reproducible fault injection. If the injected fault is not deterministic, two runs of the same task may present different symptoms, making pass@k estimates unreliable. Detection: replay the fault injection and confirm the agent sees identical inputs. Fix: use infrastructure-as-code to define the fault state; version-control the fault configuration alongside the task.
The relationship between automated step verification and expert-labeled steps is a recurring design question in complex agent evals. The trade-offs are examined in detail in the analysis of automated step verification versus expert step labels.
Where This Approach Breaks Down
Execution-backed verification is expensive. Ephemeral cloud environments cost real money and take real time to provision and tear down. For large-scale post-training data generation, the per-task cost of a full apply-and-assert cycle may be prohibitive. In those cases, teams often use layer-two verification (plan or dry-run) for data generation and reserve layer-three and layer-four verification for evaluation only. This is a defensible trade-off, but it means training signal and evaluation signal are not perfectly aligned.
Verification also cannot cover every correctness dimension. An IAM policy that passes all behavioral assertions may still be poorly structured for maintainability, or may not follow the principle of least privilege in ways that are not captured by the test cases. Expert review remains necessary for dimensions that are real but not programmatically assertable.
Finally, infrastructure tasks are tightly coupled to provider versions and API surface. A task that is hard today may become trivially solvable if a provider adds a higher-level abstraction. Benchmark maintenance is not optional: it is a continuous process.
Frequently Asked Questions
What is the minimum verification bar for a credible infrastructure agent eval?
The minimum bar is ephemeral environment apply with at least one behavioral assertion beyond exit code zero. Syntax validation and dry-run checks are necessary preprocessing steps, not verification. An eval that stops at plan output is measuring the agent's ability to generate plausible-looking configurations, not to produce working infrastructure.
How do you prevent environment state from contaminating pass@k estimates?
Use fully ephemeral environments provisioned from a known baseline for each run. Assert on the diff between pre-run and post-run state, not on absolute state. Version-control the baseline definition. Any resource present before the agent runs that is also present after must be excluded from the correctness assertion.
Can synthetic tasks work for infrastructure evals?
Synthetic tasks generated from documentation or model output tend to cluster around patterns already well-represented in pre-training data. They are useful for coverage testing but produce inflated pass rates for frontier models. High-signal tasks for frontier evaluation require practitioner authorship: tasks drawn from real operational problems that do not appear verbatim in public corpora.
How should difficulty be reported in an infrastructure benchmark?
Report pass@1 and pass@k for each task class, broken down by model family and scaffold, with the evaluation date stated. Do not report a single aggregate difficulty score: it obscures the task-class variation that is most useful for post-training decisions. Difficulty drifts as models improve; a benchmark without a versioned difficulty measurement is not reproducible.
When is expert step labeling necessary in addition to outcome verification?
Expert step labeling is necessary when you need a process reward signal for training, not just an outcome signal for evaluation. Outcome verification tells you whether the agent succeeded; step labels tell you which reasoning steps were correct along the way. For infrastructure tasks, step labels are most valuable for incident diagnosis tasks where the correct diagnostic path matters, not just the final remediation action.
How do IAM and policy tasks differ from other infrastructure task classes?
IAM tasks have a security-critical correctness dimension that is not fully captured by functional behavioral assertions. A policy can be functionally correct (the intended action is permitted) while being dangerously over-permissive (unintended actions are also permitted). Verification must include negative-case assertions: confirm that the agent's policy blocks actions it should block, not only that it permits actions it should permit.
What This Means in Practice
Infrastructure is one of the highest-stakes domains for AI agents. The evaluation frameworks that work for math, code generation, or document summarization do not transfer cleanly. Execution-backed verification, ephemeral environments, and empirically calibrated difficulty are not optional refinements: they are the baseline for a credible eval. Teams that skip them will measure the wrong thing and train toward the wrong behavior.
The domain-specific failure modes described here, wildcard policy errors, state leakage, template clustering, are not hypothetical. They are the operational realities that emerge when you run these evals at scale. Knowing them in advance shortens the design cycle considerably. For domain-specific reward model evaluation more broadly, the considerations around expert judgment are explored in the post on evaluating domain-specific reward models with expert judgments.
If you are building evals or RL environments for DevOps, infrastructure, or adjacent engineering domains, get in touch with Chiron Datalabs.
Have questions or want personalised guidance? Contact us and we'll be happy to help.