World’s largest virtual agentic engineering & quality conference
A practical guide to LLM evaluation: which metrics matter, how the methods compare, how to build an eval set, and how to gate releases on evals inside CI.

Sai Krishna
Author
Last Updated on: July 30, 2026
On one accuracy benchmark, hallucination rates across 26 top models range from 22% to 94%, according to Stanford's 2026 AI Index Responsible AI chapter. Same task, same benchmark, a 72-point spread.
LLM evaluation is how you find out where your own system sits in that range. It is the practice of measuring whether a model, or the application built on top of it, produces output that is accurate, grounded, complete, and safe for one defined task, using scores that stay comparable across model versions and prompt changes.
This guide covers the metric families worth tracking, how the evaluation methods differ, how to build an eval set that catches real regressions, and the part most guides skip: wiring evals into CI as a gate that can actually block a bad release. TestMu AI builds evaluation tooling for exactly that workflow, and the pipeline patterns below are the ones the platform is designed around.
TL;DR
LLM evaluation is the systematic measurement of language model output against defined quality criteria, producing repeatable scores instead of subjective opinions. It answers two separate questions, and confusing them is the most common mistake teams make.
Model evaluation measures a base model in isolation, typically against public benchmarks, and answers which model to buy. System evaluation measures your application end to end, including the prompt, the retrieval layer, the tool calls, and the guardrails, and answers whether this release is safe to ship.
The distinction matters most for conversational systems, where a single user turn passes through intent handling, retrieval, generation, and policy checks before anyone sees it. Our guide to conversational AI testing walks through how those layers fail independently.
Benchmarks are the default answer to "how good is this model," and they are useful for shortlisting. They are a poor foundation for a release decision, and the 2026 AI Index gives three concrete reasons.
The first is that benchmark questions are not all valid. Stanford's 2026 AI Index Technical Performance chapter cites a review that found invalid question rates ranging from 2% on MMLU Math to 42% on GSM8K. When two in five items in a widely quoted test set are broken, small score differences between models are noise.
The second is shelf life. The same chapter reports that evaluations intended to be challenging for years are saturated in months, which compresses the window in which a benchmark separates strong models from weak ones.
The third is coverage. The AI Index notes that almost all leading frontier developers report results on capability benchmarks such as MMLU and SWE-bench, while reporting on responsible AI benchmarks remains sparse. The dimensions most likely to cause an incident in production are the ones least likely to appear on a model card.
Use benchmarks to narrow a vendor shortlist to two or three candidates, then build a small task-specific eval set of your own and let that decide the winner. A public score measures the model. Your users experience the system.
Metrics split into three families by what they need in order to compute a score. Choosing the wrong family is why teams end up with dashboards full of numbers that never change when quality does.
| Family | What it needs | Best for | Where it misleads |
|---|---|---|---|
| Reference-based | A known correct answer for every case | Classification, extraction, translation, structured output | Open-ended answers, where a correct response worded differently scores as a failure |
| Reference-free | The input, and any retrieved context | RAG answers, summaries, support replies, agent turns | Cases where the retrieved context is itself wrong, so a faithful answer is still incorrect |
| Safety and compliance | A policy definition and adversarial inputs | Anything customer-facing or regulated | Benign test sets, which produce a clean score because nothing ever probed the boundary |
For a worked example of how a vendor platform packages this, the TestMu AI agent features and metrics documentation lists the nine quality dimensions scored on every chat and voice evaluation, including bias detection, hallucination detection, completeness, context awareness, response quality, and conversation flow.
These compare output to a golden answer. They are cheap, deterministic, and the only metrics that give you a hard pass or fail without a second model in the loop.
Most production output has no single correct answer, so these score the response against the question and the supporting context instead.
The retrieval-specific metrics deserve their own tooling decision, which we cover in our roundup of RAG evaluation tools.
These only produce a meaningful score when the test set contains inputs designed to break the system. A safety suite built from polite questions reports success and measures nothing.
Note: Hallucination, bias, completeness, and context awareness are hard to score by hand at any real volume. TestMu AI Agent Testing runs these as standardized metrics across auto-generated scenarios and returns a Green, Yellow, or Red production-readiness verdict with the conversation evidence behind each score. Start evaluating your agent free!
Four methods dominate, and they answer different questions. Pick by the decision you need to make, not by which is fashionable.
A second model scores the output against a rubric you write. This is the only method that scales open-ended quality scoring to thousands of cases at a cost that fits in a pipeline run.
The failure modes here are specific and well documented. Our practical guide to LLM-as-a-judge covers rubric design and the biases to correct for before you trust a judge with a gate.
Humans are too slow to gate a pipeline and too valuable to spend on cases an automated metric already handles. Their job is calibration.
Instead of scoring one output in isolation, show two and ask which is better. Relative judgments are more stable than absolute ones, for both human and model evaluators.
The dataset decides the value of everything downstream. A perfect metric on an unrepresentative set produces confident, wrong verdicts.
Point three is the whole discipline in one line, and it is borrowed directly from conventional QA. The reasoning is the same one behind regression testing: the cheapest bug to catch is the one you have already seen once.
Most evaluation guides stop at the dashboard. A dashboard reports a regression after someone thinks to look at it. A gate blocks the merge that caused it, and the difference in escaped defects is the entire point.
A gate needs four things: a fixed dataset, a pass threshold, a machine-readable report, and a non-zero exit code on failure. Everything else is reporting.
TestMu AI ships this as Agent Testing, linked in the summary above, whose command-line client runs evaluations against a deployed agent endpoint and scores them across the nine quality dimensions. The screenshot below is the CLI evaluation panel captured from the live product page while writing this guide.

