- Explain how artificial intelligence, machine learning, deep learning and generative AI nest inside one another, with an example of each.
- Distinguish narrow AI from artificial general intelligence and explain why breadth alone does not make a system general.
- Describe AI as a rational agent and compute the expected utility of the actions in a simple decision.
- Compare a hand-written rule with a rule learned from data, and explain why learned rules need testing on unseen examples.
- Identify the tasks today's AI does well and badly, and decide when its output must be checked.
Why this matters
"AI" is printed on everything from phone cameras to spreadsheets, and the word covers very different technologies. Knowing what it actually refers to helps you judge claims, pick the right tool, and avoid trusting a system for things it was never built to do.
A working definition
Artificial intelligence (AI) is the broad field of building computer systems that perform tasks we would normally say require human intelligence: recognising speech, translating languages, spotting patterns, making predictions, or writing text.
That definition is about behaviour, not about how the system works inside. A chess program from the 1990s that follows hand-written rules counts as AI. So does a modern chatbot. They work in completely different ways.
Four terms that nest inside each other
The easiest way to keep the jargon straight is to picture a set of nesting boxes, each one inside the last.
| Term | What it means | Everyday example |
|---|---|---|
| Artificial intelligence | Any technique that makes computers act "smart" | A rules-based chess engine, a route planner |
| Machine learning (ML) | AI that learns patterns from examples (data) instead of following only hand-written rules | An email spam filter trained on millions of labelled emails |
| Deep learning | Machine learning that uses large neural networks: many layers of simple connected maths units | Face unlock on a phone, speech recognition |
| Generative AI | Deep learning models that produce new content: text, images, audio, video or code | A chatbot drafting an email, an app turning a sentence into a picture |
So every generative AI system is a deep learning system, every deep learning system is machine learning, and all of it is AI. The reverse is not true: plenty of AI involves no learning at all.
Narrow AI vs general AI
Narrow AI is built for a specific task or family of tasks. A system that reads X-rays, a translation app, and a recommendation engine are all narrow. Every AI system in use today is, by most researchers' definitions, narrow, even when the range of tasks is surprisingly wide.
Artificial general intelligence (AGI) is a hypothetical system that could learn and perform essentially any intellectual task a human can, at a human level or better, and transfer what it learns between very different situations. There is no agreed test for AGI, and experts disagree sharply about whether and when it might arrive. Treat confident claims in either direction with caution.
Modern chat assistants blur the line because one model can write poems, explain tax rules and fix code. But breadth is not the same as general intelligence: these systems still fail in ways a person would not, as the next sections show.
What today's AI is good at
- Pattern-heavy language work: summarising, rewriting, translating, drafting, classifying and extracting information from text.
- Perception: recognising objects in images, transcribing speech, reading handwriting.
- Working at scale: doing the same kind of judgement thousands of times without getting tired.
- First drafts and brainstorming: producing many plausible options quickly for a human to choose from.
- Code: writing, explaining and fixing routine software, especially in popular programming languages.
What today's AI is bad at
- Guaranteed accuracy. A language model can state something false in a confident, fluent sentence. This is called a hallucination, and it is covered in depth later in the course.
- Knowing what it doesn't know. Confidence in the wording tells you little about whether the content is right.
- Recent events. A model learns from data collected up to a training cutoff date. Without extra tools, it has no knowledge of anything after that date.
- Exact counting and long precise reasoning without help from tools such as a calculator or code.
- Responsibility. An AI system cannot be held accountable for a decision. A person still has to own the outcome.
Common misconceptions
"It looks things up." A plain language model does not search the internet or a database when it answers. It generates text from patterns stored in its internal settings during training. Some products connect a model to tools such as web search or your files; then it can fetch information. Without such tools, it is answering from memory, and that memory can be wrong or out of date.
"It understands like a person." Models capture a great deal of real structure about language and the world, which is why they are useful. But they are not built to have experiences, feelings or intentions, and nothing in how they are designed makes them conscious. Whether any machine could ever be conscious is an open philosophical question; current systems are not designed with that goal, and fluent conversation is not evidence of it.
"It's an all-knowing oracle." Output quality depends on the training data, the instructions you give, and whether the task suits the system. The same assistant can be excellent at one request and wrong on the next.
"It's just autocomplete, so it's useless." This is the opposite mistake. Predicting the next word turns out to require learning a lot about grammar, facts and reasoning patterns, which is why these systems are genuinely capable at many tasks.
A concrete example
Imagine asking a chat assistant, with no web access, "Who won yesterday's match?" It has two options: say it cannot know, or produce a plausible-sounding answer from older patterns. Well-trained assistants increasingly do the first, but the second still happens. Now give the same assistant a web search tool: it can fetch a current result and quote its source. Same model, very different reliability, because of the tool, not because the model got smarter.
Going deeper
Four ways to define AI
The standard university textbook in the field, Russell and Norvig's Artificial Intelligence: A Modern Approach, organises definitions of AI along two questions. Should a system think or act? And should it be judged against humans or against an ideal standard of rationality? That gives four approaches:
| Judged against humans | Judged against rationality | |
|---|---|---|
| Thinking | Model how people actually think (cognitive science) | Reason by the laws of logic |
| Acting | Behave so that people can't tell it from a human | Act to achieve the best expected outcome |
The "acting humanly" corner is the oldest. In his 1950 paper "Computing Machinery and Intelligence", Alan Turing proposed replacing the vague question "Can machines think?" with an imitation game, now called the Turing test: can a judge, talking by text, reliably tell the machine from a person? Most modern engineering works in the bottom-right corner instead. We rarely want a system that copies human mistakes; we want one that does the job well.
The agent view
That bottom-right corner is usually described with the idea of an agent: anything that perceives its environment and acts on it. A spam filter perceives an email and acts by assigning a label. A chat assistant perceives the conversation so far and acts by producing the next piece of text or calling a tool. A robot vacuum perceives bumps and dirt and acts by moving.
A rational agent chooses the action that is expected to do best according to some measure of success, given what it knows. "Expected" matters, because the agent rarely knows for certain what will happen. The usual tool is expected utility: weight how good each outcome is by how likely it is, and add up.
Here is an action, ranges over the possible situations, is the probability of situation , and is a score (the utility) for taking action when turns out to be true.
Worked example: the umbrella decision. The forecast gives a 30% chance of rain, so and . Score the outcomes from 0 (worst) to 10 (best):
| Action | Rain | Dry |
|---|---|---|
| Take umbrella | 8 (dry, a little hassle) | 6 (carried it for nothing) |
| Leave it | 0 (soaked) | 10 (ideal) |
Leaving the umbrella wins, narrowly. Now find the tipping point. Write for the chance of rain and set the two equal: , which simplifies to , so . Above about a 33% chance of rain, take the umbrella.
Two lessons carry straight over to real AI systems. First, a "smart" decision needs both a model of the world (the probabilities) and an objective (the utilities). Second, the objective is chosen by people, and if it is wrong the system will faithfully optimise the wrong thing. A recommendation system scored only on clicks will learn to serve whatever gets clicked, which is not the same as what is good for the user.
Rules versus learning, in code
Here is the difference between a hand-written rule and a learned one, in a deliberately tiny example. Each email is reduced to one feature, the number of exclamation marks, with a label of 1 for spam and 0 for not spam.
# Each email: (number of "!" characters, 1 = spam, 0 = not spam)
emails = [(0, 0), (1, 0), (0, 0), (2, 0), (1, 0),
(5, 1), (3, 1), (7, 1), (2, 1), (6, 1)]
def rule_based(count):
return int(count >= 4) # a threshold a person picked by hand
def learn_threshold(data):
best_t, best_err = None, len(data) + 1
for t in range(0, 11): # try every threshold from 0 to 10
err = sum(int(c >= t) != y for c, y in data)
if err < best_err:
best_t, best_err = t, err
return best_t, best_err
t, err = learn_threshold(emails)
print("hand rule errors:", sum(rule_based(c) != y for c, y in emails))
print("learned threshold:", t, "errors:", err)
The hand-picked rule (flag emails with 4 or more "!") makes 2 mistakes: it misses the spam emails with 3 and 2 exclamation marks. The learning version tries every threshold and keeps the one with the fewest errors on the examples, landing on 2 with a single mistake (one genuine email with two "!" gets flagged; the threshold 3 also makes one mistake, and the code keeps the first best it finds). Nobody told the program what the threshold should be; it got it from data. That, scaled up to millions of examples and billions of adjustable numbers, is machine learning. The same toy also shows the danger: ten examples are far too few to trust, which is why the next lesson insists on testing with data the model has never seen.
Where the categories blur
Real products mix the boxes. A modern assistant might combine a generative model, a hand-written rule that blocks certain actions, a search engine and a calculator. It also helps to know one more split. A discriminative model learns to map an input to a label (spam or not spam). A generative model learns what the data itself looks like, well enough to produce new examples. A generative chatbot can still do classification by writing the label as text, which is one reason these models are used so widely.
Common pitfalls
- Treating "AI" as one technology. A rules engine, a trained classifier and a generative model fail in different ways. Ask which one you are dealing with before judging risk.
- Judging by the demo. A handful of well-chosen examples says little. Test on a representative sample of your own cases and count the errors.
- Confusing fluency with correctness, or breadth with generality. A system that writes well about everything is not therefore right about anything in particular.
- Forgetting the objective. A system optimises what it is measured on. If the measure is a poor stand-in for what you want, expect side effects.
- Assuming current knowledge. Without tools, a model knows nothing after its training cutoff.
- Anthropomorphising. Saying a model "wants" or "believes" something is a handy shorthand, but it can lead you to trust it like a colleague.
In practice
- When a product says "AI", ask which kind: rules, a trained classifier, or a generative model. The risks differ.
- Use generative AI for drafts, summaries and explanations, and verify anything that matters, especially names, numbers, dates and quotes.
- Check whether the tool you are using has web search or file access. If it doesn't, don't expect current information.
- Be sceptical of both hype ("it thinks like us") and dismissal ("it's just autocomplete"). The useful view is in between.
Key takeaways
- AI is the broad field; machine learning, deep learning and generative AI are progressively narrower subsets of it.
- All AI in use today is narrow AI; artificial general intelligence remains hypothetical and its timeline is disputed.
- A language model answers from patterns learned in training and only fetches new information when it is connected to tools such as web search.
- Fluent, confident output is not proof of accuracy, so important facts need checking.
- Current AI systems are not designed to be conscious, and conversational skill is not evidence that they are.
Terms in this lesson
- Artificial intelligence (AI)
- The field of building computer systems that perform tasks normally thought to require human intelligence.
- Machine learning (ML)
- A kind of AI in which a system learns patterns from example data instead of following only hand-written rules.
- Deep learning
- Machine learning that uses neural networks with many layers of simple, connected mathematical units.
- Generative AI
- AI models that create new content such as text, images, audio, video or code.
- Narrow AI
- An AI system designed for a specific task or limited range of tasks.
- Artificial general intelligence (AGI)
- A hypothetical AI that could learn and perform almost any intellectual task a human can.
- Training cutoff
- The date after which a model has no information, because its training data stops there.
- Hallucination
- When an AI model produces false or invented information presented as if it were true.
- Rational agent
- A system that perceives its environment and chooses the action expected to achieve the best outcome by a given measure of success.
- Expected utility
- The probability-weighted average of how good the outcomes of an action are, used to compare actions under uncertainty.
- Turing test
- Alan Turing's 1950 proposal to judge machine intelligence by whether a person conversing by text can tell the machine from a human.
Check your understanding
- 1.
Which statement about the relationship between these terms is correct?
- 2.
A chat assistant with no tools gives a detailed answer about an event from last week. What is the most likely explanation?
- 3.
Why is a modern chat assistant still considered narrow AI by most researchers?
- 4.
Using the lesson's umbrella scores (take: 8 if rain, 6 if dry; leave: 0 if rain, 10 if dry), at what probability of rain are the two actions equally good?
- 5.
A vendor shows an AI tool answering ten hand-picked questions perfectly. What is the best next step before adopting it?
Exercises
Work each problem before opening the solution.
- Exercise 1Core
Place each system in the most specific box that fits (rules-based AI, machine learning, deep learning, generative AI), or say it is not usually called AI:
- A chess program that searches moves and scores positions with a hand-written formula.
- A spam filter that is a logistic-regression model trained on labelled emails.
- Face unlock on a phone using a deep neural network.
- An app that turns a sentence into a picture.
- A thermostat that switches the heating on below 20 °C.
Show solution
- Rules-based AI. It performs a task we associate with intelligence, but nothing is learned from data.
- Machine learning (not deep learning). Logistic regression learns its weights from examples but is not a many-layered neural network.
- Deep learning. A multi-layer neural network learned from images.
- Generative AI. It produces new content; such systems are deep learning models.
- Not usually called AI. It is a fixed control rule. Technically it is a very simple agent (it senses and acts), which shows how loose the everyday word is.
- Exercise 2Core
Change the umbrella scores to: take and rain = 9, take and dry = 7, leave and rain = 0, leave and dry = 10. (a) Find the probability of rain at which both actions are equally good. (b) With a 20% forecast, which action has the higher expected utility, and by how much?
Show solution
(a) and . Setting them equal: , so and .
(b) At : take ; leave . Leaving wins by 0.6. Because 20% is below the 25% tipping point, this matches part (a).
- Exercise 3Core
Coding. In many real systems the two kinds of mistake have different costs. Using the ten emails from the lesson, suppose flagging a genuine email as spam (a false positive) is 5 times as costly as letting a spam email through (a false negative). Write Python that tries thresholds 0 to 10, counts false positives and false negatives, and picks the threshold with the lowest total cost. Which threshold wins, and why is it different from before?
Show solution
emails = [(0, 0), (1, 0), (0, 0), (2, 0), (1, 0), (5, 1), (3, 1), (7, 1), (2, 1), (6, 1)] FP_COST, FN_COST = 5, 1 # flagging a real email is 5x worse def cost_at(t, data): fp = sum(c >= t and y == 0 for c, y in data) fn = sum(c < t and y == 1 for c, y in data) return fp, fn, FP_COST * fp + FN_COST * fn for t in range(0, 9): fp, fn, cost = cost_at(t, emails) print(f"t={t} FP={fp} FN={fn} cost={cost}") best = min(range(0, 11), key=lambda t: cost_at(t, emails)[2]) print("best threshold:", best)Output (thresholds 0 to 8): costs 25, 15, 5, 1, 2, 2, 3, 4, 5. The best threshold is 3: it never flags a genuine email (no false positives) and misses only the spam email with two "!" (cost 1). The error-count version chose 2, which flags one genuine email; with false positives now 5 times as costly, that costs 5. The "best" learned rule depends on the objective you give it, which is the same point as the umbrella example.
- Exercise 4Challenge
Your organisation is offered an "AI-powered" tool that sorts incoming insurance claims into fast-track and needs review. Write the five most important questions you would ask before trusting it, and explain why each matters, using ideas from this lesson.
Show solution
A strong answer covers points like these:
- What kind of AI is it? Rules, a trained classifier or a generative model? Each fails differently (rules break on unusual cases, classifiers inherit data bias, generative models can invent reasons).
- What data was it trained and tested on, and does it resemble our claims? A model learns the patterns in its data; a different customer mix or product line can make it much worse.
- What are its error rates on a representative test set we choose, split by error type? Fast-tracking a fraudulent claim and delaying a genuine one have very different costs, so a single accuracy figure is not enough.
- What objective was it optimised for? If it was tuned for speed or for minimising payouts, it may quietly trade fairness or customer outcomes for that goal.
- Who is accountable, and how are decisions reviewed? The system cannot be responsible; a named person or team must own outcomes, with a way for customers to challenge decisions and a log of what the system did.
Good answers may also ask how the system is monitored for changes over time and what happens when it is unsure.
Further reading
- paperAlan M. Turing, Computing Machinery and Intelligence, Mind 59(236) (1950)
- paperJohn McCarthy, Marvin Minsky, Nathaniel Rochester and Claude Shannon, A Proposal for the Dartmouth Summer Research Project on Artificial Intelligence (1955), reprinted in AI Magazine
- bookNils J. Nilsson, The Quest for Artificial Intelligence (2010), free web version
Go further
Sources
Fact-checked and last reviewed 2026-11-05