# Supervised learning

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

Supervised learning is a machine learning method in which a model is trained on examples that come with known correct answers, called labels, so it learns to predict the label for new inputs.

Also called: supervised machine learning, supervised ML.

## In plain language

Supervised learning is teaching by example with an answer key. For example, a model can learn from emails marked spam or not spam. Targets may come from human annotation, recorded outcomes or automatic derivation; neither human annotation nor thousands of examples defines the method. Later it can label new items it has never seen. The quality of the answer key matters: if the labels are wrong or the test items leaked into the practice set, the model will look better than it is.

## Technical definition

Supervised learning uses training examples that pair inputs with target labels. Classification predicts categories; regression predicts numerical values. Many models learn parameters by minimizing prediction error, but this is not required by every supervised method: basic k-nearest neighbors retains examples and predicts from nearby ones. Separate validation and test data help estimate performance on new examples; their reliability depends on the evaluation design.

## How it shows up when you use agents

Training a classifier from input-target examples is supervised learning. Scoring a model or building an evaluation set is related evaluation work, but does not by itself establish supervised training. The vocabulary shows up in the code: features, labels, train and test splits, loss. Understanding it lets you review what the agent produced instead of trusting a number it prints.

The main risk is leakage. If the same record, or a near-duplicate, lands in both training and test files, the test score is inflated. If a feature secretly encodes the label, the same happens. Ask the agent to show how the split was made, and consider a checker such as split-leakage-check before believing a result.

Language models connect here too. An autoregressive [language model](/glossary/language-model) can learn next-token prediction from text-derived targets; other language-modeling objectives also exist. Later [fine-tuning](/glossary/fine-tuning) can use labeled examples of desired answers. Evaluating an LLM feature uses a labelled set as well. For the other main approach, where no labels are given, see [Unsupervised learning](/glossary/unsupervised-learning). For the wider field, see [Machine learning](/glossary/machine-learning).

## Common confusions

- **Supervised versus unsupervised.** Supervised learning needs labelled examples and predicts the label. Unsupervised learning has no labels and looks for structure such as groups. See [Unsupervised learning](/glossary/unsupervised-learning).
- **Supervised learning versus fine-tuning.** Fine-tuning continues training an existing model on new data. It often uses labelled examples, so it can be supervised, but the terms are not the same.
- **Myth.** More labelled data always fixes a model. Wrong, duplicated or imbalanced labels can make it worse, which is why dataset checks matter.
- **Label versus feature.** Features are the inputs. The label is the answer the model should predict.

## 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: A JSON report checking train, validation and test files for duplicates, shared groups, time leakage and label leakage.

Why it exercises the concept: Supervised models are judged on data they have not seen. This skill tests whether that separation actually holds.

### [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, with a checker for duplicates, missing graders and imbalance.

Why it exercises the concept: Known answers support labelled evaluation of language-model features. Building or checking this test set does not itself train a supervised model.

### [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 labelled match and non-match strings, then proved against every example you supplied.

Why it exercises the concept: Labelled positives and negatives in, a rule out. It is supervised learning in miniature, with a checkable rule instead of a trained model.

### [Claude Code](https://skillalmanac.com/tools/claude-code)

```
claude
```

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

What you see: A terminal session where an agent can read your training script and data files and run them with your approval.

Why it exercises the concept: Agents are commonly asked to write and debug supervised training and evaluation code.

## Related terms

- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Unsupervised learning](https://skillalmanac.com/glossary/unsupervised-learning.md)
- [Neural network](https://skillalmanac.com/glossary/neural-network.md)
- [Fine-tuning](https://skillalmanac.com/glossary/fine-tuning.md)
- [Deep learning](https://skillalmanac.com/glossary/deep-learning.md)
- [Semi-supervised learning](https://skillalmanac.com/glossary/semi-supervised-learning.md)

## Sources

- [What is supervised learning?](https://www.ibm.com/think/topics/supervised-learning), IBM (accessed 2026-11-23)
- [Introduction to Machine Learning: Supervised learning](https://developers.google.com/machine-learning/intro-to-ml/supervised), Google for Developers (accessed 2026-11-23)
- [Nearest Neighbors: classification and regression](https://scikit-learn.org/stable/modules/neighbors.html), scikit-learn (accessed 2026-11-24)

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).
