5.1K

Designing reliable agent evals

Combining deterministic graders, mocked-tool CI workflows, replayable traces, incident-to-eval loops, and canary rollouts so agent changes ship without silent regressions.

The four-stage pyramid

An agent change ships safely when each stage of the pyramid only has to catch what the stage below it already ruled out. Skip a stage and the one above drowns.

StagePatternsQuestion It AnswersSpeed and Cost
1. Deterministic checksStructured Output Specification, Rich Feedback Loops, Deterministic Grader in the Loop, Rendered UI Finish GateDoes the output have the shape and the properties you can count?Schema and counted checks cost no tokens. The agent’s revision pass and a UI render take time
2. Mocked-tool and replay CIWorkflow Evals with Mocked Tools, Out-of-Process Provider-Boundary ReplayDoes the whole workflow behave when prompt, tools, and model interact?Workflow evals spend model calls on every PR. Replays cost nothing and need no key
3. Grader and rubric evalsSkill Activation as Precision/Recall Measurement, Evidence-Layered Evaluation for Interactive Agents, Output Verification Loop, Anti-Reward-Hacking Grader DesignIs the behavior good, not only valid?Model calls per row, plus labelling and instrumentation time
4. Production feedback and rolloutLLM Observability, Incident-to-Eval Synthesis, Canary Rollout and Automatic RollbackWhat is breaking for real users, and can you get back to a known-good state?Observability spend, triage time, and release orchestration

Stage 1: Deterministic checks

Start with what a machine can verify without a model in the loop.

  • Structured Output Specification constrains output with schemas, so a parser or a downstream system can rely on it
  • Rich Feedback Loops returns compiler errors, test failures, and lint output after each tool call, so the agent has something specific to fix
  • Deterministic Grader in the Loop replaces the LLM-as-judge in a self-review loop with a scorer that returns the raw counts behind each sub-score. It is reproducible, so you can assert it in a test or a CI gate
  • Rendered UI Finish Gate checks an agent-built interface against its design contract, required states, and rendered output before merge

Stage 2: Mocked-tool and replay CI

Then test the pieces together, with no side effects and no bill.

  • Workflow Evals with Mocked Tools runs the complete workflow against mocked tools in CI. It checks which tools were called, plus agent-as-judge quality criteria
  • Out-of-Process Provider-Boundary Replay captures a run at the model-provider HTTP boundary from outside the process, then serves those bytes back. The agent re-executes its own logic with no provider call, so replays belong in CI and in bug reports

Know the limit of replay: blocking provider egress is not sandboxing. The agent still executes its recorded tool calls for real.

Stage 3: Grader and rubric evals

Now ask whether the behavior is good.

Stage 4: Production feedback and rollout

Finally, let production tell you what the suite missed.

Comparison matrix

Eval TechniqueSpeed and CostWhat It CatchesWhat It Misses
Structured Output SpecificationSchema check with no model callOutput that would break a parser or a downstream systemWhether the content is correct
Rich Feedback LoopsOne model pass per revision; raises runtime and costErrors that a compiler, test suite, or linter can reportProblems with no objective signal to feed back
Deterministic Grader in the LoopOffline, reproducible, no token costThe specific counted property the agent failed, with numbers it can act onEverything you did not think to count. Meaning, truth, and fit for audience. It invites Goodhart
Rendered UI Finish GateRender time plus review timeBroken states and interactions that compile-time checks and source review missIssues that no rule covers, and comparisons that encode reviewer bias
Workflow Evals with Mocked ToolsSlower, spends model calls, and flakesRegressions in prompts and tools together, and which tools were calledMocks that drift from real tools. Too variable to serve as a blocking gate
Out-of-Process Provider-Boundary ReplayFast, no key, no model callBugs that reproduce only in a full sessionPrompt changes, which need a live model. Real side effects, which need a sandbox
Skill Activation as Precision/Recall MeasurementOne model call per row, times replicatesSilent mis-routing and over-triggering across a skill catalogSingle-row verdicts, since only the aggregate is trustworthy. Numbers move with the model version
Evidence-Layered Evaluation for Interactive AgentsStorage and instrumentation overheadFailures that a single pass/fail score hides, for browser and desktop agentsA correct evaluator is not guaranteed. Logs can hold sensitive data
Output Verification LoopOne verification call per output; adds latencyFactual errors that reflection loops missQuality beyond your evidence source. Tight latency budgets
Anti-Reward-Hacking Grader DesignMore code to maintain, and multi-criteria grading takes longer per sampleA model that games the metric: reward rises while real performance does notCriteria that resist a precise definition, such as financial soundness
LLM ObservabilityOngoing platform spend, usually minimal latencyCost, latency, and failure patterns across many runsWhether a run was any good. Traces show what happened, not what should have happened
Incident-to-Eval SynthesisTriage time per incidentFailures that recur after an operational fixAnything before you have traffic and capturable incident data
Canary Rollout and Automatic RollbackRelease orchestration and telemetryRegressions that only appear on live trafficAnything without real-time telemetry and versioned policies

Anti-patterns

LLM-as-judge with no deterministic checks underneath

An LLM judge is non-deterministic, costs tokens, and gives the agent nothing specific to fix. Deterministic Grader in the Loop exists because of this: it replaces the judge with a scorer that returns raw counts, which gives the revision loop a gradient. Reserve the judge for attributes that genuinely need semantic judgment, such as factual correctness or tone for an audience. Workflow Evals with Mocked Tools points at the same problem: judge-based results are too variable to serve as a blocking CI gate.

Testing only the happy path

A suite that checks only the expected output passes on the day before the incident. Three patterns widen it:

Letting graders get reward-hacked

Any metric an agent can read, it will learn to satisfy. The deterministic grader pattern calls this Goodhart risk “real and direct” and advises capping the iterations and keeping the threshold well below the maximum. Anti-Reward-Hacking Grader Design is written for reinforcement learning reward design, and lists “training reward rises while real performance does not” as its warning signal. The same failure appears whenever an agent optimizes against any grader. You cannot harden a grader you never inspect, so traces from LLM Observability are part of the fix.

Never turning production bugs into regression cases

An operational fix without an eval case is a promise to debug the same thing twice. Incident-to-Eval Synthesis names the symptom: incidents recur after they were fixed operationally, and the eval suite drifts away from what production shows. When a regression slips past the suite anyway, Canary Rollout and Automatic Rollback is the last line. It limits the blast radius and shortens time-to-recovery.

Close the loop

The stages form a cycle, not a ladder. Production incidents become eval cases at stage 3. Those cases gate releases, and the next policy change ships behind a canary. Each turn of the cycle moves a failure from “surprised us in production” to “fails a PR check”.

A minimum loop for a new agent:

  1. Constrain the output with a schema
  2. Feed compiler, test, and lint output back after each tool call
  3. Run a mocked-tool workflow eval on every PR, non-blocking at first
  4. Capture traces at the provider boundary, so every bug report is replayable
  5. Instrument production
  6. Turn each incident into an eval case
  7. Ship policy changes behind a canary with automatic rollback

Next steps