Supervised and unsupervised learning describe two fundamentally different ways a machine learning model learns from data: either it's given the correct answers to learn from, or it has to find structure in data with no labeled answers at all. Knowing which category a real problem falls into is one of the first, most consequential decisions in scoping any machine learning project, well before choosing a specific model or technique.

Supervised learning: learning from labeled examples

In supervised learning, the model trains on data that's already labeled with the correct answer and learns to predict that label for new, unseen examples. A model trained on emails labeled "spam" or "not spam" learns the patterns that distinguish the two, then applies that learned pattern to classify new emails it hasn't seen before. This is the right approach when you have a specific, known outcome you're trying to predict, and labeled historical examples of that outcome to learn from.

Common real applications

Classification tasks (spam detection, fraud detection, document categorization) and prediction tasks (forecasting a numeric outcome like demand or price) are both supervised learning problems, because both require a known, labeled outcome to train against.

Unsupervised learning: finding structure with no labels

In unsupervised learning, the model works with unlabeled data and looks for patterns or structure on its own, such as grouping similar items or identifying unusual outliers, without being told in advance what the "correct" grouping should be. This is the right approach when you want to discover what natural groupings or patterns exist in data you don't have labeled examples for.

Common real applications

Customer segmentation (finding natural groupings in customer behavior without predefined categories) and anomaly detection (identifying unusual patterns without a predefined list of what "unusual" looks like) are classic unsupervised learning applications.

Why the distinction matters practically, not just academically

The choice isn't really a preference; it's determined by what data you have and what question you're trying to answer. If you have labeled historical outcomes and want to predict that same outcome for new cases, that's a supervised problem. If you're trying to discover structure or patterns you don't yet have a predefined answer for, that's an unsupervised problem. Forcing one approach onto a problem that fits the other usually produces a worse result than matching the technique to what the problem and data call for.

Where modern generative AI fits into this framing

Modern large language models don't map neatly onto the classic split. Pretraining is usually described as self-supervised: the model learns to predict the next token in huge amounts of raw text, so the "labels" come from the text itself rather than from human annotation. That's typically followed by supervised fine-tuning on curated examples and by reinforcement learning from human (or AI) feedback to refine behavior. The classic distinction remains genuinely useful for traditional machine learning problems (classification, prediction, clustering), but it isn't the most useful frame for understanding how an LLM is trained.

A practical question to ask when scoping a machine learning problem
"Do we have labeled examples of the specific outcome we're trying to predict?" If yes, that's a strong signal toward supervised learning. If you're instead trying to discover unknown structure or patterns with no predefined labels, that points toward unsupervised techniques. The data you actually have often determines the answer more than any preference does.

How we approach this

We match the machine learning approach to the actual shape of the problem and the data available: supervised for known outcomes with labeled examples, unsupervised for genuine pattern discovery. We don't default to whichever technique is more familiar.