How AI, ML, deep learning and GenAI fit together
These four terms are often used as if they meant the same thing. They are nested: each one is a special case of the one around it. We take them one at a time, from the outside in.
AI is the whole field, not one technology.
In its broad sense, artificial intelligence is the field of building systems that do tasks which normally take human intelligence, such as recognising a pattern, making a decision, planning a route or producing language. The definition is about the task. It does not say how the system must be built.
We take the four terms one at a time, from the outside in. Each one is a more specific way of doing the one before it:
- Artificial intelligence: any way of getting a machine to do such a task.
- Machine learning: the machine learns the pattern from examples.
- Deep learning: learning with a many-layer network.
- Generative AI: models that make new text, images or audio. Today’s well-known ones are built with deep learning.
Throughout this lesson we follow Postbox, an invented mail app. It has jobs like predicting when a parcel arrives, classifying a message as spam or not, recommending an article, and generating a draft reply. Those jobs are what a system does. The four rings are about how it is built to do them.
Artificial intelligence: the outer ring.

Artificial intelligence is the whole box below. Machine learning, deep learning and generative AI are all kinds of AI, drawn inside it.
AI has two families, based on where its behaviour comes from. In designed AI, people write the rules or steps it follows. In learned AI, the behaviour is fitted from examples. People design the system either way. The next three sections are about learned AI. This one is about designed AI.
Picture a tic-tac-toe opponent that follows three rules:
- Win if you can.
- Otherwise, block the other player.
- Otherwise, take the centre.
It seems to think, but a person wrote every rule and it learned nothing from past games. It is still AI: a machine doing a task that normally takes human thought.
Bigger designed systems work the same way. Classic chess programs search many moves ahead. Route planners search a map. Many real systems add learning on top.
One rule, such as “WINNER plus three links means spam”, is closer to ordinary software. It becomes AI when a system searches or reasons to make a judgement, like the tic-tac-toe player. The line is blurry.
Machine learning: learning from examples.
In machine learning, the system learns a pattern from examples, so a person does not have to write a rule for every case. People still design how it learns. The system adjusts its internal values to improve its performance on the examples.
In this simplified example, training uses messages labelled spam or not to fit a model. The learned model is the result of that training.
Later, when we use that same model, a new message goes into it and it predicts a label, such as spam. The prediction can be wrong; using the model here does not train it again.

The spam model sees thousands of emails labelled spam or not. A person picks clues, such as link count, and the model learns how much each one matters. Nobody wrote “three links means spam”.
Deep learning: many layers.

Deep learning is machine learning with neural networks that have many layers.
Those layers can find their own clues in raw text or pixels, so a person does not have to pick them. Not all machine learning is deep: a straight-line fit to past data is machine learning but not deep learning.
A many-layer network reads the raw message text and finds its own clues, such as phrasing and layout, to decide spam or not. It only labels messages. It writes nothing.
Generative AI: making something new.

Generative AI produces new content: text, images, audio or code.
The chatbots and image tools you hear about today are built with deep learning. That is why this ring sits inside deep learning.
Generating is a job, not one technology. Older methods can generate too, but their output is clumsy. And not all deep learning generates: the spam network above writes nothing.
A generative model writes a new draft reply in the tone you ask for. It is generated, not picked from a fixed template. It can still be wrong, and it can sometimes repeat wording from training or from your request, so read it before sending.
Read the rings one way. A modern generative model is also deep learning, machine learning and AI. The reverse is not true: the tic-tac-toe player is AI, but not machine learning.
Where does each one sit?
For each part of Postbox, pick the one description that fits best. A deep network is also machine learning and AI, but pick the most specific ring, which is the innermost one that fits. You can change an answer at any time.
Postbox is an invented mail app, and each part is a sketch of how that kind of approach works, not a description of a real product.
Where the picture is too tidy.
- Real products mix approaches. Postbox might block known bad senders with a rule, score the rest with a learned model, and draft replies with a generative one. The ring belongs to a component, not the whole app.
- The edges are fuzzy. “AI” is also used loosely, and sometimes as a marketing label. When a product says it is “AI-powered”, ask what job it does and how that part was built.
- Inner is not better. A rule can be the right tool when behaviour must be exact and explainable. A generative model can write fluent text that is wrong. Choose by the job and the cost of mistakes.
- The rings simplify. Generating new content is a capability that simpler methods can have too, so the innermost ring really stands for today’s deep generative models. Some diagrams describe generative AI as a use of deep learning rather than a ring of its own. The nesting idea holds either way.
Check your understanding.
Take this with you.
AI is the whole field, and rules count. Machine learning is the part where behaviour is fitted from examples, deep learning is the part that uses many-layer networks, and generative AI is the part, built today with deep learning, that produces new content. Each is inside the one before it. When you meet an “AI” product, ask what job it does and how it was built.