AI, machine learning and deep learning
AI, machine learning, deep learning and LLMs are four nested ideas, not four words for the same thing. Watch each one try the same job, spotting a scam SMS, and see where each one breaks.
8 minFree
- AI
- ML
- DL
- LLM
Your KYC has expired. Click http://bit.ly/kyc-upd to keep your UPI active.
Press Play.
- Hand-written rule?
- Machine learning?
- Deep learning?
- LLM?
Four terms people mix up, and how they fit inside each other. Press Play to see each one try the same job: is this SMS a scam?
The rule is real logic and the machine learning score is a real sigmoid over the weights shown. The weights, the deep learning percentages and the LLM replies are illustrative, not from a trained model.
Background: the idea in plain words
Computers are good at following exact instructions. But many jobs are hard to write as exact instructions. Take one job: deciding whether an SMS is a scam. Scammers change their words all the time, so a fixed list of instructions soon stops working.
People have built several ways for machines to handle jobs like this, and the names get mixed up. People use "AI", "machine learning" and "deep learning" as if they meant the same thing. They don't. Google Cloud describes them as a clear hierarchy: deep learning is a specialised type of machine learning, and machine learning is a core discipline within the broader field of artificial intelligence. LLMs sit inside deep learning. Picture four circles, each one inside the next.
- Artificial intelligence (AI) is the whole field: building systems that do tasks which normally need human intelligence. It includes rule-based systems (a person writes every "if this, then do that" rule by hand), search and planning, not only learning.
- Machine learning (ML) is the part of AI where a model learns to make predictions from data, instead of a programmer writing every rule. A model is a program whose behaviour comes from examples it was shown.
- Deep learning is the part of ML that uses neural networks (many small calculations joined together) with many layers. It learns its own features from raw data such as text, images and audio. A feature is a clue the model looks at, such as "has a link".
- Large language models (LLMs) are deep learning models trained on huge amounts of text to predict the next token (a small piece of text). They're a kind of generative AI: they create new content.
Here is the scam SMS job at each level. A rule says: if the message contains "KYC" and a link, flag it. A machine learning model is shown many messages labelled "scam" or "not scam", and learns how much each clue matters. A deep learning model reads the raw text and finds the clues by itself. An LLM can simply be asked in plain English: "Is this message a scam, and why?"
Each inner circle is also part of the circles around it. An LLM is deep learning, which is machine learning, which is AI. A hand-written rule is AI, but it is not machine learning, because nothing was learned from data.
Press Play to watch each layer handle the same SMS. Then switch Try it to A sneaky scam and watch the hand-written rule fail.
What to notice
- Rules are AI, but brittle. The rule works only for the exact words its author expected. "K.Y.C" instead of "KYC" slips straight past. Every new trick needs a new rule.
- Machine learning learns the weights, not the clues. Training on labelled examples decides how much "has a link" or "urgent words" matters. But a person still had to choose those clues. This is called feature engineering.
- Deep learning learns the clues too. A deep neural network reads the raw text and discovers useful patterns itself. The cost: it needs much more data and computing power. See How a neural network learns.
- LLMs are general. One model, trained once on huge amounts of text, can classify the SMS, explain why, and answer the next question, all from a plain-English prompt. See What is an LLM?
- Each inner circle is also the outer ones. An LLM is a deep learning model, which is a machine learning model, which is AI. A spam rule is AI but not machine learning.
| Who writes the logic | Needs | Good at | |
|---|---|---|---|
| Rule-based AI | A programmer | Knowledge of the problem | Simple, fixed, explainable checks |
| Machine learning | Learned from labelled data, with hand-picked features | Labelled examples | Predictions on structured data |
| Deep learning | Learned from raw data | Lots of data and compute | Images, speech, text |
| LLMs | Learned from huge amounts of text | Massive data and compute (someone else's) | Understanding and generating language |
Go deeperWords to know
| Word | Meaning in simple words |
|---|---|
| Artificial intelligence (AI) | The whole field of making machines do tasks that normally need human intelligence |
| Rule-based system | A program where a person wrote every "if this, then do that" rule by hand |
| Machine learning (ML) | The part of AI where a program learns from examples instead of hand-written rules |
| Model | A program whose behaviour was learned from data |
| Deep learning | Machine learning that uses neural networks with many layers and finds its own clues in raw data |
| LLM | A large language model: a deep learning model trained on huge amounts of text to predict the next piece of text |
Check your understanding
Sources: the official documentation
This lesson is based on the official documentation. Check it for the latest details.
Something wrong or unclear in this lesson? Tell us, it gets fixed.