LLM Evals, How to Test a Language Model System Before Your Customers Do

Diagram of the fall in pass rate when a task must pass three times in a row, from 75 percent per trial to 42 percent across three trials

A support team ships a new prompt on a Friday. Three agents read five answers each, all five look fine, and the change goes live. By Monday the chatbot has given the wrong refund deadline to 40 customers. Nobody tested the one case that mattered, the refund deadline after a policy change, because nobody wrote it down as a test.

That is the exact failure this guide is built to stop. What follows is the full working picture. What an eval is, how to build one from real failures, how to score answers without fooling yourself, and how to gate releases on numbers instead of a quick read.

llm evals are repeatable tests that score a language model system on your own tasks, with fixed inputs, agreed criteria and a score you can compare across versions. An eval pairs a test set with a scoring rule and a harness that runs the set on every change, so a prompt edit or a model swap shows up as a number, not a feeling.

If you would rather have this built and run as a service, let us discuss your project. Write to sales@denebly.com or call +1 (214) 896-2906.

What an eval is, and what it is not

An eval is a test you can run again. Same cases, same criteria, every change. You give the system an input, you apply grading logic to its output, and you record a pass or a fail. The set of cases stays fixed while the system changes, so the score means the same thing from one version to the next in one evaluation suite.

What people think it isWhat it actually is
A leaderboard score for a modelA test of your system on your tasks, with your data
Reading five answers by eyeA fixed set run on every change, scored the same way each time
A unit test for codeA test for open answers, where many wordings can be right
A one off check before launchA gate that runs on every prompt, model and code change

Three near neighbours cause most of the confusion around the term. LLM evaluation is the whole discipline this guide covers, the repeatable testing of a model system on your own tasks. A benchmark is the public version of the idea, one shared test used to rank models against each other, and it gets its own section next. A vibe check is the opposite of an eval, a quick read of a few answers and a feeling that they look fine, with nothing written down and nothing that can be run again.

The Anthropic guide published 9 January 2026 puts it in one plain line. An evaluation is a test for an AI system, where you give the AI an input, then apply grading logic to its output to measure success. That guide covers automated evals that run during development, without real users in the loop.

Eval against benchmark, and model test against system test

A benchmark is a shared public test that many models sit under the same conditions, which is why its scores can rank one model against another. MMLU, GSM8K, HellaSwag, TruthfulQA and HumanEval are all benchmarks. None of them contains a single question from your product. An eval is the opposite move. It tests your system on your tasks, with your data. Three hundred support tickets, each carrying the routing label a human gave it, form an eval set for a support bot, per the Sanity glossary.

Model evaluation and system evaluation answer different questions too. Model evaluation tests a standalone model against benchmarks, for raw capability. System evaluation tests your whole application, prompt templates, retrieval, guardrails, tool calls and business logic together, on inputs from your own product, per the Mastra guide.

Question you need answeredPickWhy
Which model is generally strongBenchmarkPublic set, shared ranking, fast to read
Does our feature work for our usersEvalYour tasks, your data, your criteria
Did the new model release change behaviourEvalSame set before and after the swap
Is the retrieval step or the prompt at faultSystem evalScores each stage apart from the end result

The three parts of an eval set

Three pieces have to exist before a score means anything. The cases come first, a fixed set of inputs where the expected outcome for each one is written down; once its labels have been reviewed and frozen, that set is your golden dataset. Next comes the scoring method, the rule that reads an output and marks it pass or fail. Last comes the harness, the program that feeds the set to the system on demand and collects the results. The Sanity glossary counts the same three pieces.

Copy this case record and use it for every case in your set. Input, the exact user message. Expected outcome, the reviewed answer or the rule the answer must follow. Category, billing, refund or technical. Difficulty, easy, medium or hard. Source, production, manual or synthetic. Version, the set version that holds this case.

Diagram of the six steps one eval run takes, collect, label, score, grade, gate, grow

