How to run LLM evaluation on AI agents
LLM evaluation means scoring a model's or an agent's outputs against criteria you define. Use deterministic rules where a rule can decide, and an LLM judge where it can't. Then repeat the scoring on real production runs, not only on a pre-launch test set.
By Pavan Marisetti · Published · Last updated
On this page
Why LLM evaluation matters
A model or agent can look healthy on every standard metric and still give the wrong answer. Evaluation is how you find out whether the output was right. Agents add a second problem: failures spread across several steps, and a test that scores one reply never sees them.
AI agents don't fail like normal software. A tool can return a 200 and the task can still fail. Standard monitoring shows the request went through, not whether the answer was right.
The five steps below show how to build a score for the outcome.
Step 1: define what a good result is for your task
For each task or intent, write down what the user came for and what a correct outcome looks like. Every metric you choose later is scored against that definition.
Keep each definition short and checkable. "Refund request: the agent states the refund status from the order system and doesn't promise a refund the policy doesn't allow" can be scored. "Helpful answer" can't.
Write one definition per intent, because one agent usually serves several. Scoring the outcome against the user's goal, and not only whether each step ran, is what separates agent evaluation from checking that a request succeeded. PRISM by Block Convey's Agent Observability works this way: it tracks the outcome against the user's goal, not just span status. (A span is one step inside a trace, such as a single tool call.)
Step 2: choose metrics, starting with checks that need no model
Start with deterministic checks. These include output format, required fields, exact match, and the classic ML metrics where you have a labeled answer. A deterministic check gives the same verdict for the same input, uses no model, and costs nothing to rerun.
This also answers a common question: what are the evaluation metrics in ML? For tasks with a labeled answer, scikit-learn documents the standard ones, including accuracy, precision and recall.
These metrics suit narrow jobs such as classifying an intent or extracting a field. They can't tell you whether a free-text answer was relevant or polite. That is the job of the next step.
In PRISM, deterministic rules give the same verdict for the same input, use no model, and run on 100% of sessions.
Step 3: add LLM-as-a-judge for what rules can't check
Use a model as the grader for qualities a rule can't capture, such as relevance or tone. Treat the judge as imperfect: give it a narrow rubric, use reference answers where you have them, and spot-check its verdicts against human ones.
An LLM judge is a model that reads the exchange and scores it against your rubric.
Two habits matter most. Score one quality per rubric, because a rubric that asks for "quality" returns vague scores. And keep a human sample: judges are spot-checked, not trusted blindly.
Step 4: build a test set and run it before you ship
Collect representative and edge-case conversations into a fixed set. Score every prompt, model or tool change against it, so a regression shows up before users see it.
Include the ordinary cases, the ones that failed before, and the awkward ones: a user who changes their mind, leaves out a detail, or asks about something your knowledge doesn't cover. Keep the set fixed between runs. If it changes at the same time as the agent, you can't tell which one moved the score.
The same evaluators should run on this set and on live traffic, so the two scores are comparable.
Step 5: run evaluations on live traffic and send doubtful verdicts to a person
Keep scoring after launch, because real users send inputs your test set didn't include. Route low-confidence verdicts to a person, so judge errors get caught and can be added to the test set.
A test set only covers the cases you thought of. Production covers the rest. Run the same evaluators on live runs and look at how scores move over time.
Each reviewed case that turns out to be a real failure is a candidate for your test set.
PRISM can only score what your integration sends. Agent steps appear when your integration sends them, so check the supported integrations before you plan coverage.
How this looks in production
In PRISM, evaluators run on real agent runs. Deterministic rules cover every session with no sampling, and each verdict links back to the rule, the span, the source checked and the reason.
Evaluators are reusable evaluation criteria. They come in two kinds:
- Deterministic: same verdict for the same input, no model, run on 100% of sessions.
- LLM-as-judge: a model reads the exchange and scores every incoming trace until the plan's daily allowance runs out; after that only the deterministic rules continue. Each verdict links to the rule, the span, the source checked and the reason.
When a run fails, the verdict doesn't stop at a score. It links to the rule that fired, the span it fired on, the source that was checked and the reason.
Plan gating: core scores are on the Free plan. Custom evaluators and the Evaluators Hub are on Builder and above, which also adds the human review queue. Free plan available. Paid plans from $20/month.
If you'd like to see a verdict trail like this on your own agent runs, you can try it free on PRISM.
Common mistakes
Four errors show up most often. Each has a fix.
- Trusting public benchmark scores over your own task. A benchmark measures general ability on someone else's questions. Fix: build the test set from your own conversations and score against the definitions from Step 1.
- Scoring only the final answer. Standard monitoring shows the request went through, not whether the answer was right, and a final-answer score can hide a wrong tool choice halfway through the run. Fix: score steps and tool calls as well as the last message, and check the outcome against the user's goal.
- Treating the judge as ground truth. An LLM judge can be wrong. Fix: use a narrow rubric, add reference answers where you can, and send low-confidence verdicts to a person.
- Sampling so heavily that rare failures never show. A failure that affects 1 session in 200 can vanish in a small sample. Fix: use deterministic rules on every session, and keep sampled judge scoring for the checks that need a model.
Is LLM reliable?
Not by default. An LLM can produce a wrong answer that reads well, and the models used as judges are not perfect either. Measure reliability on your own tasks with evaluation instead of assuming it. Agents add a further risk, because they don't fail like normal software: a tool can return a 200 and the task can still fail.
What is an AI evaluator?
An AI evaluator is a reusable check that scores an AI output against criteria you set. In PRISM there are two kinds of rules. Deterministic rules give the same verdict for the same input, use no model, and run on 100% of sessions. LLM-as-judge rules have a model read the exchange and score every incoming trace until the plan's daily allowance runs out; after that only the deterministic rules continue.
Score your agent's real runs, not just a test set
Send your agent's runs to PRISM and see each run's outcome against the user's goal, with core scores included.
Free to start, 100 credits each month.