---
title: Supervised Learning: Learning With an Answer Key | Large Programs
description: In supervised learning a model learns from examples that come with the right answers. How it works with a cats-and-dogs example, and where you meet it.
canonical: https://www.largeprograms.com/what-is-supervised-learning/
---

[Home](/) / [How LLMs Work](/category/how-llms-work/)

How LLMs Work

# Supervised Learning: Learning With an Answer Key

In supervised learning a model learns from examples that come with the right answers. How it works with a cats-and-dogs example, and where you meet it.

27 November 2026 · 2 min read

**Supervised learning** is a kind of machine learning where the training examples come with the correct answers. The word "supervised" refers to a teacher or supervisor who provides those answers and guides the learner.

![Photos with labels train a model, which then makes a guess on a new photo.](/img/supervised-learning.svg)

## The answer-key idea

Imagine a pile of flash cards. Each card has a photo on the front and the right word on the back. A student looks at the photo, guesses, flips the card and checks. In supervised learning the computer does this with a very large number of examples. Each piece of input is paired with its correct output, which is called a **label**.

The source gives this example: to teach a model to identify cats in images, you feed it many images labelled "cat" or "not cat".

## How NIST defines it

NIST's glossary, quoting its report AI 100-2e2025, defines supervised learning as a type of machine learning in which a model learns to predict explicit (often human-generated) labels or output values for data.

## The goal: new examples

The goal is not to remember the cards. It is for the trained model to give a correct answer for **new data it has not seen**. Doing that well is called generalising.

## Two common jobs

- **Classification**: choosing a category, such as "spam" or "not spam".
- **Regression**: predicting a number, such as the price of a house.

## No perfect method

The source notes that no single learning method works best on every supervised-learning problem.

## The other kinds

In **unsupervised learning**, the model looks for patterns in data that has no labels. A third kind, reinforcement learning, learns from rewards (see [reinforcement learning](/what-is-reinforcement-learning/)). Large language models learn to predict the next word in text, which you can read about in [how LLMs learn](/how-do-llms-learn/).

## Try it

Make 10 cards with an animal picture or drawing on one side and its name on the back. Show them to a friend one at a time without the back. Then try new pictures they have not seen. Can they still name the animal? That is generalising.

## Sources

- [https://en.wikipedia.org/wiki/Supervised_learning](https://en.wikipedia.org/wiki/Supervised_learning)
- [https://csrc.nist.gov/glossary/term/supervised_learning](https://csrc.nist.gov/glossary/term/supervised_learning)

[Read this page as Markdown (.md)](/what-is-supervised-learning.md)

## Keep reading

[![](/img/hero/art-ai-art-and-music-basics.svg)](/ai-art-and-music-basics/)

How LLMs Work

### [How AI Makes Music: A Beginner's Look](/ai-art-and-music-basics/)

Models can generate melodies and songs by learning patterns in sound. What that means for musicians.

[![](/img/hero/art-backpropagation-how-neural-networks-learn-from-mistakes.svg)](/backpropagation-how-neural-networks-learn-from-mistakes/)

How LLMs Work

### [Backpropagation: How a Network Learns From Its Mistakes](/backpropagation-how-neural-networks-learn-from-mistakes/)

Backpropagation is the method that works out how to adjust each weight in a neural network after it makes an error. A simple explanation with a team analogy.

[![](/img/hero/art-chain-of-thought-prompting-showing-your-working.svg)](/chain-of-thought-prompting-showing-your-working/)

How LLMs Work

### [Chain-of-Thought Prompting: Showing the Steps](/chain-of-thought-prompting-showing-your-working/)

Asking a language model to show intermediate steps can improve its answers to hard problems. What the research found and how it is like showing your working in maths.
