// blog

"Evals for agents: stop shipping vibes"

2 min read
  • evals
  • agentic-ai
  • testing

Here's how most teams tune their agents: change the prompt, run the demo scenario twice, squint at the output, merge. Two weeks later a customer hits a case the demo never covered, someone "fixes" the prompt, and a different case silently breaks. This is development by vibes, and agents make it worse than normal LLM work because failures hide inside multi-step trajectories.

The fix is unglamorous: build the eval harness before you tune anything.

What to measure

Agent evals live at three levels, and you need all three:

1. End-to-end task success. Did the agent actually accomplish the goal? This needs a programmatic check per scenario — the ticket got created, the test suite passes, the returned answer contains the right order ID. Binary, cheap to run, brutal, honest.

2. Trajectory quality. Two agents can both succeed while one takes 4 tool calls and the other takes 31. Track steps, tokens, cost, wall-clock, and tool-error rate per scenario. Regressions here are the early warning that your prompt change made the model flail before it made it fail.

3. Judged qualities. For fuzzy dimensions — tone, safety, completeness of a summary — use an LLM judge with a rubric. Judges are noisy, so anchor them: score against a written rubric with examples, use a strong model, and spot-check judge verdicts against human labels until you trust the correlation. An uncalibrated judge is just vibes with extra steps.

Building the scenario set

Start with ten scenarios, not a hundred. Sources, in order of value:

  1. Production failures. Every bug report becomes a scenario. This is the highest-signal data you will ever get, and it's free.
  2. The demo paths you already rely on informally — freeze them into code.
  3. Adversarial cases: ambiguous requests, tools that error, data that contradicts the prompt's assumptions.

Version the scenario set with the code. A prompt change is a diff; its eval run is the review.

The loop that makes it worth it

change → run evals → compare to baseline → merge or revert

The moment this loop exists, agent development stops feeling like alchemy. You'll discover things vibes never show you: that your "improvement" helps 3 scenarios and quietly degrades 5, that the expensive model only beats the cheap one on 2 of 40 cases, that half your failures come from one badly-described tool.

Nondeterminism is real but manageable — run each scenario 3–5 times and compare pass rates, not single runs. A scenario that flips between pass and fail isn't noise to average away; it's usually your most informative test case pointing at a genuine instability.

Start smaller than you think

You don't need a platform. My first harness for a production agent was a 200-line pytest file and a JSON of scenarios. It caught its first regression the same week. Frameworks are adding native support (ADK ships adk eval with recorded sessions as fixtures) — but the tooling matters less than the habit: no prompt change lands without a number attached.

← All posts