Offline and online evals catch different failures

The same set can run at two very different moments. Run it before a release, against cases you prepared in advance, and you have offline evaluation, the rehearsal that shows whether a change broke something that used to work. Run it after the release, against a sample of the traffic real users are sending, and you have online evaluation, the watch that shows what your prepared cases never contained.

The failures each one finds barely overlap. The rehearsal finds the regressions, the edit that pleased one unhappy customer and quietly failed a row of cases that passed last week. The watch finds the surprises, the questions nobody on the team thought to write down.

Run offline on every change, and run online on a sample every week. Scoring every live request costs too much and adds noise, so sample by category and by risk. A refund case gets scored, a greeting does not need the same attention. Those samples come from production traces, the recorded traffic of the live system, not from cases invented at a desk.

WeekLive cases scoredWhat it catches
Week 150Early failures after a release
Week 250Patterns the test set missed
Week 3100Drift as users change how they ask
Week 4100Cases to add to the test set

The four scoring methods, and when each one fits

Every eval ends in a check, and there are four ways to do the checking. Code checks, rubric scoring, a judge model, and human review. They trade speed and cost against how much nuance they can handle, so a production set usually combines several of them. One of the four, the judge model, is big enough to carry its own name, LLM-as-a-judge, and its own section below.

MethodMinutes per caseWhat it checksIts limit
Code check0Exact match, regex, JSON schema validation, tool callOnly checks exact things
Rubric score1Named criteria, each scored 0 or 1Needs a clear written rubric
Judge model0.2Open answers against a rubricMust be calibrated against humans
Human review5Judgment calls, tone, safetySlow and costly, so it runs on samples

Code checks come first for anything a program can check. If a criterion can be checked with code, do that, per the Keyved guide. Rubrics come next for open answers, one point per named criterion, so two graders can reach the same score. Judge models handle volume, and humans handle the cases where a wrong answer costs real money.

Three older scores sit underneath many of these checks. BLEU and ROUGE compare an answer against a reference text by counting overlapping words and phrases. Cosine similarity compares two embedding vectors instead, and scores how close they point. All three are cheap similarity scores, and all three share one limit, a right answer in different words scores low, and a wrong answer in similar words scores high. They support the checks above; they never replace judgment.

Our rag pipeline guide works the same scoring split for retrieval systems, where faithfulness and context recall join the list. Our structured outputs guide shows how typed fields make code checks easy to write, because a field is either present and valid or it is not.

LLM as a judge, how to calibrate it before you trust it

In LLM as a judge, the grader is a model too, a strong one that reads each answer your system produced, checks it against the rubric you wrote, and hands back a score. It makes grading hundreds of open answers practical, where human review would take days. It is a measuring instrument, not a replacement for people, and it needs calibration like any instrument.

Calibrate on 50 cases graded by humans first. Build a two by two table of judge against human, then read the agreement rather than the pass rate alone. The humans need a shared scale before their labels can calibrate anything. A Likert scale, each answer rated 1 to 5 against a written anchor, and preference ranking, two answers side by side with the better one picked, are the two formats that keep human scores comparable from one grader to the next. Here is a real shape of table from a first calibration run.

50 casesHuman passHuman fail
Judge pass346
Judge fail46

Raw agreement is 40 of 50, which is 80 percent. Raw agreement flatters the judge, because two graders agree sometimes by chance alone; Cohen kappa corrects for that chance agreement, so report it beside the raw figure when the stakes justify the extra arithmetic. The table also shows the judge is lenient, it passes 6 cases humans fail and fails only 4 humans pass. That leniency is the finding, and it tells you to tighten the rubric on the exact criterion where those 6 cases sit, then recalibrate.

Diagram of five scoring methods as step cards, code check, rubric, judge model, human review, task success

The biases that bend judge scores

