LLM quality assurance is the discipline of testing language model output before it reaches users, and continuing to check it once it is live. It answers the question every team asks when its AI feature starts handling real traffic: how do we know the answers are still good? The short answer is a combination of automated evaluations, human review and release gates, each catching the failures the others miss.
Quality assurance matters because language models do not fail the way ordinary software does. A broken function throws an error; a broken model answer looks confident and reads well. Without a QA process built for that reality, bad answers ship silently and the first warning is a user complaint.
Key takeaways
- LLM quality assurance combines automated evals, human review and release gates.
- No single test catches every failure, so use several methods together.
- Build evaluation datasets from real user requests, not invented examples.
- Gate every prompt, model or data change on evaluation results before release.
- Keep checking quality in production, because models and users both change.
What LLM quality assurance covers
Quality assurance for language models covers three things: correctness, safety and usefulness. Correctness means the answer is factually right and grounded in the sources it was given. Safety means it does not produce harmful, biased or disallowed content. Usefulness means it actually answers the user’s question in a form the user can act on. A response can pass one of these and fail the others, which is why a single score is never enough.
QA also covers the whole lifecycle, not just a test run before launch. Pre-release testing catches problems in a prompt or model change. Production monitoring catches the drift that appears when real users ask questions your test set never imagined. Incident review turns each failure into a new test case, so the same mistake is caught automatically next time. Our guide to building an LLM evaluation framework explains how to structure the evaluation side of this work.
The scope should match the stakes. A writing assistant that drafts social posts needs lighter QA than a system that answers questions about benefits eligibility or medical symptoms. Decide the stakes first, then set the depth of testing, the review coverage and the release gates to match.
Automated evaluation: your first line of defence
Automated evaluation, usually called evals, scores model output against a dataset of test cases. Each case has an input, the expected behaviour, and a scorer that judges the output. Scorers range from simple rules, such as checking that the output is valid JSON, to model-based judges that rate factual accuracy or relevance. The dataset is the asset: a good one is built from real user requests, covers the edge cases you have actually seen, and grows with every incident.
Run evals on every change. A new prompt version, a different model, a changed retrieval source or a new tool should all pass the same evaluation suite before release, so regressions are caught by a number rather than by a user. Compare results across versions, not against an absolute threshold, since the absolute score depends on how hard your test set is. What matters is whether the new version is better or worse than the old one. The LLM evaluation metrics guide explains which scores measure what, and where each one fails.
Keep evals honest. A test set that only contains easy cases will pass everything. A scorer that is the same model being tested will often agree with itself. Mix scorer types, include adversarial cases, and refresh the dataset regularly, because a frozen test set eventually stops reflecting what users actually ask. Best for: every team shipping LLM features, since evals are the cheapest way to catch regressions before release.
Human review: what automation cannot catch
Human review catches the failures that scorers miss: answers that are technically correct but unhelpful, tone that is wrong for the audience, and subtle errors that only a domain expert would spot. It is slower and more expensive than automated evaluation, so use it where it adds the most value: a sample of production conversations, the outputs of high-stakes flows, and any case where an automated scorer is uncertain.
Make review structured rather than casual. Give reviewers a short rubric with a handful of criteria, such as factual accuracy, relevance, tone and safety, and a simple scale for each. Record the scores alongside the conversation, so review results feed back into the evaluation dataset and the team can track quality trends over time. Unstructured review produces opinions; structured review produces evidence.
Review the reviewers too. Two reviewers will disagree on a meaningful share of cases, and that disagreement is useful information: it shows which criteria are unclear and which kinds of answer are genuinely borderline. Check agreement regularly, refine the rubric where reviewers diverge, and do not treat a single reviewer’s verdict as ground truth. For the production side of this practice, see our guide to building an LLM evaluation pipeline.
Release gates: stopping bad changes from shipping
A release gate is a check that a change must pass before it reaches users. For LLM applications, the gate should cover the evaluation suite, a human review sample, and a check of cost and latency. A prompt change that improves accuracy but doubles cost or triples latency is not a clear win, and the gate is where that trade-off gets decided.
Start with a simple gate and make it stricter as the application matures. Early on, the gate might be that eval scores do not fall and a reviewer has looked at a sample of outputs. Later, add thresholds for specific scorers, a canary release to a small share of users, and a rollback rule that triggers if production quality scores drop. The gate should be automated where possible, because a manual gate that everyone is in a hurry to skip is not a gate at all.
Canary releases deserve special attention for LLM changes. Releasing a new prompt or model to a small percentage of users, then comparing quality scores, error rates and user feedback against the old version, catches problems that no test set contains. Real users ask questions your dataset never imagined, and the canary is where those questions first appear.
Testing retrieval and tools, not just the model
Most LLM failures are not model failures. The retrieval step returns irrelevant documents, a tool returns the wrong data, or the prompt assembles the context badly, and the model faithfully produces a wrong answer from bad inputs. Quality assurance that only tests the model will miss all of these.
Test each layer separately. Retrieval tests check whether the right documents come back for a set of questions, using measures such as whether the correct document appears in the top results. Tool tests check that each tool returns the expected data for known inputs. Prompt tests check that the assembled context contains what the model needs and nothing it does not. When a failure appears in production, the layer tests tell you where to look. Our guide to RAG evaluation best practices covers retrieval testing in detail.
Include failure cases in the tests. What happens when retrieval returns nothing? When a tool times out? When the user asks something outside the system’s knowledge? The model’s behaviour in these cases is part of the product, and it should be tested deliberately rather than discovered by users.
| QA method | What it catches | Cost and speed | When to use it |
|---|---|---|---|
| Automated evals | Regressions, format and factual errors | Cheap, fast, runs on every change | Every prompt, model or data change |
| Human review | Nuance, tone, subtle errors | Expensive, slow, sampled | High-stakes flows, sampled traffic |
| Release gates | Bad changes reaching users | Moderate, automated where possible | Every release, stricter over time |
| Canary releases | Problems no test set contains | Moderate, needs monitoring | Model and major prompt changes |
| Production monitoring | Drift, new user behaviour | Ongoing, mostly automated | Continuously, with weekly review |

