Quality criteria for an LLM answer
LLM answer quality is broken into independent criteria: factual correctness, relevance, completeness, format, safety, tone, latency and cost. Each is measured in the cheapest reliable way: format and length by code, meaning by a human or a judge model with a rubric of described levels. The judge is calibrated on human labels, and the golden set holds typical, edge, hard and adversarial queries and does not change with the prompt.
QA Fundamentals · AI in testing
Two people rated the same bot answer 2 and 5. What went wrong with the criteria?
The new prompt is "better", says a developer, and shows three good answers. QA asks: better by what measure? Without criteria, quality stays an impression, and impressions are especially deceptive in LLM features because answers are well phrased. This lesson is about breaking "quality" into checkable criteria, assembling a reference set and making a score that is reproducible.
How it works and why. The quality of an answer is not one number but several independent properties. An answer may be factually right and entirely off topic, or complete but in a broken format. So the criteria are separated, and each is measured in the cheapest reliable way: whatever can be counted by code (format, length, language) is checked by code; whatever needs understanding of meaning (correctness, relevance, tone) is scored by a person or a judge model with a rubric.
| Criterion | What it is | How to measure |
|---|---|---|
| Factual correctness | checked against a source, a reference | a person, a judge with a rubric |
| Relevance to the question | answers exactly the request | a judge with a rubric |
| Completeness | all required points are named | a point checklist, a judge |
| Format and instructions | JSON schema, length, language | code, no model |
| Safety | nothing harmful or private | rules, a classifier, a person |
| Tone and style | matches the brand | a judge, sampled human review |
| Latency and cost | response time, tokens | measurement |
A golden set is a set of requests with expected answers or criteria prepared and checked by people. It is run on every new prompt or model version and the metrics are compared with previous ones: it is the regression set for an LLM. The make-up of the set matters: typical requests, boundary ones, hard ones, off-topic ones and attempts to bypass the rules. A set of only "easy" questions gives nice numbers and shows nothing.
A rubric for a judge: vague and anchored
"rate quality from 1 to 5"
Every judge (a person or a model) puts in their own meaning, so scores diverge and cannot be reproduced.
every level is described
Levels are tied to observable features and two judges more often give the same score.
Example: from "rate quality" to a rubric. The instruction to a judge that people most often start with:
Rate the bot's answer from 1 to 5 for quality.
A model will give 4 to almost everything, because there is nothing to lean on, and a rerun easily gives 3. A rubric with anchors for one criterion:
Criterion: correctness against the provided context
3: every claim is supported by the context
2: one inaccurate claim that does not change the conclusion
1: a claim that contradicts the context or is invented
0: the answer is off topic
Output JSON: {"score": number, "evidence": a quote from the answer}
What changed. There is one named criterion. Each level describes an observable feature and not "better or worse". The judge must give a quote that can be checked. Next the judge is calibrated: take a sample of answers scored by people and see how often the judge agrees with them. If the disagreement is large, the rubric is rewritten instead of continuing to trust the numbers.
Limits and alternatives. Judge models have known biases: a tendency toward longer answers, toward answers in their own style, toward presentation order. They are reduced by a clear rubric, order shuffling and sampled human checks but not removed entirely. A comparison with a reference answer suits cases where there is one right answer; for open answers criteria are better. The number of criteria has a limit too: five meaningful ones beat twenty that nobody maintains. The weights depend on the product: for a medical bot safety outweighs tone, for a marketing one the other way round.
Common mistakes.
- Measuring "quality" with one number: a bad result does not say what exactly broke.
- A set of only easy requests: metrics rise while the risks stay outside the checked area.
- A rubric without level descriptions: scores are not reproducible.
- Not calibrating the judge: you can track for years a number that means nothing.
- Changing the golden set together with the prompt: comparison with past versions loses its meaning.
Check yourself
A new prompt version raises the judge’s average score from 3.8 to 4.2, but two people who looked at 20 answers say it got worse. What do you check?
Answer
The judge’s calibration: does it agree with the human labels. It likely prefers longer answers or a different style. Also check whether the make-up of the set changed. Without calibration the number cannot be trusted.
Why is it better to check JSON format and answer length with code and not with a judge model?
Answer
Code gives an exact, cheap and reproducible result, while a judge model can err and costs money. Keep models for what code cannot count: correctness, relevance, tone.