Browsing as a guest — you can read this lesson freely, but you'll need to sign in to save notes or track progress.

Sign In
1.1.2

How AI Works lesson

Chapter 1 · Information Technology and Society

1-2  How AI Works

When you use a phone, AI is often at work. A spam filter sorts your email, a store recommends products, a translation app changes one language into another, and ChatGPT generates text from a prompt. These are all examples of AI — but they are not all the same kind. AI includes machine learning, within machine learning is deep learning, and today's generative AI is built on deep learning.

Guiding question

What is AI, and how are machine learning, deep learning and generative AI related?

Learning outcome. Explain what AI is, and explain how generative AI is positioned within AI technologies.

Key fact
AI is the broad field; machine learning sits inside it, deep learning inside machine learning, and today’s generative AI is built on deep learning — a series of nested technologies, each more specialised than the last.

With a partner. List three tasks a phone or computer does for you that seem to need “intelligence” — sorting spam, recommending a video, translating text. Then predict: does the computer follow fixed rules, or does it learn from examples? Give one reason.

1 · What is Artificial Intelligence (AI)?

AI (Artificial Intelligence) … a general term for technologies that reproduce or perform intelligent human behaviour (learning, reasoning, judgment, etc.) on a computer.

e.g., speech recognition, image recognition, translation

2 · The relationship between AI and machine learning

Within AI technologies there is machine learning; within machine learning there is deep learning; and within deep learning there is generative AI. The broad field of AI includes increasingly specialised technologies as a series of nested categories.

This one sentence is the whole lesson.

Almost every question in this lesson checks the same thing: that these are nested, not four separate technologies sitting side by side. Deep learning is a kind of machine learning. Generative AI is a kind of deep learning. And “AI” and “machine learning” do not mean the same thing.

AI (Artificial Intelligence)Reproducing human intelligent behaviourMachine LearningLearning patterns from dataDeep LearningUsing neural networksGenerative AIe.g. ChatGPT, image generation

Press a box. Notice that each one is drawn inside the one before it — that is the whole point of this lesson, and nearly every question in it is checking whether you saw it.

Broadest on the outside, most specialised on the inside — never four things side by side.

Each one, in the book’s own words

Machine Learning … one of the learning technologies that makes AI work. It learns patterns from data to make predictions and judgments.

e.g., spam filters, product recommendations

Deep Learning … an advanced technology within machine learning that uses neural networks. It learns complex patterns using large-scale data.

e.g., image analysis for autonomous driving, speech synthesis

Generative AI … AI technology that uses deep learning to generate new data (text, images, audio, programs, etc.).

e.g., ChatGPT, image generation AIs

Neural network … a system modelled after the workings of the nerve cells (neurons) of the human brain. By connecting many components, it learns from data and becomes capable of making complex judgments. It is the core technology supporting recent advances in AI.

Pause & think
Deep learning needs large-scale data to learn. Why might an AI struggle with something it has rarely seen in its data?
Pause & think
Spam filters and product recommendations are both examples of machine learning, but the tasks they perform are completely different. From the point of view of how AI works, what do these two applications have in common?

The book has just told you that machine learning “learns patterns from data”. That is the sentence to write in an exam. But it is worth stopping to ask what it actually means, because almost everybody guesses wrong the first time — and the wrong guess is the very thing the book is arguing against.

Most people assume a spam filter contains a list of banned words that a programmer typed in. If that were true, it would be a fixed rule, not learning at all. So what is really in there?

In plain words — learning a pattern

The machine looks at a pile of examples that people have already answered, and works out how much each clue counts. What it ends up storing is not words or rules — it is a list of numbers, one per clue, saying how strongly that clue points towards the answer.

Each of those numbers is called a weight. A big positive weight means “this clue is strong evidence for”. A negative weight means “this clue is evidence against”. A weight near zero means the clue turned out not to matter. Learning is nothing more than adjusting those numbers until the machine’s answers match the ones the people gave.

The book’s wording, which is what an exam wants: Machine learning … learns patterns from data to make predictions and judgments. (p.13)

معلومة برة المنهجbeyond the official book
The book says machine learning “learns patterns from data” and stops there. The word weight, and the idea that a learned pattern is a list of numbers, are beyond the book — but every later lesson depends on them, so they are worth having early.
🎬 AnimationHow a spam filter actually learns
Emails already sorted by peoplespamnot spamspamnot spamnot spamspamThe machine is given the questions and the answers.Its job is to find what the spam ones have in common.

Step 1 of 6 — Examples with the answers already on them

Nobody writes the rules. We start with emails that people have ALREADY sorted by hand — this one was spam, this one was not. The machine is going to be shown the answers and asked to work out what gives them away.

or scrub through the steps

These four numbers are made up for teaching — the book gives no figures, and a real filter uses thousands of clues rather than four. What is real is the mechanism: clues turned into numbers, each with a score, adjusted against answers people supplied. Keep the book’s own wording for the exam — machine learning learns patterns from data to make predictions and judgments — and keep this picture for knowing what that sentence means.