Quality assurance in production
Release is not the end of QA. Models change, users change, and the data behind retrieval changes, so quality that was good at launch can drift within weeks. Production QA means continuously scoring a sample of live traffic, reviewing the results on a schedule, and turning failures into new test cases.
Set up a weekly quality review. Look at the scores, read a sample of flagged conversations, and check whether the failures cluster around a prompt version, a topic, or a retrieval source. Each cluster is a fix and a new test case. Over time, the test set grows to cover the failures that actually happen, which is far more valuable than a test set built from guesses. The LLM service level objectives guide shows how to turn production quality scores into targets the team can be held to.
Close the loop on user feedback. A thumbs-down on an answer, a corrected response, or a support ticket about a wrong answer are all QA signals. Route them to the same queue as evaluation failures, review them in the same weekly session, and add the best examples to the test set. Users are the most thorough testers you have, and ignoring their reports wastes the testing they already did for free.
LLM quality assurance checklist
- An evaluation dataset built from real user requests, including edge and failure cases.
- Evals run on every prompt, model, retrieval and tool change before release.
- Results are compared across versions, not judged against an absolute threshold alone.
- Human review covers a sample of production traffic and all high-stakes flows.
- Reviewers use a short written rubric, and agreement is checked regularly.
- Release gates cover evals, human review, cost and latency.
- Major changes go out as a canary to a small share of users first.
- Retrieval and tools are tested separately from the model.
- Production quality is scored continuously and reviewed weekly.
- Every production failure becomes a new test case in the dataset.
Frequently asked questions
How is LLM quality assurance different from software QA?
Software QA tests deterministic behaviour: given an input, the output is either right or wrong. LLM QA tests probabilistic behaviour: the same input can produce different outputs, and correctness is often a matter of degree. That means statistical evaluation, sampled human review and production monitoring matter far more than pass-or-fail test cases.
How big should my evaluation dataset be?
Big enough to cover the main kinds of request and the failures you have actually seen, and small enough to run quickly on every change. For most teams that means tens to low hundreds of cases to start, growing with every incident. A dataset of fifty real cases beats a dataset of five hundred invented ones.
Can I use a model to judge another model’s output?
Yes, and it is common practice, but treat the judge as one signal among several. A judge model can be biased towards its own style, can miss domain errors, and can agree with the model it is judging. Combine judge scores with rule-based checks and human review, and check the judge’s agreement with humans regularly.
How often should human review happen?
Continuously, on a sample, rather than in large occasional batches. A small weekly review of sampled production conversations catches drift early and keeps the test set current. Large quarterly reviews find the same problems months too late.
What should I do when quality drops in production?
First, check what changed: a prompt version, a model update, a retrieval source, or a shift in what users are asking. Then roll back the change if one is responsible, or add the failing cases to the evaluation dataset and fix the underlying cause. Do not ship a fix without running the failing cases against it.