Judges carry biases, and the Zheng paper from NeurIPS 2023 names three of them. Position bias, the judge favours whichever answer is shown first. Verbosity bias, the judge favours longer answers even when they add nothing. Self-enhancement bias, a judge favours its own outputs.

The paper found a strong judge can match human preferences at over 80 percent agreement, the same level as agreement between humans. That number holds only after the biases are handled. Without the fixes, the same judge can be steered by answer order alone.

Here is the worked fix. Take 200 pairs and judge each pair twice, once in each order. That is 400 calls. If the judge picks the first answer 66 times out of 80 on order alone, the order effect is larger than the quality effect, and the result is noise. Count a pair as a clear win only when the judge picks the same answer in both orders, and count the rest as ties.

Zheng and colleagues also recommend chain of thought judging with a reference answer for maths and reasoning, which lifted consistency in their tests. Hide model names from the judge, swap the order, and audit a sample against human labels every month. A judge you never audit is a judge you are guessing about.

Metrics that match what users care about

Pick a small number of metrics tied to real quality, and tie each one to a user harm. A metric with no harm behind it is a number the team will game. The OrNsoft guide measures four things, in the order a business owner usually asks about them, quality, safety and policy, latency, and cost. Two governance frames shape the list in regulated teams, the NIST AI RMF, which organises risk work as Govern, Map, Measure and Manage, and the OWASP Agentic AI Top 10, which names the agent failure classes worth a metric each.

MetricUser harm if it failsHow to score it
CorrectnessWrong answer acted onExact match, rules, or judge
FaithfulnessAnswer invents a factJudge against retrieved text
GroundednessClaim with no sourceJudge or NLI model
Hallucination rateFalse detail trustedHuman spot check per week
Refusal qualityUnsafe request answeredCode check plus human sample
LatencyUser waits and leavesTimer per case, median and p95
Cost per taskVolume breaks the budgetTokens per case times rate

For retrieval systems, add recall at k, precision and MRR, per the Keyved guide. For agents, add outcome, whether the task finished right, trajectory, whether the right tools ran in a sane order, and safety, whether the agent stayed inside its permissions. Our sibling guide on retrieval scoring covers faithfulness in full. RAGAS, DeepEval, TruLens and LangSmith all track these scores in production runs.

Building the golden set from real failures

The single most valuable asset in this work is a golden dataset of real examples, per the Keyved guide. Build it from real inputs first, then add the cases you worry about. Production logs, support tickets, bug reports, and the checks your team already runs by hand before a release.

Start by reading about 100 traces before you build any grader, per the Kirupa guide. Write down what goes wrong, in the words users used. Then turn the most common failures into cases. A case invented in a workshop will test the workshop, not the product.

Source for 50 casesCasesWhy it belongs
Production traces, real failures20What users actually hit
Support tickets and bug reports12Failures users reported
Hand checks the team runs today8Checks that already matter
Edge cases, empty, long, typo, other language6Inputs that break parsers
Adversarial, injection and refusal cases4Requests the feature must refuse

The 20 to 50 case start, and the confidence maths

Teams delay eval work because they think they need hundreds of tasks. Anthropic says 20 to 50 simple tasks drawn from real failures is a great start. Early on each change has a large effect, so a small set shows it. That is statistical, not motivational, and it only holds while effects are large.

For agents, measure reliability with pass^k, not only pass@k. Pass@k asks whether one of k attempts succeeds. Pass^k asks whether all k succeed, and only the second measures reliability. The Anthropic guide uses a 75 percent per trial rate as its example.

Per trial ratePass at 1Pass to the power 2Pass to the power 3Pass to the power 5
75 percent75 percent56 percent42 percent24 percent
80 percent80 percent64 percent51 percent33 percent
90 percent90 percent81 percent73 percent59 percent

The arithmetic is 0.75 to the power 2 is 0.5625, to the power 3 is 0.4219, to the power 5 is 0.2373. A system that looks good at 75 percent per try passes three tries in a row only 42 percent of the time. If your agent must finish a five step task without a slip, 75 percent per step is not good enough.

