# Training data

> Canonical: https://skillalmanac.com/glossary/training-data | Last verified: 2026-11-24 | Index status: index-eligible

Training data is the collection of examples a machine learning model learns from. During training the model adjusts itself to fit patterns in these examples, so what it can do and where it fails depends heavily on what they contain.

Also called: training dataset, AI training data, training set.

## In plain language

Training data is the collection of examples used to fit a model. A supervised spam filter might use emails labeled spam or not spam. Other training setups use unlabeled data or targets derived from the data itself. The examples influence what the model learns and can carry omissions, errors or bias. Generalization means using learned patterns on new examples; it is not proof that every output is correct.

## Technical definition

Training examples are used by the learning procedure to fit a model. Supervised examples pair inputs with targets; unsupervised procedures do not require supplied target labels. Validation data support choices such as model selection, while test data support evaluation under a specified sampling design. Leakage, including preprocessing fitted on evaluation data, can bias results. A held-out score is an estimate, not a guarantee of performance on every future input.

## How it shows up when you use agents

When you run Claude Code, Codex or Cursor, you may not have access to the model's complete training data. That training explains its habits, such as which libraries it knows well, and its gaps, such as tools released after its training ended. Files supplied as context to a fixed-weight request are not thereby used to update parameters. An agent can separately invoke training code, and service data-use policies are a different question. See [Large language model](/glossary/large-language-model).

Misunderstanding this causes two failures. People expect the agent to know a recent API and get confident, outdated code; the safer habit is to put current documentation in front of it. People also assume their private files in a session train the vendor's model; whether that happens depends on the vendor's data terms, which you should read before pasting sensitive material.

If you build your own model or fine-tune one, data quality and the training setup both need review. Profile it, split it into training and test files, and check for leakage before trusting any score. See [Machine learning](/glossary/machine-learning) and [Overfitting](/glossary/overfitting).

## Worked example (illustrative)

Imagine records A and B used for fitting, C for choosing between configurations and D reserved for a final evaluation. Those roles correspond to training, validation and test use. Distinct record IDs alone do not prove independence: duplicated content, shared groups or future information can still leak across the split. This is an illustrative allocation, not a validated dataset.

## Common confusions

- **Training data versus prompt.** Training data shaped the model before you used it. A prompt supplies input context. In a fixed-weight request it does not update learned parameters; training or adaptation would be a separate operation.
- **Training data versus test data.** The test set is held back to measure how well the model handles examples it has not seen. If test examples also appear in training, the evaluation can become optimistic or otherwise misleading; the effect depends on the overlap and evaluation design.
- **Labeled versus unlabeled.** Supervised learning needs examples with answers attached; unsupervised learning does not (IBM). See [Supervised learning](/glossary/supervised-learning).
- **More versus better.** IBM says quality is also highly important. Large piles of noisy or biased data can make a model worse at the job you care about.

## Worked examples in this catalogue

### [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: The skill checks train, validation and test files for duplicates, shared groups, time and label leakage, and prints its findings as JSON.

Why it exercises the concept: Leakage means test examples are not really unseen. This is the practical check that keeps a model's evaluation honest against the data it learned from.

### [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: The skill reads Hugging Face datasets through the Dataset Viewer API: metadata, rows, search and filters.

Why it exercises the concept: Public datasets are a common source of training data. Looking at real rows and metadata before you train or fine-tune shows what the examples actually contain.

## Related terms

- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Supervised learning](https://skillalmanac.com/glossary/supervised-learning.md)
- [Unsupervised learning](https://skillalmanac.com/glossary/unsupervised-learning.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [Overfitting](https://skillalmanac.com/glossary/overfitting.md)
- [Synthetic data](https://skillalmanac.com/glossary/synthetic-data.md)

## Sources

- [What is training data?](https://www.ibm.com/think/topics/training-data), IBM (accessed 2026-11-23)
- [Machine Learning Glossary](https://developers.google.com/machine-learning/glossary), Google for Developers (accessed 2026-11-23)
- [Common pitfalls: data leakage](https://scikit-learn.org/stable/common_pitfalls.html), scikit-learn (accessed 2026-11-24)

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