Session 13 — How Generative AI Works
Duration: 75 min · Format: live online · Ages: 12–15
Session goal: by the end, students can explain classifying vs generating, describe how an LLM predicts the next token, and name where generative AI shines — and where it fails and must be verified.
Before class — prep (5 min)
- Have a chatbot / LLM open in a tab (ChatGPT, Gemini, or Claude) on a school or grown-up account — you'll screen-share and demo live.
- Have the two diagrams below ready to share on screen (classify vs generate and next-word prediction).
- Line up one topic you know extremely well (a hobby, your town, your school) so you can catch the model in a mistake live.
- Ask students to have paper and a pencil ready for the activity notes.
Agenda
| Time | Segment |
|---|---|
| 0:00 | Hook — the keyboard that finishes your sentence (5 min) |
| 0:05 | Teach — classify vs generate (12 min) |
| 0:17 | Teach — LLMs predict the next token (13 min) |
| 0:30 | Teach — superpowers and traps (10 min) |
| 0:40 | Activity — interrogate an LLM (20 min) |
| 1:00 | Check for understanding (8 min) |
| 1:08 | Wrap-up + homework (7 min) |
0:00 · Hook (5 min)
Ask the class and take a few answers (chat or unmute):
- "When you type on your phone, how does it suggest the next word before you've typed it?"
- "What if that same trick were scaled up to a huge slice of the whole internet?"
Let them guess, then reveal: a Large Language Model (LLM) — the engine behind ChatGPT, Gemini, and Claude — is that same "next-word guess," supercharged. Tell them that today they'll look under the hood at how these models really work.
0:05 · Teach — Classify vs generate (12 min)
Explain, writing the key words on your shared screen:
- Earlier this course, students built classifiers: input → a label (picture → "Cat").
- Generative models run the other direction — they produce new content from a prompt.
- "a cat astronaut, watercolour" → a brand-new image; "explain photosynthesis" → a brand-new paragraph.
Share this diagram and point out the two directions:
⚠ Watch for the misconception: students think "generate" means the model looks up an answer it stored. Correct it — it builds the output fresh, piece by piece, which is exactly why it can produce something that looks right but is completely made up.
Ask: "Give me one example of classifying and one of generating from your own life." (Take 2–3 answers.)
0:17 · Teach — LLMs predict the next token (13 min)
Explain: an LLM writes by repeatedly predicting the most likely next piece of text — called a token. Share the diagram:
Walk through the loop out loud:
- Score the options — for "The cat sat on the ___" it scores mat 60%, rug 25%, floor 10%, moon 5%. It learned these odds from a massive amount of text.
- Pick one — it chooses a likely token and adds it.
- Repeat — it does this again and again, building sentences one token at a time.
Key point to land: a setting called temperature controls how adventurous the picks are — higher = more creative and random, lower = safer and more predictable.
⚠ Watch for this — the big one: an LLM has no true understanding. It is an extraordinarily good pattern predictor, not a thinker. That is why it can be brilliant and confidently wrong in the same breath. Never trust it blindly — verify.
Ask: "If it's just guessing the next word from patterns, why might it invent a fact that sounds totally believable?" (Take 2–3 answers — steer toward: it optimises for plausible-sounding, not true.)
0:30 · Teach — Superpowers and traps (10 min)
Explain: knowing what generative AI is great at — and where it fails — is what separates a smart user from a careless one. Share this on screen:
| Great at | Watch out for |
|---|---|
| Drafting, summarising, explaining | Hallucinations — it invents facts confidently |
| Translating, brainstorming, rewriting | Bias — it learned society's biases |
| Helping debug or explain code | Knowledge cutoff — it may not know recent events |
⚠ Watch for over-trust: the more fluent and confident the answer sounds, the more students assume it's correct. Flip that instinct — fluent language is not evidence of truth. Anything that matters gets fact-checked against a real source.
Ask: "Which of these traps would be most dangerous in a school project — and how would you catch it?" (Take 2–3 answers.)
0:40 · Activity — Interrogate an LLM (20 min)
Demo first, then have students run it (on their own device, or take turns if you're sharing one screen). Open a chatbot on a school/grown-up account and run three tests:
- Catch a hallucination (≈8 min). Have students ask about something they know really well (a hobby, their town, their favourite game). Their job: find one thing it gets wrong or makes up. Circulate and ask what they caught.
- Summarise (≈6 min). Paste a paragraph from a textbook → "Summarise this in 3 bullet points." Ask: "Did it keep the meaning, or drop something important?"
- Explain, then verify (≈6 min). "Explain how vaccines work, simply." Then have students fact-check one claim against a real source (an encyclopaedia or a trusted site).
Circulate and reinforce: notice how the model sounds confident even when it's wrong. The skill you're practising — checking AI's claims against reality — is a genuine 21st-century skill.
1:00 · Check for understanding (8 min)
Ask these aloud or drop them in the chat. Answer key (for you):
- What does an LLM actually do to write text? → It predicts the most likely next token (piece of text), over and over.
- What is a hallucination? → When the AI confidently states something false that it essentially made up.
- Does an LLM understand what it says? → No — it's a very powerful pattern predictor, not a thinker.
- True or False: if an answer sounds fluent and confident, it's probably correct. → False — fluent wording is no proof of truth; verify anything that matters.
1:08 · Wrap-up + homework (7 min)
- Ask one student to finish the sentence: "An LLM writes by…"
- Homework — AI fact-checker: find a topic where a chatbot got a fact wrong. Write 2 sentences: what it claimed, and what the correct answer is — with your source. Bring it to Session 14.
- Remind them: understanding how the magic works is what separates a user from a builder — and next session, they build.
Teaching notes
- Correct this misconception: "the AI looks up / knows the answer." Reframe as predicting the next token from patterns — which is why it can be fluent and wrong.
- Responsible-AI point (hallucinations): stress that confident tone is not evidence of truth. Model the habit out loud: every important claim gets checked against a trusted source before it's used or shared.
- Bias and cutoff: remind students the model learned from human text, so it can repeat society's biases, and it may not know recent events. Both are reasons to verify.
- Fast finishers (extension): introduce how it's built at a high level — pre-training (predict the next token over huge text), then fine-tuning (humans teach it to be helpful and safe). Mention parameters (the billions of "knobs" it adjusts) and that most LLMs offer an API you can call from Python — a preview of Session 14. Challenge: in one paragraph, explain to a younger student why an LLM can be fluent and wrong at once.
- Low-tech fallback: if student devices are limited, run all three tests yourself on the shared screen and have the class call out what to type and what to fact-check.
Vocabulary
| Term | Meaning |
|---|---|
| Generative AI | AI that creates new content |
| LLM (Large Language Model) | A model that predicts text, trained on huge amounts of writing |
| Token | A small chunk of text the model predicts |
| Hallucination | Confident, made-up output |
| Temperature | How random or creative the output is |
Resources
- Elements of AI — the famous free course (great with a teacher).
- Learn Prompting — the biggest free guide to talking to AI.
- Google — Generative AI literacy — how these models work.
Next session
Session 14 — Build with Generative AI: students learn pro prompt patterns, design their own chatbot with a system prompt, and use AI responsibly and with integrity.