The confidence interval sets the other limit, what a small set can prove. Say a version passes 40 of 50 cases, a pass rate of 80 percent. The 95 percent confidence interval around that rate runs from about 67 to 89 percent, a band 22 points wide. Pass 16 of only 20 cases, the same 80 percent, and the interval widens to about 58 to 92 percent.

That is the maths behind the 20 to 50 case start. A small set catches large effects, because a 20 point fall lands outside the band. A 3 point gain inside a 22 point band is weather, not signal, and tuning against it wastes a cycle.

Agent evals, outcome and trajectory together

With agents you evaluate a sequence of steps, not one answer. Model calls, tool calls, intermediate results, the agent loop itself. Grade the outcome first, task completion judged on the final state of the environment rather than on what the agent reports. Then grade the trajectory, the path it took to get there.

Here is a worked trace from a refund agent. The user asks for a refund on order 8814. The agent calls the order lookup tool with order 8814, reads the policy, calls the refund tool with 45 dollars, and replies with the refund number. The outcome passes, the money moved. The trajectory also passes, the right tools ran in the right order with the right arguments.

Now change one step. The agent calls the refund tool with 450 dollars instead of 45, then corrects itself and refunds 45. The outcome still passes, but the trajectory fails, because a wrong tool call with a real amount ran first. An outcome only eval would have shipped that agent. Separate the two grades, and keep capability evals apart from regression evals. Capability evals start at low pass rates, regression evals stay near 100 percent, and a capability eval that saturates moves into the regression suite.

What it costs in time, and the worked month

The cost of evals is mostly time, not model bills. A code check costs nothing per case. A judge model costs about 12 seconds per case at the pace most teams see. Human review costs 5 minutes per case. Those three numbers decide how much of your set you can afford to run, and how often.

Line item, one monthArithmeticAmount
Human review, weekly sample50 cases at 5 minutes each250 minutes
Judge grading, full set50 cases at 0.2 minutes each10 minutes
Judge double grading, 200 pairs400 judge calls at 0.2 minutes each80 minutes
Trace reading before building100 traces at 3 minutes each300 minutes
Total, first month250 plus 10 plus 80 plus 300640 minutes

If the numbers above look small enough to try, let us discuss your project. Write to sales@denebly.com or call +1 (214) 896-2906.

Running evals in CI and release gates

Run the eval set on every prompt, model or code change, like unit tests, per the Keyved guide. A change that fails the gate does not ship, and the gate is a number agreed in advance, not a feeling after the run. Put the set in CI, so the score arrives with the pull request.

Set two gates, not one. The regression gate holds the regression evals above 95 percent on the cases that used to pass. The capability gate asks whether the new version beats the old one on the capability evals it used to fail, by at least 5 points. A version can pass one release gate and fail the other, and either failure stops the release.

If you want the same two gates guarding your own releases, write to sales@denebly.com or call +1 (214) 896-2906.

Mistakes that make evals lie

Most failed eval programs share the same six mistakes. Tuning on the test set, judging your own model with itself, grading without a rubric, trusting a saturated set, sampling only easy cases, and never checking the judge.

  1. Tuning on the test set. Prompts edited against the same cases they are graded on will pass and still fail users. Fix, keep a held out slice you never tune against.
  2. Judging your own model with itself. A model grades its own answers kindly. Fix, use a different model family as judge, or human labels.
  3. Grading without a rubric. Two graders score the same answer differently and the score drifts. Fix, write one criterion per line, each scored 0 or 1.
  4. Trusting a saturated set. When every version passes, the set gives no signal. Fix, retire saturated cases and add live failures.
  5. Sampling only easy cases. A set of greetings and FAQs will pass any model. Fix, weight the set toward the failures users actually hit.
  6. Never checking the judge. A judge that drifts will bless bad answers for months. Fix, recalibrate the judge against fresh human labels every month.

