Supervised, unsupervised, reinforcement learning — when to use each.
Published September 21, 2026
Machine learning systems learn from data, but they learn in different ways depending on what kind of feedback the data provides. That difference, rather than the specific algorithm, is the first thing to identify when framing any ML problem. "Is this supervised or unsupervised?" decides what data you need to collect, how you'll measure success, and which tools apply.
Every training example comes with the correct answer (the label). The model learns to map inputs to outputs, then predicts outputs for new inputs.
The catch is labels. They're often expensive (doctors labelling scans), slow (you only learn whether a loan defaulted after years), or noisy (inconsistent human judgements). Much of real-world ML effort goes into getting good labels. Details are in Supervised Learning.
The data has no labels. The algorithm looks for structure on its own.
The catch is evaluation. Without correct answers, "is this clustering good?" is partly a judgement call. It's usually validated by whether the result is useful downstream: do the segments respond differently to campaigns?
In practice you often have a little labelled data and a lot of unlabelled data. Semi-supervised methods use both, for example training on the labelled set, labelling the unlabelled data with confident predictions, and retraining. Weak supervision creates approximate labels from rules or heuristics. Both reduce labelling cost.
The labels are derived automatically from the data itself, typically by hiding part of it and predicting it:
Text: "The payment service timed out" → hide the last word, predict "out"
Images: hide a patch of the image → predict the missing pixels
No human labelling is required, so models can train on internet-scale data. This is how large language models are pre-trained (next-token prediction), and how many image and audio models learn general representations. Those "foundation models" are then fine-tuned with smaller amounts of supervised or preference data for specific tasks.
An agent takes actions in an environment and receives rewards or penalties. There are no correct answers per step, only feedback on outcomes, sometimes long delayed. The agent learns a policy (what to do in each situation) that maximizes total reward over time.
The catches: it needs many interactions (often in simulation), reward functions are hard to design (agents exploit loopholes in badly specified rewards), and exploring by trial and error is risky in the real world.
| If you have… | And want to… | Type |
|---|---|---|
| Past examples with known outcomes | Predict the outcome for new cases | Supervised |
| Lots of data but no outcomes | Discover groups, patterns or outliers | Unsupervised |
| A few labels and lots of unlabelled data | Get supervised-quality results more cheaply | Semi-supervised |
| Huge raw text, images or audio | Learn general-purpose representations | Self-supervised (usually by using an existing foundation model) |
| An environment you can act in, and a measurable goal | Learn a sequence of decisions | Reinforcement learning |
Framing examples:
Q: What's the main difference between supervised and unsupervised learning? A: Supervised learning trains on examples paired with correct answers to predict those answers for new data. Unsupervised learning has no answers and discovers structure (clusters, low-dimensional patterns, anomalies) in the data itself.
Q: Is an LLM supervised or unsupervised? A: Its pre-training is self-supervised: the next token in real text acts as the label, so no human labels are needed. It's then typically refined with supervised fine-tuning on instruction examples and with preference-based methods such as RLHF.
Q: How do you evaluate a clustering? A: With internal measures such as silhouette score (how compact and well-separated clusters are), stability across runs, and most importantly usefulness: do the clusters make sense to domain experts, and do they lead to different, better decisions downstream?
Q: When is reinforcement learning the right tool? A: When the problem is a sequence of decisions with delayed outcomes, you can interact with an environment (ideally a simulator), and the goal can be expressed as a reward. For one-off predictions from historical data, supervised learning is simpler and more reliable.
Q: How would you approach a problem with very few labels? A: Start from a pre-trained model (transfer learning or embeddings) and fine-tune it on the few labels. Use semi-supervised or weak-supervision techniques. Apply active learning to label the most informative examples first. And check whether a rule-based baseline is already good enough.