← Back to Blog
AI & AutomationLLM TestingAgent Evals
Blog · 8 min read

Published November 10, 2026 · By QAInfinity

How to Test LLM Apps and AI Agents: Evals, LLM-as-a-Judge and Regression Sets

Testing a feature built on an LLM is a different problem from testing a deterministic one — the same input can produce a different, still-acceptable output, and the failure modes (a confident wrong answer, a dropped instruction, a tool called with the wrong argument) rarely surface in a quick manual check. Here's what current practitioner and research guidance actually says about building eval sets, grading with LLM-as-a-judge, and catching regressions when a prompt or model changes.

The figures and claims below come from third-party vendor guides and one independent research preprint, not QAInfinity engagements — each is attributed to its source, and we've flagged the ones we couldn't independently verify.

20–60model calls a single agent task can involve before a final answer appears — one reason a pass/fail check on the final output alone misses real failures, per DigitalOcean's LLM-as-a-judge guide

Deterministic checks first; save the judge model for what code can't grade

The first instinct with an LLM feature is often to grade everything with another LLM. Current guidance pushes back on that: run cheap, code-based checks first — does the output parse as valid JSON, does it include a required field, is a banned phrase absent — and reserve LLM-as-a-judge for the qualitative slice a rule genuinely can't score, like whether an answer is actually helpful or faithful to a source document. Judge-based grading is also more reliable when the question it's asked is narrow and binary (a specific yes/no) rather than an open-ended quality score, with failing or unclear verdicts routed to a human reviewer rather than trusted blindly.

Deterministic-first grading and narrow yes/no criteria via DigitalOcean's LLM-as-a-judge guide and Mastra's guide to evaluating LLM and agent outputs at scale.

A judge model is only as good as its calibration against humans

An LLM-as-a-judge setup that's never been checked against real human review is a guess with extra confidence. The guidance here is consistent across sources: validate the judge's verdicts against a sampled set of human-labeled examples, monitor for drift over time rather than calibrating once and assuming it holds, and watch for known judge biases — favoring longer answers, favoring whichever answer appears first in a pairwise comparison. Mitigations include randomizing answer order and, where it matters, using a judge model from a different provider than the one being graded, to reduce self-preference bias.

Human-calibration and drift monitoring via Openlayer's LLM-as-judge evaluation guide; position and verbosity bias via Arize's guide on when to use LLM-as-a-judge.

Agents need step-level grading, not just a check on the final answer

An agent task typically chains many model calls — planning, tool selection, argument construction, intermediate reasoning — before producing a final answer. A single pass/fail check on that final output can miss a wrong tool call or a skipped step that happened to still land on a plausible-looking result. Some evaluation setups now use an "agent-as-a-judge" that gathers evidence from the full trace and runs its own checks before issuing a verdict, rather than grading the end state alone.

Multi-call agent evaluation and agent-as-a-judge approaches via DigitalOcean's LLM-as-a-judge guide.

The same prompt, run twice, can give two different answers — test for that, don't ignore it

Sampling temperature, model weight updates, and tool-call latency all introduce run-to-run variation, so grading a single run against one fixed expected string risks flagging a genuinely working feature as broken (or the reverse). Practitioner guidance recommends running each test case several times and comparing an averaged score against a baseline within a stated tolerance band, rather than treating one run as a verdict. One cited data point worth taking seriously as a caution, not a target: an article summarizing Anthropic's own eval research puts single-run agent success rates around 68–74% — a reminder that a single pass or fail on one run is a weak signal either way.

Statistical, tolerance-based pass criteria via FrugalTesting's framework for testing non-deterministic AI features; single-run reliability figures via Built In's piece on how engineers test AI, citing Anthropic's own eval research.

Prompts and models change often — treat each change like a release

A prompt revision or a model-version upgrade can regress behavior the same way a code change can, and both happen more often than most teams' release processes account for. The practical pattern showing up across current guidance: version-control prompts like code, run the full eval suite before a prompt or model change ships, and snapshot the actual rendered prompt so it can be diffed against a committed baseline — catching an accidental wording change from an unrelated refactor before it reaches production. A March 2026 independent research preprint (AgentAssay) proposes a statistical approach to regression-testing agents specifically after prompt, tool, or model changes, reporting large efficiency gains over naive re-testing; those are the single author's own reported numbers from one preprint, not an independently audited result, so we're flagging it as a research direction worth watching rather than a settled figure.

Prompt version control and CI-gated eval runs via Channel's guide to agent regression testing in CI/CD; prompt snapshotting via tianpan.co's piece on the agent test pyramid; the AgentAssay preprint is on arXiv (2603.02601).

Quick answers

Can I just use GPT or Claude to grade my own LLM feature's output?
You can, but only after checking that judge against real human-labeled examples first, and only for the qualitative questions a deterministic rule can't answer. Used uncalibrated, a judge model inherits its own biases — favoring longer or earlier-shown answers — and will quietly misgrade in ways a rule-based check never would.
Why does testing an AI agent need more than testing a chatbot's final reply?
An agent's final answer is the end of a chain of model calls — tool selection, argument construction, intermediate steps — and a wrong step can still produce a plausible-looking final answer. Step-level grading catches failures a final-answer-only check misses.
How do I test something that gives a different answer every time I run it?
Run the same case multiple times and judge an averaged pass rate against a baseline within a tolerance band, rather than expecting one fixed output. A single run is too noisy a signal to trust on its own, in either direction.

Related reading

Shipping an LLM feature or agent and need a testing plan for it?

Tell us what you're building. We reply within one business day.

Book a Consult Not ready to talk? Check your risk first →