Who should start now, and who should wait

Start now if your answers change after the model was trained, if users act on your answers, or if a wrong answer costs money or trust. Support teams, internal help desks, sales teams answering product questions, and any firm whose policy pages move faster than model training all fit. If your week already holds a pile of support tickets and a bot answering from pages that change, LLM evaluation is not a research project, it is next week’s work.

The shape that pays is a feature with at least a few dozen real questions a week. A starter set earns its keep when the same questions arrive daily and the answers sit in files no one person holds in memory. The Kirupa story shows the shape, 46 cases, one broken case, and a version that looked fine by eye.

How Denebly builds it

Denebly builds evaluation as one connected system. The work starts with your traces and your failures, not with a tool choice.

The deliverables are fixed before work starts. The audited trace list, the 50 case golden set with labels and versions, the scoring rules per method, the judge calibration table against human labels, the CI gate with its two thresholds, and the 30-day numbers, the pass rate and the judge agreement on your own cases, before and after.

The rule to work by

Start from the failures your users already hit, write them down as cases, and run those cases before you change anything else.

If you would rather hand the build and the first month of tuning to a team, let us discuss your project. Write to sales@denebly.com or call +1 (214) 896-2906 and ask for an evaluation build.

Frequently asked questions

What are llm evals

They are tests you run again and again on a language model system, built from your own real tasks. Each case pairs a fixed input with a grading rule, so every version earns a score you can compare with the one before. A prompt edit or a model swap moves that score before it reaches your customers.

How many test cases do I need to start

Start with 20 to 50 simple tasks drawn from real failures, per the Anthropic guide published 9 January 2026. That range is enough to catch large changes early, because each change has a clear effect at that stage. Grow the evaluation suite from production failures after that, and keep a held out slice you never tune against.

Which scoring method should I use first

Use code checks first for anything a program can check, exact match, a regex, a JSON parse, a tool call assertion. Add a judge model only for open answers, and only after you calibrate it against human labels on at least 50 cases. Keep human review for the cases where a wrong answer costs real money.

How do I know if my judge model is trustworthy

Measure its agreement with human graders on the same cases, then check its biases. Swap the answer order and regrade, shorten long answers and regrade, and hide model names. If agreement stays above 80 percent after those checks, the judge is usable as a first pass, with humans holding the final say.

What is the difference between offline and online evaluation

Offline evaluation runs a fixed test set before a change ships, so it catches regressions. Online evaluation scores a sample of live traffic after a change ships, so it catches new patterns the test set never held. Use both, because each one catches failures the other cannot see.

When should I stop trusting an eval set

Stop trusting it when every version passes it, when the team tunes prompts against it, or when live failures keep arriving that no case in the set covers. Retire saturated cases, add every new live failure as a case, and rebuild the set when the product changes what it is asked to do.

Sources

  • Anthropic, Demystifying evals for AI agents, 9 January 2026, read 28 November 2026.
  • Zheng and colleagues, Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena, NeurIPS 2023, arXiv 2306.05685, read 28 November 2026.
Arslan Mushtaq, Founder of Denebly

WRITTEN BY

Arslan Mushtaq

Founder, Denebly

Arslan founded Denebly in 2018 and leads its AI development work for startups and mid-size businesses, across AI chatbots, agentic workflows, RAG systems, machine learning and automation. Denebly has delivered 100+ projects from Dallas, Texas.

Connect on LinkedIn More about Arslan

Ready to Solve Your Business Problems With AI?

Tell us what you are trying to build, automate or fix. You will get an honest assessment within one business day, not a sales pitch.

Custom AI development for startups and growing businesses. Chatbots, agents, machine learning and automation that deliver measurable results.

sales@denebly.com
Dallas, Texas, USA

Get Started Free Consultation AI Readiness Audit Pricing Response within 24 hours You own the code & data