# Ground truth

> Canonical: https://skillalmanac.com/glossary/ground-truth | Last verified: 2026-11-25 | Index status: index-eligible

Ground truth is verified data taken as the reference for what is correct, such as a correct label for each example, which is used to train, check and test AI models and against which their outputs are compared.

Also called: ground truth data, ground truth in machine learning, ground truth labels, ground-truth data.

## In plain language

Ground truth is the answer key. If a model predicts whether a photo shows a cat, the ground truth is whether it really does. You score a model by comparing its answers with that key. The catch is that the key is only as good as whoever wrote it. Two people may label the same thing differently, records can contain errors and facts can change over time. Google's glossary notes that ground truth is not always completely truthful. Building a reliable one can be slow and costly when experts are needed. A model that scores well against a flawed answer key has only shown that it agrees with the key.

## Technical definition

Ground truth is the reference data used for training, validation and testing in supervised learning: the actual outcome or a verified label for each example.  Model outputs are compared with it to judge quality. IBM names limits: labeling errors and inconsistencies, subjective judgement between annotators, harder labeling for complex data such as natural language, and incomplete or unbalanced datasets that introduce bias. Google's glossary gives the example of a graduation record that may itself be wrong, and notes that expert raters sometimes intervene to improve consistency. IBM says the labeled dataset can be updated as real-world conditions evolve.

## How it shows up when you use agents

Ground truth shows up the moment you ask whether an agent or prompt is any good. To assess a result, you need a suitable reference, such as validated expected outputs or a verified list. Validated expected answers for a prompt or an agent can serve as ground truth. Flawed references can mislead scores even when some errors leave an aggregate number unchanged.

For coding agents the reference is often a test suite or a known good output. For language tasks it can be a set of validated reference answers. A rubric or model grader is a scoring procedure whose judgments also need validation, as in [LLM-as-a-judge](/glossary/llm-as-a-judge) setups, and a public [LLM benchmark](/glossary/llm-benchmark) rests on the ground truth its authors wrote. The skill [llm-eval-test-sets](/skills/skill-almanac/llm-eval-test-sets) builds and validates such a set.

What breaks when ground truth is misunderstood: a model that fails is assumed to be wrong, when sometimes the reference is. A next action is to take the cases where the model and the reference disagree and read a handful by hand before changing the prompt. Keep held-out evaluation answers out of the evaluated prompt and training files; legitimate supervised training labels are different. The skill [split-leakage-check](/skills/skill-almanac/split-leakage-check) checks specified leakage risks. Reference sets also need review over time, because facts and requirements change. Labels come from [data labeling](/glossary/data-labeling).

## Common confusions

- **Ground truth versus labels.** A label is one tag on one example. Ground truth is the set of labels, or other verified outcomes, that you decide to treat as correct. See [Data labeling](/glossary/data-labeling).
- **Ground truth versus model output.** The model output is a prediction. Ground truth is what you compare it with.
- **Ground truth versus Amazon SageMaker Ground Truth.** The second is the name of a labeling service from AWS. The term in this entry is the general concept.
- **Myth.** Ground truth is perfectly true. Google's glossary notes it is not always completely truthful, and IBM lists annotator disagreement and labeling errors as limits.

## Worked examples in this catalogue

### [llm-eval-test-sets](https://skillalmanac.com/skills/skill-almanac/llm-eval-test-sets)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: An eval dataset for an LLM feature, built and validated with a checker for duplicates, missing graders, imbalance and leakage.

Why it exercises the concept: Each case in an eval set needs an expected answer or a grader. That reference is the ground truth the feature's output is judged against.

### [split-leakage-check](https://skillalmanac.com/skills/skill-almanac/split-leakage-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A check of train, validation and test files for duplicates, shared groups, time and label leakage, printed as JSON.

Why it exercises the concept: A test file only works as a reference if its answers are kept apart from training. The check looks for items and label information that cross that line.

### [huggingface-datasets](https://skillalmanac.com/skills/huggingface/huggingface-datasets)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Dataset metadata, rows, search and filters read through the Hugging Face Dataset Viewer API.

Why it exercises the concept: Labeled datasets often include a label column. Reading rows lets you inspect what the labels say and judge them yourself.

### [regex-from-labeled-examples](https://skillalmanac.com/skills/skill-almanac/regex-from-labeled-examples)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A Python regular expression proposed from labeled match and non-match strings, then proved against every supplied example in a row-by-row table.

Why it exercises the concept: The labeled strings are the ground truth. The row-by-row table compares the result with each label.

## Related terms

- [Data labeling](https://skillalmanac.com/glossary/data-labeling.md)
- [Supervised learning](https://skillalmanac.com/glossary/supervised-learning.md)
- [Training data](https://skillalmanac.com/glossary/training-data.md)
- [LLM benchmark](https://skillalmanac.com/glossary/llm-benchmark.md)
- [LLM-as-a-judge](https://skillalmanac.com/glossary/llm-as-a-judge.md)

## Sources

- [What is ground truth?](https://www.ibm.com/think/topics/ground-truth), IBM (accessed 2026-11-24)
- [Machine Learning Glossary: ground truth](https://developers.google.com/machine-learning/glossary#ground-truth), Google for Developers (accessed 2026-11-24)
- [Graders](https://developers.openai.com/api/docs/guides/graders), OpenAI developer documentation (accessed 2026-11-25)
- [Common pitfalls: Data leakage](https://scikit-learn.org/stable/common_pitfalls.html#data-leakage), scikit-learn (accessed 2026-11-25)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
