Guide
LLM Evaluation: How to Test an AI App Before Launch
By the OrchidBytes team · Updated October 23, 2026 · 11 min read
Key takeaway:LLM evaluation for a business app means 100–300 real test cases, written pass criteria, code checks plus a calibrated AI judge, evals on every change and sampled production scoring.
LLM evaluation for a business app is not about public leaderboards. It means running a fixed set of realistic inputs through your whole system, scoring the outputs against pass criteria you wrote down before launch, and repeating that run every time a prompt, model or data source changes. Teams that skip it hear about quality problems from customers.
Quick answer
- Test set: 100–300 cases drawn from real questions, edge cases and things the app should refuse. Grow it from production failures.
- Pass criteria: written per criterion (correct, grounded, right format, safe, fast, affordable) and agreed before you look at results.
- Scoring: code checks for anything deterministic, a calibrated AI judge for judgment calls, and humans for the judge's calibration and high-stakes cases.
- Regression testing: a 50-case smoke set on every change, the full set before release. In our illustrative math a 300-case run costs about $17 in tokens.
- After launch: score sampled live traffic, track decline and escalation rates, and add failures to the test set.
What should an LLM app evaluation actually measure?
It should measure whether your system does your task, not whether the underlying model is smart. A model that tops a reasoning benchmark can still cite the wrong policy, break your JSON format or answer questions it should refuse.
| Public benchmarks | Your app's evaluation | |
|---|---|---|
| What is tested | A raw model | Prompt, retrieval, tools, model and output handling together |
| Inputs | General questions (math, code, trivia) | Your users' real questions and edge cases |
| Pass criteria | Set by the benchmark authors | Set by your business and risk tolerance |
| Useful for | Shortlisting 2–3 candidate models | Deciding whether to ship, and catching regressions |
| Changes when | A new model is released | You edit a prompt, add a document or switch models |
Benchmarks are a fair first filter; after that, only your own data counts. As Arize's evaluation guide warns, a narrow or overly clean test set can produce strong scores that don't generalize to real traffic.
How do you build a test set that reflects real usage?
Build it from real inputs first and invented ones second. If the app replaces an existing process, you already have the raw material: support tickets, inbox history, search logs, sales call notes or the questions new hires ask.
Our starting mix for a first set of 200 cases (adjust it to your traffic):
- Common requests (about 50%). The questions that make up most of the volume, with answers a domain expert has signed off.
- Hard but answerable (about 20%). Multi-part questions, tables inside PDFs, questions that need two sources combined.
- Should-decline cases (about 15%). Questions your content doesn't cover, out-of-scope requests, or questions the user isn't permitted to ask. The right output is "I don't know" or a handoff.
- Adversarial and safety cases (about 10%). Prompt injection, requests for other customers' data, attempts to get a discount the policy doesn't allow.
- Format and edge cases (about 5%). Empty input, very long input, other languages, typos.
Before writing any scoring rubric, read 50–100 real outputs and write down what actually goes wrong. Hamel Husain's evals FAQ makes the same point: a rubric written before looking at data measures the failures you imagined, not the ones you have.
How many test cases do you need?
More than most teams think if you want to detect small changes. With a pass rate around 90%, the rough 95% margin of error (normal approximation) shrinks slowly as the set grows:
| Test cases | Margin of error at a 90% pass rate | What it can tell you |
|---|---|---|
| 50 | ±8.3 points | Whether the app basically works |
| 100 | ±5.9 points | Large differences between models or prompts |
| 200 | ±4.2 points | A go/no-go decision against a target |
| 300 | ±3.4 points | Moderate regressions, overall |
| 500 | ±2.6 points | Small regressions, and per-category numbers |
The practical consequence: with 100 cases, a drop from 90% to 86% after a prompt change is inside the noise. You can't tell whether quality fell or the score wobbled.
Two habits help. Compare runs case by case: since both runs use the same inputs, ask which cases flipped from pass to fail. Five flips on refund questions is a signal even when the headline barely moves. And stratify: 300 cases across six categories is only 50 each, with the ±8 point uncertainty of the first row, so give high-stakes categories more cases.
What pass criteria should you set before launch?
Set one criterion per failure that matters, with a threshold agreed before you see results. Deciding the bar after the run invites you to move it.
| Criterion | How to check it | Example starting threshold |
|---|---|---|
| Format validity | Code: schema validation, required fields, length | 100% (enforce in code, not by hoping) |
| Answer correctness | Compare to an expert reference answer, via judge or human | 85–95% depending on stakes |
| Groundedness and citations | Judge checks each claim against the retrieved passages | 95%+ for customer-facing answers |
| Correct declines | Should-decline cases answered with a refusal or handoff | 90%+ |
| Safety and data leakage | Red-team cases; code checks for other users' data | 0 failures tolerated |
| Latency | Code: p95 response time | Set by the UI, often a few seconds |
| Cost per request | Code: token usage times price | Below what the feature can afford |
The thresholds are illustrative. An internal drafting tool where a person edits every output can launch at 80% correctness. An assistant quoting policy to customers needs a far higher bar on groundedness; see how to reduce AI hallucinations.
Which checks should be code, an AI judge or a human?
Use code for anything you can define exactly, an AI judge for judgment calls at scale, and people to calibrate the judge and review high-risk cases.
| Method | Best for | Speed and cost | Main weakness |
|---|---|---|---|
| Code checks | Format, required fields, banned phrases, exact matches, latency, cost | Instant, nearly free | Can't judge meaning |
| AI judge | Correctness against a reference, groundedness, tone, relevance | Seconds per case, cents per run | Biased until calibrated |
| Human review | Calibrating the judge, high-stakes categories, new failure types | Minutes per case | Slow, inconsistent between reviewers |
For retrieval systems, score search and answers separately. Ragas defines faithfulness and context precision as distinct metrics, and the split tells you whether to fix the search or the prompt. Note that faithfulness measures agreement with the retrieved text, not truth. If the source document is wrong, a perfectly faithful answer is still wrong.
How do you make an AI judge trustworthy?
Ask it narrow pass or fail questions and check it against human labels before trusting its numbers. In Zheng et al.'s MT-Bench study, strong judge models agreed with human preferences over 80% of the time, about the same as humans agree with each other. The same paper documented position bias (favoring the first answer shown) and verbosity bias (favoring longer answers).
Practical rules we follow:
- One criterion per judge call, answered pass or fail with a one-line reason. A 1–10 "quality" score is hard to calibrate and drifts.
- Swap the order when comparing two outputs, and call it a tie if the verdict changes.
- Pin the judge's model version so scores stay comparable over time.
- Hand-label 100 cases, making sure at least 30 are real failures, and measure how often the judge agrees.
Calibration also lets you correct the headline number. Say the judge catches 90% of real failures and wrongly flags 5% of good answers. If the true failure rate is 10% on 300 cases, the judge flags 27 real failures plus 13.5 false alarms, and reports 13.5%. Rearranged, the correction is:
true failure rate = (observed rate − false-flag rate) ÷ (catch rate − false-flag rate)
Here that gives (0.135 − 0.05) ÷ (0.90 − 0.05) = 10%. Uncalibrated, you would overstate failures by a third, or with a lenient judge, understate them.
How does regression testing work when prompts and models change?
Treat the test set like unit tests: run it automatically on every change and block the release when a threshold fails. Regressions usually come from small changes: a reworded instruction, a new document, or a provider updating a model.
Running the full set on every pull request adds up, so split it. Our illustrative math uses $3 per million input tokens and $15 per million output tokens; check your provider's current rates or model your own in the AI cost calculator.
- App call per case: 4,000 input and 500 output tokens, about $0.020.
- Judge call: 3,000 input and 200 output tokens, about $0.012, with 3 criteria per case.
- Full 300-case run: $5.85 for the app plus $10.80 for 900 judge calls, about $17.
- 50-case smoke set: about $2.80.
At 60 pull requests a month, running the smoke set on each and the full set nightly (20 runs) costs about $500 a month. Running the full set on all 80 runs costs about $1,330. Tokens are rarely the real cost of evaluation; the hours spent building and labeling the set are.
What should you monitor after launch?
Score a sample of real traffic with the same judges, and watch the signals users give you for free. Test sets go stale.
- Sampled scoring. Judging 3% of 20,000 monthly requests on 3 criteria is 1,800 judge calls, about $22 a month at the rates above.
- Behavior signals. Thumbs down, human escalations, rephrased questions.
- Decline rate. A sudden rise usually means retrieval broke or a source stopped syncing. A sudden fall can mean the app started guessing.
- A weekly human read of 30–50 flagged traces.
Every confirmed failure goes into the test set with its correct answer, so the set drifts toward what users actually ask.
A 10-point launch checklist
- At least 200 test cases, mostly real inputs.
- At least a quarter are should-decline or adversarial.
- Thresholds written before the first scored run.
- Format, safety and cost checked in code.
- The AI judge checked against 100 hand-labeled cases.
- Retrieval and answers scored separately (RAG apps).
- A smoke set blocks merges; the full set blocks releases.
- Model versions pinned; upgrades need a full run.
- Production traces logged and sampled for scoring.
- A named owner for the weekly review.
When is a full evaluation suite overkill?
When stakes and volume are both low. A prototype for five pilot users needs 30 real questions in a spreadsheet and a person reading every answer, not CI pipelines. And if you can't write down what a correct answer looks like, the problem is the spec, not the tooling. Our AI readiness checklist covers that groundwork.
The suite becomes mandatory once outputs reach customers without review, the app takes actions in other systems, or more than one person edits the prompts.
How OrchidBytes handles evaluation
Evaluation is part of our AI build packages, not an add-on. An LLM Feature Integration (from $10,000, 3–4 weeks) ships with an evaluation set that runs in CI. A RAG Knowledge Assistant (from $12,000, 3–4 weeks) includes an accuracy report on 100–300 real questions, with search and answers scored separately. Our support and receptionist agents ship with 50–200 test conversations, and the AI Care Plan ($1,500 a month) includes monthly evaluation runs. Prices are on our pricing page.
If you already run an AI feature without tests, start by collecting 50 real inputs and agreeing what good looks like.
What is LLM evaluation?
LLM evaluation is the process of testing whether an application built on a large language model does its job well enough to ship. For a business app, that means running a fixed set of realistic inputs through the system, scoring the outputs against written pass criteria using code checks, an AI judge and human review, and repeating the run every time a prompt, model or data source changes.
What is the difference between LLM benchmarks and evaluating your own app?
Public benchmarks score a raw model on general tasks such as math, coding or trivia. They help you shortlist models but say little about your product. Evaluating your app tests the whole system, including prompts, retrieval, tools and output format, on the questions your users actually ask, against criteria your business sets.
How many test cases do you need to evaluate an LLM app?
Start with 50–100 cases for early prototyping and grow to 200–500 before a customer-facing launch. At a 90% pass rate, 100 cases give a margin of error of about plus or minus 6 points, which is too wide to spot small regressions. Larger, stratified sets and case-by-case comparisons between runs make changes visible.
Is LLM-as-a-judge reliable?
It can be, once calibrated. Research on MT-Bench found strong judge models agreed with human preferences over 80% of the time, about as often as humans agree with each other, but also documented position and verbosity bias. Use pass or fail verdicts per criterion, pin the judge model and check it against a hand-labeled sample before trusting its numbers.
What tools are used to evaluate LLM applications?
Common open-source options include Ragas for retrieval metrics, Promptfoo and DeepEval for test suites in CI, and Langfuse for tracing and production scoring. The tool matters less than the test set and pass criteria. Fifty real questions with agreed answers beat any framework running generic metrics on synthetic data.
How often should you re-run LLM evaluations?
Run a small smoke set on every prompt or code change, the full set before each release and whenever a provider updates or retires a model, and a sampled check on live traffic continuously. Add every production failure you find to the test set so the same mistake can't quietly return.
Start a project
Tell us what you want AI to do. We'll tell you what it costs.
A free 30-minute scoping call. You leave with a fixed-price recommendation, or an honest "don't build this".