🪄 Think of it like — marking a job application
Imagine a manager sorting job applications. Years of experience count for a lot (a big positive score). A spelling mistake in the letter counts a little against (a small negative score). Living far away might count for nothing at all (zero). The manager adds it all up and compares the total against the standard they expect. Nobody handed the manager those scores — they built them up from years of seeing which hires worked out. A machine learning model does the same thing, with numbers, in minutes.

Where the comparison breaks down: A manager can explain why they scored something the way they did, and can change their mind after a single conversation. A trained model cannot explain itself, and it only changes when it is shown many new examples. That difference is exactly why lesson 1-4 worries about who is responsible when an AI judges a person wrongly.

🧮 Scoring one email by hand — the email from your cousin

  1. 1

    Answer the four clue questions for THIS email: 1, 0, 0, 1

    Why this step: A computer cannot read an email; it can only do arithmetic. So the first job is always to turn the thing being judged into numbers. Here: it does say “free money” (1), the sender IS in your contacts (0), there are no exclamation marks (0), and you have replied to them before (1).

    Most people slip here: Answer about this one email, not about spam in general. The clue “you have replied to them before” is 1 here because you HAVE — even though replying is not usually a sign of spam.

  2. 2

    Multiply each clue by its weight: 1 × (+2.0), 0 × (+1.0), 0 × (+1.5), 1 × (−3.0)

    Why this step: The weight is how much that clue counts. Multiplying is what turns “this clue is present” into “this clue contributes this much”. Notice what multiplying by 0 does: a clue that is absent contributes exactly nothing, which is precisely what you want.

    Most people slip here: An absent clue does not subtract. 0 × (+1.5) = 0, not −1.5. Missing evidence is not evidence against.

  3. 3

    Add the four results: 2.0 + 0 + 0 + (−3.0) = −1.0

    Why this step: Adding collapses four separate pieces of evidence into one number for the whole email. This is the only step where the clues get to argue with each other — the −3.0 is allowed to cancel the +2.0.

  4. 4

    Compare with the threshold: is −1.0 above 2.0? No.

    Why this step: The model produces a score on a sliding scale, but the decision has to be yes or no, so a line must be drawn somewhere. That line is a human choice, not something the machine learns.

    Most people slip here: The threshold is a decision with consequences. Lower it and you catch more spam but start throwing away real letters; raise it and real letters are safe but spam gets through. There is no setting that is right for everyone.

  5. 5

    Decide: this email is NOT spam.

    Why this step: And that is the whole point of the lesson. The email contains the exact words a banned-word list would have caught it for. It survives because a different clue — that you know this person — carried more weight in the opposite direction.

🌍 A real case — what happens when the clues carry the wrong weightمعلومة برة المنهج
Amazon built a machine learning system to rank job applicants, trained on CVs the company had received over the previous ten years. Because most of those CVs came from men, the system worked out that clues associated with women — such as the word “women’s” in “women’s chess club captain” — were evidence against being hired, and gave them negative weight. Nobody instructed it to do that. It found the pattern that was genuinely in the data it was given, which is exactly what it was built to do. Amazon abandoned the tool.

Keep this case in mind for lesson 1-4, which is about ethical problems with AI. It is the clearest possible answer to “how does bias get into an AI?” — not through a prejudiced programmer, but through the training examples.

Reported widely in 2018, when Amazon confirmed it had scrapped an experimental CV-screening tool.

Key takeaway
If you remember one thing from this page: a trained model is a set of numbers, one per clue, and those numbers are called weights. Everything later in this course — deep learning, neural networks, even ChatGPT — is this same idea with far more clues and far more numbers. Nothing new gets added; there are just more weights.

How the real paper is built

The ministry sets half multiple choice and half written answer in every subject. The two halves are not the same skill. In the multiple-choice half you have to spot the wrong options quickly — and the wrong options are built out of the mistakes students really make. In the written half nobody gives you the answer to recognise; you have to produce it, in your own words, with a reason.

Practise both. Being good at one half and weak at the other costs you exactly half the paper.

1
Which correctly describes the relationship between AI, machine learning, deep learning and generative AI?
2
“Deep learning is a completely different technology from machine learning.” This statement is:
3
Which is NOT an appropriate example of generative AI?
4
The book describes a neural network as:
5
A hallucination in generative AI means the system:
Level 1 · say what it is
1.1
Define artificial intelligence (AI) and give one example.
[2 marks]
1.2
Define machine learning, deep learning and generative AI, giving one example of each.
[4 marks]
Level 2 · explain why
2.1
Spam filters and product recommendations perform completely different tasks. From the point of view of how AI works, explain what they have in common.
[4 marks]
2.2
Deep learning needs large-scale data to learn. Explain why an AI might struggle with something it has rarely seen in its data.
[4 marks]
Level 3 · weigh it up and decide
3.1
Analyse the relationship between AI, machine learning, deep learning and generative AI. Use the idea of nested categories, and give one example of each.
[6 marks]
3.2
Discuss whether generative AI should be allowed for homework in your school. Refer to hallucination, recommend one rule, and give two reasons.
[6 marks]
Key terms
AI
— technologies that perform intelligent human behaviour on a computer.
machine learning
— learns patterns from data.
deep learning
— uses neural networks on large-scale data.
neural network
— a system modelled after the brain’s nerve cells.
generative AI
— uses deep learning to generate new data.

Worked Example

(1) Mark each statement with ○ if it is true or × if it is false.

A Machine learning is one of the technologies that makes AI work.

B Deep learning is a completely different technology from machine learning.

C Generative AI is a technology that uses deep learning to generate new data.

D AI and machine learning have the same meaning.

(2) Match each description (a–c) with the choice that fits: A Machine learning, B Deep learning, C Generative AI.

a A technology that learns patterns from data to make predictions and judgments

b A technology that uses neural networks to learn complex patterns

c AI technology that generates new data such as text and images

1 · Answer the following questions.

2(1) · Which correctly describes the relationship between AI, machine learning, deep learning and generative AI?

Mark each statement with ○ if it is true or × if it is false.

A

AI > Deep Learning > Machine Learning > Generative AI

B

Machine Learning > AI > Generative AI > Deep Learning

C

AI > Machine Learning > Deep Learning > Generative AI

D

Generative AI > Deep Learning > Machine Learning > AI

Mark every statement first.

2(2) · Which is NOT an appropriate example of generative AI?

Mark each statement with ○ if it is true or × if it is false.

A

ChatGPT

B

Image generation AI

C

Spam filter

D

Audio generation AI

Mark every statement first.

One word separates them: GENERATE. A spam filter looks at email that already exists and puts it in a box. Generative AI makes something that did not exist before. Both are AI, and both use machine learning — but only one of them creates.

Exam-style question
Analyze the relationship between AI, machine learning, deep learning and generative AI. [6] In your answer: use the idea of nested categories, and give one example of each.
Pause & think
Generative AI can produce text that sounds plausible but is factually incorrect (a “hallucination”). Explain why it is dangerous to use such output as the answer to a school report as-is, and state what learners should do instead.

Think as an Engineer — Investigate & Decide

Starting from the note about hallucination above, investigate further and decide.

  1. 1 · Investigate.

    Find one documented example where a generative AI gave an answer that sounded correct but was actually wrong. Record its source — a news article, an official report, or a prompt you tested yourself with a screenshot — and note where you found it. Do not rely on an example recalled from memory without a source.
  2. 2 · Weigh it up.

    Note one benefit and one risk of using generative AI to write a school report — for the student, and for the teacher.
  3. 3 · Decide.

    Should generative AI be allowed for homework in your school? Recommend one rule and give two reasons.

This applies to what you are reading, too.

A hallucination is not an AI being obviously broken — it is an AI being confidently wrong, which is far harder to spot. That is exactly why step 1 insists on a source rather than a memory. The same habit protects you everywhere: if something matters, check it against the book or another source you trust, no matter how sure the answer sounded.

In a New Context

A farmer wants to use AI to distinguish healthy crops from diseased ones in photographs. Using what you learned about deep learning and image analysis, explain what the AI would need to learn from, and identify one reason its judgment might be wrong.

Lesson Question — Answered

The lesson question asked what AI is and how machine learning, deep learning and generative AI are related. AI is a general term for technologies that reproduce or perform intelligent human behaviour on a computer, and machine learning, deep learning and generative AI are increasingly specialised fields nested within it rather than parallel to it.

The key idea from this lesson is that these are not four separate technologies to learn in isolation, but one broad field understood at different levels of specialisation.

1 · Quiz yourself first.

Cover the Point! section and draw the four nested boxes from memory, with one example in each. If you can draw it, you can answer every question in this lesson.

2 · Read the passage and fill in the blanks.

The general term for technologies that reproduce or perform intelligent human behaviour on a computer is ( a ). One of the learning technologies that makes ( a ) work by learning patterns from data is ( b ). Within ( b ), an advanced technology that uses neural networks is ( c ). Furthermore, the technology that uses ( c ) to generate new data is ( d ).

3(1) · For each example, which is it most closely related to?

Match each description with the choice that fits it.

A Machine learningB Deep learningC Generative AI
a

Automatically sorting spam emails

b

Recognizing pedestrians on the road in autonomous driving

c

Automatically generating new images from text

d

Recommending products based on a user’s purchase history

Match every description first.

3(2) · Which most appropriately describes the relationship between the four?

Mark each statement with ○ if it is true or × if it is false.

A

Machine learning is a type of AI, and deep learning is a type of machine learning.

B

AI is a type of machine learning, and generative AI is a type of AI.

C

Deep learning and machine learning are completely different technologies.

D

Generative AI is a technology that generates data without using machine learning.

Mark every statement first.
Reflect & challenge

Reflect: Before this lesson, did you think AI was one single technology? How has your idea changed? Which of the four — AI, machine learning, deep learning, generative AI — was hardest to tell apart, and why?

Challenge: Generative AI can create text, images and audio. Suggest one helpful use and one possible misuse, and say how the misuse could be reduced.

Key takeaway
Remember: AI is the broad field; machine learning sits inside it, deep learning inside machine learning, and today’s generative AI is built on deep learning — from the broadest idea to the most specialised.

Keep reading — this lesson marks itself done automatically.