LLM & AI agents

Evaluating LLMs: Correctness, Grounding and Hallucinations

LLM evaluation is separated into correctness, grounding, schema validity, safe refusal, latency and cost. The article covers leakage-resistant reference sets, expert calibration of model judges and paired comparisons between versions. Questions about technical standards show why a correct number is insufficient without the right source version and unit, and why refusal coverage must be evaluated alongside the error rate of answered questions.

On this page

Why is one quality score dangerous?

Answering correctly, finding the right document and extracting valid JSON are different achievements. A satisfaction score may reflect good impressions from easy questions while hiding rare, serious failures. Keeping correctness, grounding, format, refusal, latency and cost separate makes those differences visible. Some failures cannot be traded against a score: disclosing an unauthorised document is not offset by better answers elsewhere. Task purpose and failure costs determine how these dimensions are interpreted.

How do you build a useful gold set?

Collect examples reflecting real user needs and remove sensitive identifiers. Experts should define acceptable answers, required evidence, relevant document versions and expected refusal behavior. Easy questions help development but do not reveal system limits. Include multi-step reasoning, table exceptions, missing evidence, conflicting sources, languages and typos. Near-paraphrases spread across tuning and held-out test sets can inflate apparent gains. Version and audit the origins of evaluation cases.

An LLM evaluation workflowTask + riskGold evaluation setMultiple metricsFailure analysisRegression + monitor
Figure 1. Reference questions, candidate answers and expert-calibrated scoring support reproducible comparisons between versions.

Grounding and factuality are not identical

Grounding asks whether claims follow from the supplied evidence. Factuality asks whether the claims match reality or the authoritative domain truth. Faithfully summarizing an incorrect source can be grounded but factually wrong. A correct fact may also appear without support from retrieved passages. Therefore grade evidence support and factual accuracy separately. Wrong citation IDs, irrelevant passages and fabricated page numbers need their own checks. The presence of citations does not guarantee correctness.

When are model-based judges useful?

A language model can grade many answers against a common rubric, but its model family, presentation order and shared failure patterns can affect the score. Agreement with expert-labelled examples shows where the judge is useful. Hiding model names or changing answer order can reveal sensitivity to presentation. Automated grading may reduce review effort without independently establishing the correctness of critical decisions.

How do you evaluate structured outputs and tool calls?

Valid JSON is necessary but not sufficient. A syntactically correct object can contain the wrong product ID, date or unauthorized field. Validate values, cross-field consistency and business rules in addition to schemas. For tool calling, evaluate tool selection, argument correctness, permission checks and actual side effects separately. “The tool was invoked” is not proof of success; verify that the right record changed for the right user. Test safe behavior after malformed tool outputs and avoid fabricated success messages.

Distinctions that matter in designFluency: presentationGrounding: evidence supportCorrectness: factual accuracySafety: acceptable behavior
Figure 2. Fluency, grounding, factual correctness and safe refusal should not collapse into one score.

Refusal and uncertainty are quality metrics

A knowledge assistant that confidently answers questions absent from its corpus may be failing. Evaluate when the system abstains on unanswerable queries, privileged actions and high-risk ambiguity. Report coverage—how often an automated answer is produced—alongside error rate among answered cases. Refusing too often hurts utility; refusing too rarely increases risk. Calibrate thresholds to the actual business decision. Polite uncertainty wording does not by itself demonstrate calibrated uncertainty.

Comparative evaluation and statistical uncertainty

Success rates of 82 and 84 percent do not by themselves establish a reliable advantage. Wins and losses on the same questions and the number of independent examples change the interpretation. Paired comparisons and appropriate bootstrap intervals can expose that uncertainty. Expert disagreement about labels is another uncertainty source rather than automatically a model error. Repeatedly tuning prompts on test questions also weakens that set as an independent estimate of future performance.

How does evaluation continue in production?

Production evaluation needs more than latency and cost dashboards. Track wrong citations, schema failures, user corrections, unauthorized access attempts and human handoffs. Clicks and satisfaction signals can be biased toward easy, high-volume workflows. Continue expert reviews on sampled critical cases. Link model, prompt, retrieval-index and tool versions in traces. Rerun relevant regression suites after every meaningful change to isolate causes. Evaluation is an operational process rather than a one-time launch checklist.

The right number from the wrong standard version

Illustrative scenario; not a measured project result.

Imagine a quality assistant reading a limit from a technical standard. If the numeric value is correct but it cites an obsolete revision, a simple “correct answer” label is misleading. Likewise, choosing the right document but using the wrong unit is a critical failure. A useful evaluation set grades source revision, unit handling, claims and refusal separately. The scenario uses fictional limits to illustrate error categories.

Answer differences hidden by a single score

A technical answer may contain the right number but the wrong unit, standard version or source. Valid JSON does not establish that its business fields are correct either. Evaluation should explain which failures remain rather than blend them into one score. A system that abstains and one that answers everything also differ in coverage, which changes how their accuracy can be interpreted.

Frequently asked questions

Can hallucinations be reduced to zero?

There is no general guarantee. Evidence, validation, abstention and business rules can reduce risk.

Can an LLM judge replace human review?

It can scale low-risk checks, but high-stakes cases require expert calibration and independent validation.

Is a single evaluation score enough?

No. Accuracy, grounding, safety, format and cost should be tracked separately.

References and further reading

  1. HELM: Holistic Evaluation of Language Models
  2. NIST — AI RMF Generative AI Profile
  3. OpenAI — Guardrails and Human Review
  4. OpenAI — Integrations and Observability