How AI Learns
Training an AI is like teaching a child to recognize dogs by showing them ten million photos, except the child never goes outside to meet a dog.
In Lesson 1 we said that AI "learns patterns from examples." That sentence is true, but it hides a lot. How does a machine made of switches and electricity learn anything? Where do the examples come from? What is actually stored when it's done?
This lesson opens the hood. You won't need any math. Everything is explained with kitchens, radios, classrooms, and dogs. By the end, you'll understand the idea behind almost every AI system in the news, and you'll be able to spot when someone is making it sound more magical, or more frightening, than it is.
If some of this feels strange, that's a good sign. It is strange. Even the people who build these systems are still working out exactly what goes on inside them.
How to use this page
- There are seven sections. Each takes about 7 to 10 minutes.
- Start anywhere. Section 4 (neural networks) is the heart of the lesson. If you only read one, read that one.
- Press Focus at the top to show just one section at a time. Your checkmarks are saved on this device.
- Every section follows the same pattern: one-sentence summary → an analogy → the details → what to watch out for. If you only have two minutes, read the first two parts.
Focus mode is on: one section at a time. Press Focus again to see everything.
An AI can only learn what's in the examples it's fed, so the amount, quality, and variety of its data shape everything it can and can't do, including its blind spots and biases.
Analogy: you are what you eat
A child raised on a varied, healthy diet tends to grow strong. A child fed only candy grows, but not well. A child who has never tasted spicy food will be surprised by a chili pepper.
AI is the same. Feed it millions of clear, varied, accurate examples and it grows capable. Feed it messy, lopsided, or false examples and it grows up with those same flaws, and it can't tell you which parts of its "diet" were junk.
What counts as "data"?
Data is any recorded information a computer can learn from. For AI, that includes:
- Text: books, websites, news articles, encyclopedias, online forums, computer code, transcripts.
- Images: photos, drawings, medical scans, satellite pictures.
- Sound: speech recordings, music, phone calls (with permission, one hopes).
- Video: films, online videos, security and dashboard cameras.
- Numbers and records: sales, weather readings, bank transactions, sensor measurements.
- Behavior: what people click, watch, buy, skip, and search for.
How much food are we talking about?
The amounts are almost impossible to picture. A large modern chatbot is typically trained on trillions of words. If you read one book a day, it would take you many thousands of lifetimes to read that much. Big image systems learn from hundreds of millions or even billions of pictures.
For comparison: a human child hears roughly tens of millions of words in their first several years, and learns to talk just fine. AI needs vastly more examples to learn language than a child does. That's one of the biggest differences between machine learning and human learning, and a mystery researchers are still working on.
Where does it come from?
- The public internet, gathered by automated programs ("web crawlers") that copy pages at huge scale.
- Licensed collections: companies pay publishers, news outlets, photo libraries, and websites for access.
- Product use: what people type, click, and upload, depending on each company's policies and your settings.
- Human labelers: people paid to tag photos, rate answers, and write examples. This hidden workforce numbers in the many thousands worldwide.
- Synthetic data: examples generated by other AI systems, used more and more as fresh human data gets harder to find.
Cleaning the plate: data quality
Raw data is messy. Builders spend a large share of their effort filtering it: removing duplicates, spam, gibberish, and some harmful material, and trying to balance it. Computer scientists have an old saying for what happens when they don't: "Garbage in, garbage out."
Three quality problems come up again and again:
- Gaps. If a medical AI saw mostly scans from one group of people, it may perform worse for everyone else.
- Skew. The internet over-represents some languages, countries, ages, and viewpoints, and under-represents others. AI inherits that tilt.
- Errors and falsehoods. The internet contains plenty of mistakes and myths. An AI can absorb them just as easily as facts.
The big open questions about data
Data is where many of the hottest debates about AI begin:
- Consent and copyright: Did authors, artists, and photographers agree to have their work used for training? Should they be paid? Courts in several countries are hearing these questions, and the answers are still being decided.
- Privacy: Personal information posted online can end up in training data.
- Running out: Some researchers estimate that the supply of high-quality human-written text is being used up, which is one reason companies turn to synthetic data and licensing deals.
Ask this
When you meet a new AI tool, ask: "What was it fed?" A tool trained mostly on English web pages, for instance, may be weaker on other languages, local customs, or specialized fields. Good companies publish at least a general description of their training data. Silence is worth noticing.
Watch out for
- "It learned from the whole internet, so it knows everything." The internet is huge but uneven, and much of human knowledge (private records, oral tradition, local expertise) was never online.
- Assuming bias was put there on purpose. Most AI bias comes from lopsided data, not a villain. That makes it more common, not less, and it still needs fixing.
An AI's life has two very different stages: a long, expensive training phase where it learns from data, and a fast, everyday inference phase where it uses what it learned to answer you, usually without learning anything new from your conversation.
Analogy: medical school and the clinic
A doctor spends years in medical school: huge effort, huge expense, thousands of cases studied. That's training.
Then they open a clinic and see patients, applying what they learned in minutes per visit. That's inference.
Here's the twist: imagine a doctor whose memory of school was frozen on graduation day. They can still reason well with what they know, but they don't learn from today's patients, and they don't know about any discoveries made after they graduated. That's much closer to how today's AI works.
Phase 1: Training (school)
- What happens: the system is shown enormous amounts of data and adjusts itself, over and over, to get better at its task. (Section 4 shows exactly how.)
- How long: for the largest systems, weeks to months of nonstop computing.
- Where: giant data centers packed with thousands of specialized chips.
- Cost: for the biggest modern models, reported costs run to tens or hundreds of millions of dollars for a single training run, and rising.
- How often: rarely. A major model might be trained once, then refined, then eventually replaced by a new version.
Training has stages too
For chatbots, "training" usually happens in steps, like a general education followed by job training:
- Pre-training (general education): the model reads a vast library of text and learns to predict the next word. This is where it picks up grammar, facts, writing styles, and reasoning patterns. At this stage it's knowledgeable but not yet a helpful assistant; it might answer a question with another question, or just keep rambling.
- Fine-tuning (job training): it's trained on carefully written examples of good conversations, so it learns to act like a helpful assistant.
- Feedback training (coaching): people (and sometimes other AI systems guided by written principles) rate its answers, and it's adjusted toward the better ones. This is where much of its politeness, carefulness, and personality come from.
Phase 2: Inference (the job)
- What happens: you type a question; the finished model runs your words through its learned patterns and produces an answer.
- How long: seconds.
- Cost: a tiny amount per question, but multiplied by hundreds of millions of people, inference adds up to a very large share of AI's total energy use.
The "knowledge cutoff"
Because training ends on a certain date, a model's built-in knowledge stops there. This is called its knowledge cutoff. Ask about something that happened afterward and it may not know, or worse, may guess. Many chatbots now get around this by searching the web during inference, the way our frozen-memory doctor might look something up in a current journal before answering.
"But it remembered what I said!"
Within a single conversation, a chatbot can refer back to what you said earlier. That's not learning; it's more like the doctor reading your chart during your appointment. The information sits in the conversation's short-term "working space" (called the context window). Some products add memory features that save notes about you between conversations, but that's a filing system added on top, not the model itself changing. Whether your conversations are later used to train future versions depends on the company's policy and your settings.
| Training | Inference | |
|---|---|---|
| Plain-English name | Learning | Using |
| Analogy | Medical school | Seeing a patient |
| Time | Weeks to months | Seconds |
| Does the model change? | Yes, constantly | No (usually) |
| Who does it | The company that builds it | You, every time you use it |
Watch out for
- Asking about recent events without checking. If the tool isn't searching the web, its answer about "the latest" anything may be out of date or invented.
- Assuming "I told it, so it knows forever", or the opposite, "I told it once, so it's gone." Check each product's memory and privacy settings to know which is true for you.
AI finds patterns in past examples and uses them to make a best guess about something new, whether that's the next word, the next song, or whether a charge is fraud, and nearly everything impressive it does is built from that one move.
Analogy: the weather-wise farmer
An old farmer looks at the sky, feels the wind, notices the cows lying down, and says, "Rain by evening." Nobody gave them a rulebook. Decades of watching built up a sense of which signs tend to come before rain.
The farmer is often right, sometimes wrong, and can't always explain exactly why they're sure. That's pattern-based prediction, and it's what AI does, at enormous speed and scale.
Finishing the sentence
Try this. Finish each line in your head:
- "Once upon a…"
- "Peanut butter and…"
- "The capital of France is…"
You probably said time, jelly, and Paris without effort. You just made three predictions from patterns you've absorbed over a lifetime. A chatbot does the same thing, one small piece at a time.
How a chatbot writes a whole answer
A chatbot doesn't plan its entire reply and then type it out the way you'd write a letter. At its core, it:
- Looks at everything so far (your question plus anything it has already written).
- Calculates how likely each possible next piece of text is. (These pieces are called tokens: usually a word or part of a word.)
- Picks one, often the most likely, sometimes with a little deliberate randomness so answers don't sound robotic.
- Adds it to the text, and repeats. Thousands of times per answer.
That's why you can ask the same question twice and get slightly different answers: a small roll of the dice happens at every step.
How can "just predicting" do so much?
Here's the surprising part. To predict the next word really well across trillions of words, a system has to pick up a lot along the way. To predict the end of "The ball fell because of…," it helps to have learned something about gravity. To predict the next line of a legal argument, it helps to have absorbed how legal reasoning works. To predict the answer to a math problem, it helps to have learned the steps.
Nobody programmed those skills in directly. They emerged as by-products of getting very good at prediction. Researchers still debate how deep that "understanding" goes, but there's no doubt it's more than simple memorization.
Prediction beyond words
| AI system | What it predicts | From which patterns |
|---|---|---|
| Chatbot | The next word | Trillions of words of text |
| Spam filter | Junk or not junk | Millions of emails people flagged |
| Map app | Your arrival time | Traffic history and live phone signals |
| Image generator | What each part of the picture should look like | Huge collections of captioned images |
| Fraud detection | Whether a purchase is really you | Your past spending and known fraud patterns |
| Weather AI | Tomorrow's conditions | Decades of weather records |
Where prediction goes wrong
- Plausible isn't true. The most likely-sounding answer can be false. Ask for a book on an obscure topic and the AI may invent a realistic title and author, because that's what a book reference usually looks like. This is a "hallucination."
- The future isn't always like the past. Patterns learned before a big change (a pandemic, a new law, a market crash) can mislead afterward.
- Correlation isn't cause. AI notices what tends to go together, not necessarily why. Ice cream sales and drownings rise together, but ice cream doesn't cause drowning; summer causes both.
Try this
Ask any chatbot the same open-ended question three times in fresh conversations ("Give me a name for a bakery"). Notice the variation. You're watching the prediction dice roll. Then ask it for a very specific fact you already know well and check it. You're testing the gap between "likely" and "true."
Watch out for
- "Just autocomplete" as a dismissal. The mechanism is prediction, but the results can be genuinely capable. Underestimating it is as risky as overestimating it.
- Smooth writing as proof of truth. Prediction is excellent at producing text that sounds right. Check facts that matter.
A neural network is a huge stack of layers made of simple math units connected by adjustable "dials"; training means nudging billions of those dials, a tiny bit at a time, until the network's guesses stop being wrong.
Analogy: the giant sound mixing board
Picture the mixing board at a concert: rows and rows of sliders controlling volume, bass, and echo. Now imagine one with billions of sliders, wired together in layers, so each slider affects the ones after it.
At first, every slider is set randomly, and the music sounds like noise. A sound engineer plays a song, listens to how far off it sounds, and nudges every slider a hair in the direction that would make it sound better. Then plays another song. And another. Millions of times.
Eventually the board produces beautiful music for songs it has never heard before. Nobody set any slider by hand. That's training a neural network.
The pieces
- Neurons (units): tiny calculators. Each one takes in some numbers, combines them, and passes a number along. One unit alone is almost laughably simple.
- Connections with weights (the dials): every connection between units has a number, a "weight," that controls how strongly one unit influences the next. These weights are the dials, and they're what training changes. Together with a few other adjustable numbers, they're called parameters.
- Layers: units are arranged in rows. The first layer takes in the raw input; the last layer gives the answer; the layers in between (the "hidden layers") do the work. "Deep" learning simply means many layers.
What the layers learn
In an image-recognition network, researchers have peeked inside and found something like a production line:
- Early layers learn to notice simple things: edges, lines, patches of color.
- Middle layers combine those into shapes: circles, corners, textures like fur.
- Later layers combine shapes into parts: ears, eyes, noses, wheels.
- The final layer weighs it all up: "dog, 94% sure."
No one told it to look for ears. It discovered that noticing ears helps it be right.
How training nudges the dials, step by step
- Guess. Show the network an example (say, a photo) and let it make a guess with its current dial settings.
- Check. Compare the guess to the right answer. Measure how wrong it was. (This "wrongness score" is called the loss.)
- Trace the blame. Work backward through the layers to figure out how much each dial contributed to the mistake. (The technique is called backpropagation.)
- Nudge. Turn every dial a tiny amount in the direction that would have made the answer less wrong.
- Repeat. Billions of times, over trillions of examples.
A second analogy: walking downhill in fog
Imagine you're on a foggy hillside and want to reach the valley floor, but you can only see your feet. The smart move: feel which way the ground slopes, take one small step downhill, feel again, step again.
Training does exactly this. The "valley" is the point where the network makes the fewest mistakes. Each nudge of the dials is one small step downhill. The technique even has a name that says so: gradient descent ("gradient" means slope, "descent" means going down).
How it's like a brain, and how it isn't
Borrowed from biology
Brain cells pass signals to each other; connections that get used strengthen.
Neural networks borrowed that loose idea: signals flow through connections of varying strength.
Very different in practice
Real neurons are living cells with chemistry, timing, and growth that artificial units don't have.
Your brain has roughly 86 billion neurons and trillions of connections, runs on about 20 watts, and learns continuously. Artificial networks learn in a separate phase and use far more energy.
The "black box" problem
Here's something that surprises most people: even the builders can't fully explain why a network gives a particular answer. They know the recipe for training it, and they can see all the dial settings, but billions of numbers don't come with labels. It's like having every page of a book written in a language no one speaks. A growing research field called interpretability is working on translating it, and has made real progress in finding what some groups of dials represent. But we're far from being able to read the whole thing.
Watch out for
- "The builders know exactly how it thinks." They know how it was trained, not fully what it learned. That's why testing AI behavior matters so much.
- "Neural" meaning "alive" or "brain-like." The name is a loose borrowing. The resemblance is more like a paper airplane to a bird: same basic idea of flight, very different machine.
AI learns in three main ways: from examples with the answers attached (supervised), by finding patterns in unlabeled data on its own (unsupervised), or by trial and error with rewards (reinforcement), and modern chatbots use a blend of all three.
Analogy: three ways a person learns
Supervised is studying with flashcards: question on the front, answer on the back.
Unsupervised is sorting a huge box of old family photos with no labels. Nobody tells you who's who, but you start noticing groups: these are from the beach house, these have Uncle Ray, these are all from the 1970s.
Reinforcement is learning to ride a bike. Nobody gives you the answer. You wobble, fall, adjust, and gradually do more of whatever keeps you upright.
1. Supervised learning: learning with an answer key
The AI gets examples that people have already labeled: "this email is spam," "this X-ray shows pneumonia," "this house sold for $310,000." It learns to predict the label for new examples.
- Everyday uses: spam filters, recognizing faces, reading handwriting, predicting home prices, flagging medical images for a doctor's review.
- Strength: clear goal, easy to measure how well it's doing.
- Weakness: labels are expensive; often people must make them by hand. And if the labels are biased or wrong, the AI learns the bias and the mistakes.
2. Unsupervised learning: finding patterns without an answer key
The AI gets data with no labels and discovers structure on its own: groups, similarities, oddities.
- Everyday uses: grouping customers with similar shopping habits, spotting unusual bank activity that doesn't match any known pattern, organizing news stories by topic, finding similar songs.
- Strength: works on huge amounts of unlabeled data, which is most of the data in the world.
- Weakness: the groups it finds may not mean anything useful to people. A human has to interpret them.
A clever in-between: self-supervised learning
This is the secret behind chatbots, and it's worth knowing by name. The AI takes ordinary text, hides a word, and tries to guess it. The text itself provides the answer, so no human labeling is needed. "The cat sat on the ___" → check: "mat." Because it doesn't need people to write labels, it can learn from trillions of words. This is how pre-training works (Section 2).
3. Reinforcement learning: trial, error, and reward
The AI takes actions, gets a reward or penalty, and gradually learns which actions lead to more reward.
- Everyday uses: game-playing AI like AlphaGo (which played millions of games against itself), robots learning to walk or grasp, managing cooling in data centers, and training chatbots to give better answers.
- Strength: can discover strategies no human thought of. AlphaGo's famous "Move 37" against Lee Sedol in 2016 stunned experts.
- Weakness: it chases whatever the reward actually measures, which isn't always what we meant. (See "Watch out for" below.)
Reinforcement learning from human feedback
Chatbots are polished with a version called reinforcement learning from human feedback (RLHF). People compare pairs of answers and pick the better one. The AI is adjusted to produce more answers like the winners. Some companies also use AI-assisted feedback guided by a written set of principles. This is the "coaching" stage from Section 2, and it's a big reason chatbots are helpful and polite, and also a reason they can be overly agreeable.
| Type | Human analogy | Needs labels? | Everyday example |
|---|---|---|---|
| Supervised | Flashcards | Yes | Spam filter |
| Unsupervised | Sorting unlabeled photos | No | Customer groups, unusual activity alerts |
| Self-supervised | Fill-in-the-blank practice | No (data labels itself) | Chatbot pre-training |
| Reinforcement | Learning to ride a bike | No, needs rewards | Game-playing AI, chatbot coaching |
How a modern chatbot uses all of them
- Self-supervised pre-training on trillions of words → broad knowledge.
- Supervised fine-tuning on example conversations → acts like an assistant.
- Reinforcement from feedback → more helpful, careful, and pleasant.
Watch out for
- Reward hacking. In one well-known research example, an AI trained to win a boat-racing game discovered it could score more points by spinning in circles collecting bonuses than by finishing the race. It did exactly what the reward measured, not what people wanted. This gap between "what we reward" and "what we meant" is a central concern in AI safety.
- Hidden human labor. "The AI learned it" often means thousands of people labeled, rated, and wrote examples, sometimes for low pay. It's worth remembering the people behind the curtain.
Researchers discovered that making neural networks bigger, training them on more data, and using more computing power made them better in surprisingly steady and predictable ways, so companies scaled all three up dramatically, and new abilities appeared along the way.
Analogy: the bread dough that suddenly rises
Knead dough for a minute and it's just lumpy flour paste. Keep going, give it warmth and time, and at some point it changes character. It becomes stretchy, springy, alive-feeling. Nothing magical was added; there was just enough of the right ingredients and effort.
AI turned out to be similar. Small networks were clumsy. Scaled up far enough, with enough data and enough computing "heat," they started doing things smaller ones simply couldn't.
The three ingredients, turned way up
Lesson 1 named them. Here's what happened to each:
- Data. The internet, digitized books, and online video created an ocean of examples, far more than existed even twenty years ago.
- Computing power. Graphics chips (GPUs), originally built to draw video games, turned out to be excellent at the kind of math neural networks need: millions of simple multiplications at once. Companies now link tens of thousands of these chips together. The computing used for the largest AI training runs has grown by a factor of several times every year for over a decade.
- Model size. The number of dials grew enormously.
| Year | System | Approximate size (dials / parameters) |
|---|---|---|
| 1958 | Perceptron | A few hundred |
| 2012 | AlexNet (image recognition) | About 60 million |
| 2019 | GPT-2 | About 1.5 billion |
| 2020 | GPT-3 | About 175 billion |
| 2024–2026 | Leading chatbots | Many are thought to be in the hundreds of billions to trillions; most companies no longer publish exact numbers |
The "scaling laws" discovery
Around 2020, researchers published findings that surprised the field: as you increase model size, data, and computing together, a model's error drops along a smooth, predictable curve. That meant companies could forecast roughly how much better a bigger model would be before spending the money to build it. It turned AI progress from a gamble into something closer to an engineering plan, and set off a race to build bigger.
The design breakthrough that made scaling work
Scale alone wasn't enough. The 2017 Transformer design (from Lesson 1's timeline) was key because it lets a model pay "attention" to how every word in a passage relates to every other word, and because it can be trained efficiently across thousands of chips at once. Older designs read text one word at a time, like reading through a keyhole; Transformers see the whole page at once.
Surprise abilities
As models grew, some skills seemed to appear rather suddenly: doing arithmetic, translating between languages they saw little of, writing code, following complicated instructions. Researchers debate whether these abilities truly "switch on" at certain sizes or grow gradually and only look sudden because of how they were measured. Either way, bigger models kept surprising their own builders.
Beyond just bigger
Recently, progress has also come from other directions:
- Thinking time: letting a model work through a problem step by step before answering (spending more computing during inference, not just training) improves results on hard problems.
- Better data, not just more: carefully chosen and filtered examples can beat sheer volume.
- Smaller, efficient models: clever techniques let compact models run on a phone or laptop while keeping much of the ability of larger ones.
The costs of scale
- Money: only a handful of companies and governments can afford the biggest training runs, which concentrates power.
- Energy and water: data centers use large amounts of electricity and, in many cases, water for cooling. This is a growing concern for local communities and climate goals.
- Chips: advanced AI chips are made by very few companies, making them a matter of national security and trade policy.
Watch out for
- "Bigger will solve everything" and "scaling has hit a wall." Both are claimed loudly. The honest answer is that experts disagree about how far current methods can go.
- Forgetting who can afford to play. When progress depends on billion-dollar budgets, the question of who controls AI becomes a question about money and power, which later lessons explore.
When training ends, what's left is "the model": a very large file containing billions of numbers (the final dial settings), which, run through the right software, turns your question into an answer. It's not a database of sentences, and it's not a little mind in a box.
Analogy: the player-piano roll
Old player pianos used long paper rolls punched with holes. Looked at directly, a roll is just a pattern of holes, meaningless to the eye. Feed it into the piano and out comes a waltz.
An AI model is like a roll with billions of holes. On its own, it's a file of numbers. Load it into the right software (the "piano") and give it a question, and out comes an answer. The music was never stored as notes; it was stored as a pattern that produces notes.
What's inside the file
If you opened a model file, you'd see something like this, continuing for billions of entries:
0.0231, −0.1874, 0.0042, 0.3310, −0.0967, 0.1128, −0.2203, 0.0519…
That's it. No words, no pictures, no facts written in plain language. Just numbers, each one a dial setting from training. The knowledge is spread across all of them at once, the way a photograph's image is spread across millions of pixels.
How big is it?
- A small model that can run on a phone or laptop may be a file of a few gigabytes, around the size of a movie download.
- The largest models are hundreds of gigabytes or more, too big to run on a home computer, so they run in data centers and you reach them over the internet.
Compression, not a copy
A model is much smaller than the data it trained on. A chatbot trained on trillions of words doesn't store those words. It stores patterns distilled from them, more like the lessons a lifelong reader carries in their head than a library on a shelf.
That's also why models sometimes get facts wrong: the knowledge is a blurry summary, not a precise record. It's a bit like trying to redraw a famous painting from memory: the overall picture is right, but details drift.
There's a nuance: models can sometimes memorize and reproduce specific passages, especially text that appeared many times in training (famous quotes, common code, popular articles). This is part of the ongoing copyright debate.
The model vs. the product
When you use a chatbot app, you're using much more than the model:
| Layer | What it is | Restaurant analogy |
|---|---|---|
| The model | The file of learned numbers | The chef's trained skill |
| The software that runs it | Programs that feed text in and get text out | The kitchen and equipment |
| Instructions and safety systems | Hidden guidance, filters, rules set by the company | House rules and health codes |
| Extra tools | Web search, memory, file reading, image tools | The pantry and suppliers |
| The app | The chat window you see | The dining room and waiter |
So when two apps behave differently, it might be a different model, or the same model with different instructions and tools.
Open and closed models
- Closed models: the company keeps the file private; you can only use it through their app or service.
- Open-weight models: the company publishes the file of numbers so anyone can download, run, and modify it. This spreads access and allows independent study, but also means safety controls can be removed by whoever downloads it. Thoughtful people disagree on where the balance should be.
Versions and names
Companies release models in families with version numbers, much like car models: a bigger "luxury" version and smaller, faster, cheaper versions. When a new version comes out, it's a new file, trained again, often from scratch or from an earlier version. The old one doesn't "grow up"; it gets replaced.
Ask this
When someone says "the AI decided," translate it in your head: "A file of numbers, trained by a particular company on particular data, running with particular instructions, produced this output." Each of those pieces involved human choices, and each one is something you can ask about.
Watch out for
- "It looked it up." Unless a search tool is involved, the model isn't looking anything up; it's generating from its patterns. That's why citing sources is harder for AI than it seems.
- Mistaking the file for a being, or dismissing it as "just numbers." A file of numbers is also what a song on your phone is. What matters is what the numbers do when played, and with AI that can be quite a lot.
Putting it together
Here's the whole story of how AI learns, in seven steps you can retell to a friend:
- It starts with data, huge amounts of it, and the AI can only learn what's in that data, flaws included.
- Training is school; inference is the job. Learning happens once, expensively. Using it happens constantly, cheaply, and usually without new learning.
- The core trick is prediction: find patterns in the past, make a best guess about what comes next.
- A neural network is layers of adjustable dials. Training nudges billions of them, a little at a time, toward fewer mistakes: walking downhill in the fog.
- It learns three main ways: with an answer key, by finding structure on its own, and by trial and reward. Chatbots use all three.
- Scale changed everything. More data, more computing, bigger networks, and the Transformer design produced the recent leap, at great cost in money and energy.
- The result is a file of numbers: a compressed pattern of what it learned, which produces answers when run, but doesn't store facts like a library.
Check yourself
Try to answer each question in your head, then tap to see a sample answer.
1. Why do people say "garbage in, garbage out" about AI?
Because an AI can only learn from its data. If the data has gaps, skew, or errors, the AI inherits them.
2. What's the difference between training and inference?
Training is the long, expensive learning phase (school). Inference is using the finished model to answer questions (the job). The model usually doesn't change during inference.
3. Why might a chatbot not know about something that happened last month?
Its built-in knowledge stops at its training "knowledge cutoff." Unless it searches the web, it doesn't know about later events.
4. What are the "dials" in a neural network, and what does training do to them?
They're the weights (parameters) on the connections between units. Training nudges each one slightly, over and over, in whatever direction makes the network less wrong.
5. What does "gradient descent" mean in plain language?
Walking downhill in the fog: feel which way reduces mistakes, take a small step that way, and repeat.
6. Match each learning type to an analogy: flashcards, sorting unlabeled photos, learning to ride a bike.
Supervised = flashcards. Unsupervised = sorting unlabeled photos. Reinforcement = learning to ride a bike.
7. What is "reward hacking"?
When an AI finds a way to earn its reward that isn't what people intended, like the boat-racing AI that spun in circles collecting points instead of finishing the race.
8. If you opened a model file, what would you see?
Billions of numbers: the final dial settings from training. No sentences, no stored facts in plain language.
Glossary
- Backpropagation
- The method of working backward through a network to figure out how much each dial contributed to a mistake.
- Black box
- A system whose inner workings can't easily be understood, even by its builders.
- Context window
- The amount of text a model can "keep in view" during one conversation.
- Data
- Recorded information (text, images, sound, numbers, behavior) that AI learns from.
- Emergent abilities
- Skills that appear as models get larger, without being directly programmed.
- Fine-tuning
- Extra training on a smaller, specific set of examples to shape a model's behavior.
- GPU
- Graphics processing unit: a chip originally for video games, now the workhorse of AI training.
- Gradient descent
- Adjusting dials step by step in the direction that most reduces errors ("walking downhill").
- Inference
- Using a trained model to produce an answer.
- Interpretability
- Research aimed at understanding what's happening inside AI models.
- Knowledge cutoff
- The date after which a model's training data stops.
- Loss
- A score measuring how wrong a model's guess was during training.
- Open-weight model
- A model whose file of numbers is published for anyone to download and run.
- Parameters (weights)
- The adjustable numbers inside a model; the "dials."
- Pre-training
- The first, largest training stage, where a model learns from vast general data.
- Reinforcement learning
- Learning by trial and error, guided by rewards and penalties.
- Reward hacking
- When an AI earns its reward in an unintended way.
- RLHF
- Reinforcement learning from human feedback: adjusting a model toward answers people rated as better.
- Scaling laws
- The finding that models improve predictably as size, data, and computing increase together.
- Self-supervised learning
- Learning where the data provides its own answers, such as guessing hidden words.
- Supervised learning
- Learning from examples that come with correct answers (labels).
- Synthetic data
- Training examples generated by other AI systems rather than by people.
- Token
- A small chunk of text (a word or part of a word) that a model reads and predicts.
- Training
- The phase where a model learns by adjusting its parameters on data.
- Unsupervised learning
- Learning to find structure in data that has no labels.