A demo is evidence that an agent worked once.
It is not evidence that the agent works reliably.
That distinction is easy to miss because modern LLMs can produce spectacular demonstrations. Give an agent a difficult task, watch it use several tools, and eventually arrive at a convincing result, and the natural reaction is: it works.
Then change the model, modify the system prompt, update a tool, alter the retrieval pipeline, add a new memory source, or give it a slightly different user request. The behaviour changes.
Now you have a measurement problem.
An evaluation (eval) is a structured way to measure whether an AI system satisfies a defined requirement. For an agent, that requirement may concern the final outcome, the actions taken to reach it, the evidence used, safety constraints, efficiency, or several of these simultaneously.
The central idea is simple:
If you cannot describe how you would detect a regression, you do not yet have a reliable definition of improvement.
An eval is not just a benchmark
The words benchmark and eval are often used interchangeably, but it is useful to distinguish them.
A benchmark normally provides a standardized set of tasks intended to compare systems under a common protocol. An application eval is usually narrower: it asks whether your particular system behaves acceptably on the tasks you actually care about.
A benchmark might tell you that Model A scores higher than Model B on a public task. That can be useful evidence. It does not tell you whether Model A is better for your agent that triages support tickets, edits a codebase, searches scientific literature, or operates a business workflow.
Your agent has its own tools, prompts, state, policies, users, failure modes and definition of success.
So the first question is not:
βWhich benchmark should I run?β
It is:
βWhat behaviour must this system reliably produce?β
The four levels of an agent eval
A useful starting hierarchy is:
- Outcome: Did the task ultimately succeed?
- Trajectory: Did the agent take an acceptable path to the outcome?
- Action: Were individual tool calls, arguments, and transitions valid?
- System: Did the complete system remain within its cost, latency, safety, and operational constraints?
Imagine an agent asked to update a customer's address.
It might produce the correct final address but still have made a dangerous intermediate decision. Perhaps it used an administrator endpoint instead of the intended customer endpoint. Perhaps it exposed unnecessary customer data to a tool. Perhaps it attempted the update twice after an ambiguous timeout.
A final-answer eval could mark the run as successful.
A trajectory or action-level eval could correctly identify it as unsafe.
The final answer is only one observation about an agent.
Start with a real task, not a metric
Suppose you are building an agent that answers questions from a company's internal documentation.
A weak requirement is:
βThe answer should be good.β
A stronger specification is:
βFor questions whose answer is supported by the current documentation, the agent should provide an accurate answer with supporting evidence, avoid inventing unsupported facts, and identify when the documentation does not contain enough information.β
Now the evaluation can contain multiple dimensions:
TASK
β
βββββββββββββΌββββββββββββ
β β β
Accuracy Evidence Abstention
β β β
βββββββββββββΌββββββββββββ
β
Overall result
This is much more useful than choosing a metric first and trying to force the task into it.
Build your first evaluation set
You do not need 10,000 examples to start.
Take a real task your system performs and collect a small set of representative cases. Include:
1. Typical cases β what users commonly ask.
2. Easy cases β cases the system should handle reliably.
3. Hard cases β cases requiring multiple steps or ambiguous evidence.
4. Boundary cases β cases close to a policy or capability boundary.
5. Negative cases β cases where the correct behaviour is to refuse, ask for information, or say that the evidence is insufficient.
6. Adversarial cases β cases designed to expose a known weakness.
7. Previously failed cases β real failures from development or production.
That last category is particularly valuable.
Every important real failure can become a regression test.
Your evaluation set should therefore evolve with the system rather than being written once and forgotten.
Try it with your own LLM
You can use an LLM to help construct an initial evaluation set. Do not blindly accept its cases as ground truth; use it as a generator and editor.
Copy this prompt:
I am building an AI system that performs this task:
[TASK DESCRIPTION]
Help me design an evaluation set.
Generate 30 test cases divided into:
- 8 typical cases
- 5 easy cases
- 5 difficult cases
- 4 boundary cases
- 4 negative cases where the correct behaviour is NOT to complete the task
- 4 adversarial cases designed to expose realistic failure modes
For every case provide:
1. Input.
2. What a successful system should accomplish.
3. What evidence or conditions determine success.
4. One plausible but incorrect behaviour.
5. Why that incorrect behaviour could occur.
6. The most appropriate evaluation method: deterministic check, reference answer, human rubric, or model-based judge.
Do not assume that every case has one exact textual answer.
Focus on observable behaviour and outcomes.
After generating the cases, identify the five cases that are most important to validate manually before using this set as an automated evaluation.
The important lesson is that test-case generation is not test-case validation.
An LLM can invent an elegant test that does not represent your users or your actual failure modes. Review the evaluation set yourself.
Ground truth is not always a string
Traditional software testing often has a simple expected value:
input β function β expected output
LLM systems are different. Multiple outputs can be equally correct.
For example, if the user asks:
βSummarize the three main limitations of this paper.β
There may be several valid phrasings.
A literal string comparison is therefore a poor evaluator.
Instead, define a rubric:
Criterion 1: Identifies limitation A 0/1
Criterion 2: Identifies limitation B 0/1
Criterion 3: Identifies limitation C 0/1
Criterion 4: Does not invent limitations 0/1
Criterion 5: Supports claims with source 0/1
Now the evaluation is tied to the behaviour you care about.
But even a rubric has a problem: who or what decides whether the rubric was satisfied?
That leads to one of the most controversial tools in modern AI evaluation: the LLM judge.
LLM-as-a-judge is useful β and dangerous
A stronger LLM can evaluate another model's response against a rubric. This can make large evaluation sets practical, particularly when deterministic checks are impossible.
But a judge is itself a probabilistic model.
It can have:
- position bias;
- verbosity preferences;
- sensitivity to wording;
- domain blind spots;
- inconsistent scoring;
- susceptibility to persuasive but incorrect reasoning;
- drift when the judge model or prompt changes.
So do not treat an LLM judge as an oracle.
Use it as a measurement instrument that must itself be validated.
Try this:
I want to test whether an LLM judge is reliable.
Below is a grading rubric and 20 candidate answers.
First score every answer independently.
Then repeat the scoring after:
1. Randomizing the order of the answers.
2. Removing the answer's author/model identity.
3. Rephrasing the rubric without changing its meaning.
4. Adding a deliberately persuasive but incorrect answer.
Report:
- score changes;
- disagreements between runs;
- examples where the judge appears influenced by style rather than substance;
- cases where human review is necessary.
Do not hide uncertainty. If the judge cannot reliably distinguish two cases, say so.
RUBRIC:
[PASTE RUBRIC]
ANSWERS:
[PASTE ANSWERS]
If the score changes substantially when irrelevant presentation details change, you have learned something important about the evaluator.
Deterministic checks are still extremely valuable
Not every evaluation requires another LLM.
If your agent is supposed to call a tool with a valid customer ID, a schema validator can check that.
If a database record must exist after a successful operation, query the database.
If a generated file must parse as JSON, parse it.
If an action must never occur without confirmation, inspect the trace for the required confirmation event.
Use deterministic tests wherever the property is deterministic.
A useful rule is:
Do not use a probabilistic judge to measure a property that a deterministic test can establish directly.
LLM judges are most useful where the property itself requires semantic interpretation.
The agent trajectory is part of the result
Consider two agents that both successfully answer:
βFind the latest policy and tell me whether this request is permitted.β
Agent A:
retrieve current policy
β identify relevant section
β answer
Agent B:
retrieve old policy
β retrieve unrelated policy
β make unsupported inference
β search again
β retrieve current policy
β answer correctly
If you evaluate only the final answer, they are identical.
Operationally, they are not.
Agent B may be slower, more expensive, less reliable, and more vulnerable to a slightly different request.
For agents, the trajectory is evidence.
Useful trajectory measurements include:
- tool selection;
- tool arguments;
- number of steps;
- unnecessary calls;
- failed calls;
- retries;
- recovery behaviour;
- state transitions;
- evidence consulted;
- escalation decisions;
- termination behaviour.
Do not assume that the shortest trajectory is always the best one. A longer path may be justified by a difficult task. The correct question is whether the additional work produced meaningful value or unnecessary risk.
Build a miniature agent eval now
You can start with a spreadsheet or plain text file.
Create 20 tasks. For each run record:
case_id
input
expected_outcome
actual_outcome
correct?
tools_used
unsafe_action?
steps
cost
latency
failure_type
notes
Then run your agent on every case.
Do this again after changing one thing:
- model;
- system prompt;
- tool implementation;
- retrieval strategy;
- memory policy;
- temperature or sampling configuration;
- orchestration logic.
Compare the results.
You have just built the beginning of a regression suite.
The experiment that teaches the most
Take one agent and deliberately make three versions:
VERSION A
No evaluation.
VERSION B
Final-answer evaluation only.
VERSION C
Outcome + trajectory + safety checks.
Run the same test set through all three.
Ask:
Which failures does each evaluation strategy detect?
For every failure that Version A misses but Version B detects,
explain what information the final answer provides that the raw
execution does not.
For every failure that Version B misses but Version C detects,
explain why the final answer was insufficient evidence of correctness.
Finally, identify which checks could be deterministic and which
require semantic judgment.
This experiment demonstrates why agent evaluation is different from simply grading generated text.
Evaluation changes behaviour
There is a deeper point that researchers and practitioners should take seriously:
The metric becomes part of the system.
If you optimize an agent against a metric, the agent will tend to improve that measured propertyβeven when the metric is an imperfect proxy for the real goal.
Suppose you reward an agent for:
βCompleting the task in as few steps as possible.β
You may get a faster agent.
You may also get an agent that skips verification.
Suppose you reward:
βMaximize the judge score.β
You may get outputs optimized for the judge's preferences rather than the user's actual needs.
Suppose you measure only:
βTask completed.β
You may miss harmful side effects.
This is the classic measurement problem in a new form: optimizing a proxy can distort the behaviour you actually wanted.
For researchers: design the eval before the claim
If you are doing serious experimental work, resist the temptation to choose a benchmark after seeing the result you want to publish.
Start with the construct.
Ask:
1. What capability am I claiming to measure?
2. What behaviour would demonstrate that capability?
3. What confounders could produce the same score?
4. What would a false positive look like?
5. What would a false negative look like?
6. Does the benchmark actually represent the deployment environment?
7. Are multiple valid strategies possible?
8. Does the metric reward undesirable shortcuts?
9. How sensitive is the conclusion to the evaluator?
10. Can another researcher reproduce the protocol?
Then vary one factor at a time where possible.
For example, if you claim that adding a second agent improves performance, compare:
one model, one pass
one model, more inference
one model, self-critique
two independent model calls
specialized second agent
second agent + deterministic verification
Otherwise you may attribute an improvement to βmulti-agent reasoningβ when the real cause was simply additional inference-time computation or a better prompt.
That distinction matters.
From benchmark to feedback loop
A mature evaluation system is not a leaderboard. It is a development loop:
REAL TASKS
β
COLLECT FAILURES
β
TURN FAILURES INTO TEST CASES
β
DEFINE SUCCESS CRITERIA
β
RUN EVALS
β
ANALYSE FAILURE MODES
β
CHANGE SYSTEM
β
RE-RUN OLD TESTS
β
TEST NEW EDGE CASES
β
DEPLOY CAREFULLY
β
COLLECT NEW FAILURES
ββββββββββββββββ back to the top
This is the important difference between having an eval and having an evaluation practice.
The second one continuously learns from reality.
Your final exercise
Take an AI workflow you actually use.
Paste this into your LLM:
I want to build a serious evaluation system for this AI workflow:
[DESCRIBE WORKFLOW]
Do NOT start by proposing a benchmark.
First identify:
1. The real-world outcome that defines success.
2. The most important failure modes.
3. Failures that can be detected deterministically.
4. Failures that require semantic evaluation.
5. Failures where the final answer can look correct even though the trajectory was unsafe or inefficient.
6. The minimum evaluation dataset needed to begin.
7. Cases that should be sampled from real users rather than generated synthetically.
8. Which metrics could accidentally reward the wrong behaviour.
9. How an LLM judge, if used, should be calibrated against human review.
10. What evidence would convince us that a new version is actually better.
Then design a 20-case starter evaluation set.
For each case specify:
- input;
- expected outcome;
- important constraints;
- failure modes to watch for;
- evaluation method;
- pass/fail criteria.
Finally, propose an experiment comparing the current system with one proposed improvement.
Specify what must remain constant and what measurements would distinguish genuine improvement from random variation.
Do not stop when the LLM gives you a nice table.
Run the evaluation. Look at the failures. Add the failures to the test set. Then change the system and run it again.
That is when evals stop being a fashionable AI term and become engineering.
And that is the real lesson:
An agent is not reliable because it passed a benchmark. It becomes more trustworthy when you can repeatedly measure the behaviours that matter, detect regressions, understand failures, and improve the system without losing the gains you already made.
"A benchmark tells you how a system performs on a test. An eval system tells you whether the system you are building is getting better at the job you actually care about."