Authenticate with environment variables rather than an interactive login, because a pipeline has no terminal to prompt. A single command then runs the suite and gates on the result.
pip install testmu-a2a-cli
export TESTMU_USERNAME=$CI_TESTMU_USERNAME
export TESTMU_ACCESS_KEY=$CI_TESTMU_ACCESS_KEY
testmu-a2a test \
--agent https://staging.example.com/api/chat \
--spec "Billing support assistant for a telecom customer portal" \
--count 30 \
--threshold 0.85 \
--format junit \
--output results.xmlThe threshold flag takes a value between 0.0 and 1.0 and defaults to 0.80. The command exits 0 when every scenario passes and 1 on any failure, so no custom parsing is needed to fail the build. JUnit output renders natively in GitHub Actions, GitLab CI, Jenkins, and CircleCI without a plugin.
Wired into GitHub Actions, the whole gate is a dozen lines.
name: Agent Quality Gate
on: [pull_request]
jobs:
evals:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install eval CLI
run: pip install testmu-a2a-cli
- name: Run evaluation suite
env:
TESTMU_USERNAME: ${{ secrets.TESTMU_USERNAME }}
TESTMU_ACCESS_KEY: ${{ secrets.TESTMU_ACCESS_KEY }}
run: |
testmu-a2a test \
--agent ${{ vars.AGENT_ENDPOINT }} \
--spec "Billing support assistant" \
--count 30 \
--threshold 0.85 \
--format junit \
--output results.xmlThe GitLab equivalent publishes the same file through the built-in JUnit report artifact.
agent-quality-gate:
stage: test
image: python:3.11
script:
- pip install testmu-a2a-cli
- testmu-a2a test --agent "$AGENT_ENDPOINT" --spec "Billing support assistant" --count 30 --threshold 0.85 --format junit --output results.xml
artifacts:
reports:
junit: results.xml
expire_in: 30 daysRunning the full suite on every commit is wasteful, and running nothing is worse. Scale the gate to what changed.
| What changed | Recommended gate |
|---|---|
| Agent prompt | Full evaluation, blocking on exit code |
| Underlying model version | Full evaluation, blocking on exit code |
| Knowledge base or retrieval index | Targeted evaluation on the affected scenarios |
| UI or infrastructure only | Smoke evaluation with a reduced scenario count |
| Nothing, scheduled run | Full evaluation nightly, alerting rather than blocking |
The scheduled row matters more than it looks. An agent degrades without anyone touching it when an upstream model is updated or a knowledge base goes stale, and only a run on a timer catches that class of drift.
The first team to gate a pipeline on LLM evals usually turns the gate off within a fortnight. The same commit passes and then fails, engineers start re-running the job until it goes green, and the gate stops meaning anything.
The cause is that the system under test is non-deterministic by design, so a gate built on deterministic assumptions inherits that variance. These are the fixes that hold.
The failure pattern is identical to the one QA teams already know from browser suites, and so is the cure: distinguish a genuine regression from noise before anyone stops trusting the signal. Our guide on flaky tests covers the same triage discipline applied to conventional automation.
The tooling market splits into four categories that solve different problems. Teams commonly buy one and discover it does not do the job of another.
| Category | What it does | Reach for it when |
|---|---|---|
| Metric libraries | Implement scoring functions such as faithfulness, answer relevance, and context recall that you call from your own code | You have engineers who want the eval loop inside the application repo |
| Tracing and observability | Capture production traces, token cost, and latency, and let you sample live traffic for scoring | You need online evaluation and a source of real cases for the offline set |
| Experiment platforms | Track prompt and model variants across runs so score changes are attributable | Several people are changing prompts and nobody can say which change moved the number |
| Agent evaluation platforms | Generate scenarios, drive a deployed agent as a user would, and return a release verdict | You are shipping a customer-facing chat, voice, or phone agent and need a go or no-go call |
TestMu AI Agent Testing sits in the fourth category. It drives a deployed endpoint through generated scenarios and personas and returns a readiness verdict, which is the right shape for a release gate. The boundary is worth stating plainly. It evaluates agents you have already deployed behind an endpoint, so it is not the tool for benchmarking raw base models against each other before you have built anything. For that comparison, a metric library in your own repo is the cheaper answer.
Whatever you shortlist, check five things before adopting: does it emit a machine-readable report your CI can consume, can you pin the judge model version, does every verdict carry evidence, can you add your own custom criteria alongside the built-in metrics, and does it run inside your network if your agent is not publicly reachable. A tool that fails the first check cannot gate anything.
For a category-by-category walkthrough with named options, see our roundup of AI agent evaluation tools.
An eval suite is a measuring instrument, and an uncalibrated instrument is worse than none because it produces confidence without accuracy. Validate it the same way you would validate any test suite.
The last one reframes the whole exercise. A suite whose scores drift upward while incidents continue is measuring something, but not quality.
Note: Every TestMu AI Agent Testing verdict ships with the conversation turns that produced it, plus a High, Medium, or Low confidence label reflecting how much scenario volume backs the score. Both are what make a verdict auditable rather than merely reassuring. Read how the quality dimensions and readiness verdicts work.
Pick your highest-traffic user journey and write 30 cases for it this week. Score them on three metrics only: faithfulness, answer relevance, and completeness. Run the set manually once to learn the baseline score and its run-to-run spread.
Then wire it into your pipeline with a threshold set just below that spread, gate pull requests that touch the prompt, and add a nightly scheduled run to catch upstream drift. Expand the set from incidents rather than from planning sessions.
If your system is a customer-facing chat, voice, or phone agent, TestMu AI Agent Testing gives you the scenario generation, the scored dimensions, and the CI gate without building the harness yourself. The Agent Testing platform FAQs answer the setup questions most teams hit in the first week, and a free tier is enough to run your first eval set end to end.
Author
Sai Krishna is Director of Engineering at TestMu AI (formerly LambdaTest), where he leads agentic AI for quality engineering, building AI agents that autonomously drive mobile and conversational test automation. His current focus is Agent Testing and Model Context Protocol (MCP) support for mobile. He is a core contributor and member of the Appium open-source project and the creator of AppiumTestDistribution and appium-device-farm. With over 14 years of experience including more than 9 years at Thoughtworks as a Principal Consultant, he holds a BSc in Electronics and speaks regularly at TestMu and Appium Conf on Appium, mobile automation, and agentic AI in testing.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance