Lesson 10 · Understand — Understand AI
How Does AI Work?
Play first
Play a little and see what happens. Then read the key points to find out why.
How an AI Service Gets Built
The model is only one part of an AI system; data, process and ongoing monitoring matter just as much.
From everyday life
ISA asks you
Is there an AI tool around you that nobody has checked since it was set up?
Ready? See what ISA thinks
AI isn’t an appliance you install and forget; data and situations change. Spot-checking a few examples regularly catches problems early.
Key points
- Most services use a ready-made model, then adjust it with prompts, RAG (looking things up first) or fine-tuning.
- Data quality, who can see it, and whether personal data is protected decide how reliable it is.
- After launch, keep monitoring: accuracy, bias, cost and security.
- Most of the cost is computing power: training is a one-time investment, while inference (each use) adds up with usage.
How it works
- Define the need
- Prepare data
- Choose and adjust model
- Evaluate and test
- Launch and monitor
Quick quiz
Remember this
The model is just one part; preparing data and monitoring after launch matter just as much.
Try thisPick an AI service you use often and ask yourself three questions: What data does it use? Who would notice if it went wrong? What does each use cost?
How Does AI Know a Cat?
AI must see lots of cat photos before it can know a cat.
From everyday life
ISA asks you
If you want to teach AI about cats, what do you show it first?
Ready? See what ISA thinks
Show it lots of cat photos first.
Key points
- Show AI lots of cat photos.
- AI remembers cats: pointy ears, long whiskers.
- With a new photo, AI guesses: It’s a cat!
- Many little helpers work together, so AI learns fast.
How it works
- See photos
- Remember the look
- Guess the answer
Find it (an adult reads aloud)
Remember this
AI looks at photos, remembers the look, and guesses the answer.
Try this away from the screenWith a grown-up: Take out some animal picture cards. Say how you knew each animal: ears, tail, or spots and stripes?
Three Steps of AI Learning
Data → training → prediction is how most AI learns.
From everyday life
ISA asks you
If you want to teach AI about cats, what do you show it first?
Ready? See what ISA thinks
Show it lots of cat photos first.
Key points
- Data: lots of photos labeled with answers, like “this is a cat.”
- Training: AI guesses again and again, and adjusts itself when it’s wrong.
- Prediction: when it sees a new photo, AI gives an answer and how sure it is.
- Graphics cards help it calculate fast. Using what it learned to answer is called “inference.”
How it works
- Data
- Training
- Prediction
Quick quiz
Remember this
First data, then training, then prediction. When it guesses wrong, it adjusts and gets better with practice.
Try this away from the screenTake 10 leaves and sort them into two piles. Then take a new leaf and guess which pile it belongs in. What did you look at to decide?
How Neural Networks Learn
The neural networks used in deep learning learn by repeatedly adjusting their “weights.”
From everyday life
ISA asks you
If AI guesses wrong, how do you think it “learns its lesson”?
Ready? See what ISA thinks
It compares its answer with the correct one, sees how far off it was, and adjusts itself a little at a time.
Key points
- A neural network is made of many “nodes”: an input layer, hidden layers and an output layer.
- Every connection has a “weight” that shows how important its signal is.
- During training, it compares its prediction with the correct answer (the error), then adjusts the weights to make the error smaller.
- Generative AI learns patterns in data and uses them to produce new content.
- The calculations are huge numbers of multiplications and additions, run in parallel on graphics cards (GPUs); the weights are stored in memory.
How it works
Quick quiz
Remember this
Neural networks learn by adjusting “weights” to reduce error.
Try thisPlay “guess the number” with a friend: they only say “higher” or “lower.” Note how you adjust each time. That’s like correcting based on error in training.
How Large Language Models Generate Text
An LLM’s core task is actually simple: predict the next token based on the text so far.
From everyday life
ISA asks you
If AI guesses wrong, how do you think it “learns its lesson”?
Ready? See what ISA thinks
It compares its answer with the correct one, sees how far off it was, and adjusts itself a little at a time.
Key points
- An LLM first reads huge amounts of text in “pre-training,” learning to predict the next token.
- The attention mechanism lets the model weigh how strongly each token in a sentence relates to the others.
- Then methods like instruction tuning and reinforcement learning from human feedback (RLHF) make answers fit people’s needs better.
- Output is generated by probability: fluent doesn’t mean correct.
- Producing each token requires reading all the parameters: memory must be big enough, and bandwidth sets the speed.
How it works
- Split into tokens
- Turn into vectors
- Attention calculations
- Predict next-token probabilities
- Sample the output
Quick quiz
Remember this
An LLM repeatedly predicts the next token; fluent doesn’t mean correct.
Try thisPredict: if you ask a chat AI the same question three times, will the answers match? Try it, then use “generated by probability” to explain what you see.