How Does AI Actually Work?
Lesson 1.2 — How Does AI Actually Work?
You don't need to be a programmer to understand this
We're not going to write any code in this lesson. But understanding roughly how AI works will make you a much better user of it — just like understanding that a car has an engine that burns fuel helps you understand why you need to fill it up.
The core idea: pattern matching at massive scale
Modern AI — the kind that powers ChatGPT, Claude, and Gemini — is built on a simple (but powerful) idea:
If you show a system enough examples of something, it can learn the patterns and start doing it itself.
Imagine you wanted to teach a child what a "cat" looks like. You'd show them pictures. Lots of pictures. Eventually, the child builds up an internal model of "cat-ness" — four legs, pointy ears, fur, a certain shape — and can recognise a cat they've never seen before.
AI does something similar, except instead of pictures of cats, it processed hundreds of billions of words of text from the internet, books, articles, and websites. From all that text, it learned patterns:
- How sentences are structured
- Which words tend to follow other words
- How questions are typically answered
- What good explanations look like
- How different topics relate to each other
Predicting the next word (really, really well)
Here's the surprising truth about how ChatGPT and similar tools work:
At its core, the AI is predicting what word (or token) should come next.
When you type "The capital of France is ___", the AI has seen enough text to know the answer is almost certainly "Paris." When you ask it to write a poem about autumn, it predicts what a good autumn poem looks like based on every poem it has ever processed.
This sounds almost too simple to be impressive — but the magic is in the scale. The patterns learned from hundreds of billions of words, processed by a model with hundreds of billions of parameters, result in something that can:
- Answer complex questions
- Write code
- Summarise long documents
- Translate between languages
- Draft emails, essays, and stories
All from "predict what comes next" — just done extraordinarily well.
Training vs. using
There are two phases to how AI works:
Training (done once, by the AI company) The AI reads enormous amounts of text and adjusts billions of tiny settings (called "weights" or "parameters") to get better at predicting what comes next. This takes months, costs millions of dollars, and requires massive computing power. OpenAI, Anthropic, and Google do this — you don't.
Inference (what happens when you use it) When you type a message and hit send, the AI uses those pre-trained weights to generate a response. This happens in seconds. This is what you're doing every time you chat with an AI.
You only ever interact with the "inference" side. The hard work has already been done.
What "large language model" means
You might hear the term LLM — Large Language Model. This is just the technical name for the type of AI that ChatGPT, Claude, and Gemini are.
- Large — trained on enormous amounts of data with billions of parameters
- Language — specialised in understanding and generating text
- Model — a mathematical system that has learned patterns from data
When people say "AI" in everyday conversation today, they usually mean an LLM.
A helpful analogy
Think of an LLM like a brilliant student who has read virtually everything ever written — every textbook, every Wikipedia article, every novel, every news story — and has an extraordinary memory for patterns and facts.
But there are limits:
- They can only tell you what was in those books (their training data)
- They can be confidently wrong, the way a well-read person can still misremember things
- They don't automatically know what happened after they finished studying (their knowledge has a cutoff date)
This analogy isn't perfect, but it's useful. It explains why AI is so impressive at many things, and also why it sometimes makes things up.
Key takeaway
AI works by learning patterns from enormous amounts of text, then using those patterns to predict useful responses. You don't need to understand the maths — but knowing that it's "pattern matching at scale" explains both why it's so capable and where it goes wrong.
Next up: Lesson 1.3 — Types of AI You'll Encounter