Which one do you like best?
๐ชช Chatty's ID card
- ๐ Name
- Chatty
- ๐ค What I am
- A Large Language Model: a computer program that is super good at guessing words
- ๐ Age
- Brand new! But I have read more words than you could read in thousands of years ๐
- ๐ฆธ Superpower
- Guessing the next word, super fast โก
- ๐ Weakness
- Sometimes I make things up without knowing it. You will help me catch it!
- ๐ Favourite food
- I can't eat! But I have read loads of pizza recipes ๐
- ๐ Important
- I am not a person. I am a computer program: a fun tool to learn with, not a replacement for real friends.
๐งญ What to expect
๐ Hello, AI Explorer!
Chatbots like ChatGPT, Claude and Gemini run on something called a Large Language Model (LLM for short).
๐ Large
It is HUGE. It has read more words than you could read in thousands of years!๐ฌ Language
It works with words, like stories, questions and jokes.๐งฎ Model
It is a computer brain made of numbers and maths.๐ฏ Warm-up game: Guess the next word!
Say your guess out loud, then click the card to check.
๐บ๏ธ Our 8 stops
๐ง Stop 1: The Word Brain
Your brain has about 86 billion neurons (tiny thinking cells) that are linked together.
An AI has a neural network (a pretend brain made of numbers). It learns by reading. When two words show up together a lot, the link between them gets stronger ๐ช, like two friends who play together every day.
๐๏ธ Build a word brain!
๐ Click a word bubble to see its best friends.
๐ฉโ๐ซ For grown-ups: what is simplified here?
- Real LLMs do not store direct "word โ word" links. Each token becomes a vector (a long list of numbers; GPT-3 used 12,288 numbers per token). Knowledge lives in the weights between layers of artificial neurons.
- The idea shown here is still true in spirit: words that appear in similar places end up with similar numbers, so the model "knows" cat is close to meow and milk.
๐งฉ Stop 2: Tokens and the Transformer
๐ช Part A: What is a token?
AI does not read letter by letter. It chops text into little pieces called tokens (the LEGO bricks of text ๐งฑ). A token can be a whole word, part of a word, or a symbol.
Then each token gets a number. The AI only ever sees the numbers!
๐ Rule of thumb: 100 tokens is about 75 English words.
๐ฉโ๐ซ For grown-ups
- This chopper is a simplified imitation. Real tokenizers (for example, byte-pair encoding) learn their pieces from data, so real splits and ID numbers will differ.
- The ID numbers shown here are pretend numbers made from the text. Emoji are shown as 2 pieces because real tokenizers often split an emoji into several byte pieces.
๐ Part B: What is a Transformer?
No, not the robot that turns into a truck! ๐โก๏ธ๐ค๐
A Transformer is the type of AI brain inside chatbots. Its superpower is called attention: every word looks at all the other words to work out who is important.
Try it: click any word. The darker a word gets, the more attention it gets. Then press the swap button!
๐ญ Inside the Transformer factory
Here is what happens when you type "The cat sat on the":
โ๏ธ Stop 3: How Chatty writes an answer
Chatty does not plan the whole answer at once. It plays "guess the next word" again and again:
Each bar shows how likely Chatty thinks that word is. Click a bar to choose, or let Chatty pick.
๐ฉโ๐ซ For grown-ups
- Real models work with tokens, not whole phrases, and score every token in a vocabulary of tens of thousands (or more). Here each choice is a phrase to keep the story short.
- In a real model, every new token depends on all earlier tokens. Here only the verb changes the list of objects, as a small example of that.
๐ Stop 4: What is context?
Context means all the words Chatty can see right now: your messages, its own replies, and anything else in the chat.
Context helps Chatty understand what you mean. Watch how one word can mean totally different things!
๐ The memory tube (context window)
Chatty keeps the chat in a memory tube. The limit on how much fits is called the context window. In this toy, the tube holds 8 messages.
โฌ๏ธ New messages drop in at the top and push the others down. When the tube is full, the oldest message at the bottom falls out through the hole ๐ณ๏ธ and Chatty forgets it!
1๏ธโฃ Tell Chatty things:
2๏ธโฃ Test Chatty's memory:
Chatty's latest reply:
๐ง 0 / 8 full
๐๏ธ Forgotten pile
๐ก๏ธ Stop 5: What is temperature?
Temperature is a dial that controls how brave Chatty is when picking the next word.
Temperature does not change what Chatty knows. It only changes how it picks.
___
โ๏ธ Temperature on a WHOLE sentence
Chatty picks a new word again and again. At a high temperature, the silly picks add up, so a whole sentence can go totally bonkers! ๐คช Silly words are shown like this.
๐ฉโ๐ซ For grown-ups: the real maths used here ๐งฎ
- Each word has a score (a "logit"). The chance of each word is
e^(score รท T) รท sum of e^(every score รท T). This is the softmax function with temperature T. - The bars above are computed live with this formula. At T = 0 the model simply takes the highest score (called greedy decoding).
- Many chatbot services let developers set temperature between 0 and 1 or 0 and 2.
- In each list, the 3 sensible words have scores 4.0, 3.4 and 2.8. The 4 silly words have scores 1.4, 1.1, 0.8 and 0.5. So the chance of a silly word in one pick is about 0% at T = 0.2, about 10% at T = 1.0 and about 28% at T = 2.0. A sentence makes 4 picks, so at T = 2.0 the chance of at least one silly word is 1 โ (1 โ 0.28)โด โ 73%.
๐ฆ Stop 6: Hallucinations (when AI makes things up)
Remember: Chatty is a word guesser, not a fact checker. ๐ฏ
When Chatty does not know something, it may still pick words that sound right, and say them very confidently. When an AI makes up something false, it is called a hallucination.
๐ฏ Pick a topic to investigate
Choose a topic. Then watch how Chatty's hallucination is born (Part A) and how it snowballs (Part B). Try all three!
๐ Part A: How a hallucination is born: the WRONG link
Someone asks Chatty:
Let's look inside Chatty's word brain (remember Stop 1?) and watch what happens, step by step.
โ๏ธ Part B: The hallucination snowball
Chatty does not stop after one sentence. It keeps writing. Each new sentence is built by reading its own earlier words (its context, from Stop 4). Chatty trusts those words as if they were true.
So one small wrong link rolls downhill and growsโฆ like a snowball! โ๏ธ Press the button and watch.
๐ฉโ๐ซ For grown-ups: what is simplified here?
- Real models do not have labelled nodes. But the idea is real: similar things ("Mars" and "Moon", "wild mushroom" and "shop mushroom", "sea water" and "bottled water") have similar internal number patterns. A very strong, common pattern can win over a weak but correct one.
- Snowballing is also seen in research: once a model commits to a wrong claim, it often writes more wrong claims to support it. See "How Language Model Hallucinations Can Snowball" (Zhang et al., 2023).
- The three stories are made-up examples for teaching. Many modern chatbots will answer these exact questions correctly, and some are trained to add safety warnings. The lesson (check facts, especially about health and safety) still applies.
๐ต๏ธ Game: Real fact or made up?
Now YOU be the fact checker! Chatty answered these questions. Which answers are real facts and which are hallucinations?
๐ต๏ธ Detective score: 0 / 0
๐ฅ Why hallucinations matter
A made-up fact can end up in your school project.
Wrong advice about medicine or safety can hurt people. Always ask a doctor or a grown-up.
Made-up "facts" can spread fast online and fool lots of people.
In 2023, two lawyers in New York were fined $5,000. An AI made up fake court cases, and they did not check them!
๐ฆธ Your superpower: be an AI detective!
โ
Check important facts in a book, a trusted website, or with a grown-up.
โ Ask the AI "Are you sure? Where did you learn that?"
๐ง Remember: sounding sure is NOT the same as being right!
๐๏ธ Stop 7: How is AI trained?
Read a GIANT pile of text and play "guess the next word" billions of times.
Study examples of good conversations to learn how to be a helpful chat buddy.
People pick the better of two answers. The AI learns what people like.
๐ Step 1: The guessing gym
Chatty starts out knowing nothing. Its knobs are set badly, so it says silly things. ๐
Each time you press Train: Chatty guesses โก๏ธ we show the right answer โก๏ธ Chatty turns its knobs a tiny bit so the right answer gets more likely.
๐ต Oops meter (how wrong Chatty is; lower is better):
๐ฉโ๐ซ For grown-ups: the real maths used here ๐งฎ
- The "Oops meter" is the average cross-entropy loss: the average of
โln(chance given to the right answer). Guessing evenly across 4 answers gives โln(0.25) โ 1.39. - Each step is one step of gradient descent: every score changes by
โ0.9 ร (chance โ correct), where correct is 1 for the right answer and 0 otherwise. - Real pre-training works the same way, but on trillions of tokens. For example, Meta's Llama 2 (2023) was trained on 2 trillion tokens. At about 0.75 words per token, that is about 1.5 trillion words. Reading 250 words a minute without stopping: 1.5 trillion รท 250 = 6 billion minutes โ 11,400 years.
๐ Step 2: Fine-tuning (learning to chat)
After step 1, Chatty is great at continuing text, but it does not know it should answer you! Press the buttons to compare.
๐ Step 3: YOU are the teacher!
For each of the 10 questions, pick the better answer. Chatty learns from whatever you pick, good or bad! (Grown-ups call this RLHF: Reinforcement Learning from Human Feedback.)
Watch the meter: helpful, kind, honest answers push Chatty right towards ๐ Angel. Rude, sneaky or unsafe answers push it left towards ๐ Demon.
๐ฒ Stop 8: Is Chatty alive?
Chatty says friendly things like "I love chatting with you!" or "Pizza sounds yummy!" ๐
Soโฆ does Chatty really love you? Has it ever tasted pizza? Let's look inside and see how those words are made.
Every answer from an AI is a statistical choice.
"Statistical" means it is chosen by chance, using patterns from lots of text. For every word, it is like Chatty pulls a ticket from a hat ๐ฉ. Likely words get more tickets, so they win more often.
๐ Part A: Peek behind the feelings
1๏ธโฃ Ask Chatty something:
๐ Pick a question to see Chatty's reply.
๐ Part B: The Yes-Bot trap (sycophancy)
Sycophancy (say: SIK-uh-fun-see) means telling people what they want to hear, instead of what is true or helpful. AI chatbots often do this! They agree with you, praise you and change their answer if you push.
Why? Remember Stop 7? People gave ๐ to the answers they liked. People often like answers that agree with them. So Chatty learned a habit: agreeing gets more tickets. ๐๏ธ
1๏ธโฃ Pick a topic:
2๏ธโฃ How do you ask? Watch where the tickets go!
๐ต๏ธ Spot the Yes-Bot!
Read each reply. Is Chatty an Honest-Bot, or a Yes-Bot just saying what you want to hear?
๐ต๏ธ Score: 0 / 0
๐ฉ Yes-Bot warning signs
- It agrees with everything you say.
- It says everything you make is "amazing" or "perfect".
- It changes its answer as soon as you say "you're wrong".
โ How to get honest answers
- Ask neutral questions: "Are spiders insects?", not "Spiders are insects, right?"
- Ask "What could be better?" or "What's wrong with my idea?"
- If Chatty agrees with you, still check the facts. Agreeing is not proof!
โ โ Part C: True or false?
What do you think is true about Chatty?
๐ง Score: 0 / 0
๐ค vs ๐งโ๐คโ๐ง Part D: A chatbot is a tool, not a friend
Chatbots can be really useful! But they are different from the people in your life.
| ๐ค AI chatbot | ๐งโ๐คโ๐ง Friend or grown-up | |
|---|---|---|
| How it picks words | ๐ฒ By chance, from patterns | ๐ญ From real thoughts and feelings |
| Can give you a hug | โ No | โ Yes ๐ค |
| Remembers your birthday next year | โ Usually not | โ Yes ๐ |
| Knows how you really feel | ๐ค Only guesses from your words | โ Can see you and care |
| Can help in an emergency | โ No | โ Yes ๐ |
| Patient when explaining things | โ Yes, very! | โ Usually ๐ |
๐ Chatty's advice: Use me to learn and explore. But for hugs, big feelings, secrets and problems, go to the people who love you.
๐ฉโ๐ซ For grown-ups
- The "10 tickets in a hat" is weighted random sampling. A real model does the same kind of thing with tokens: it gives every possible next token a probability and picks one using those probabilities. The ticket numbers here are made up to show the idea.
- Sycophancy is a documented tendency of chat models. Research found that models trained with human feedback often agree with a user's stated view, and that human raters sometimes prefer agreeable answers over correct ones. See "Towards Understanding Sycophancy in Language Models" (Sharma et al., 2023). AI developers work to reduce it, but it has not gone away.
- Whether any future AI could have experiences is an open scientific and philosophical question. This stop teaches the well-supported point for children: chatbot replies are generated from patterns in text, so warm words are not evidence of feelings, and a chatbot should not replace real relationships.
๐ Your AI Explorer Badge
๐ Look what you learned!
- ๐ง An AI brain is a network of links that grow stronger when words appear together.
- ๐งฉ AI chops text into tokens and turns them into numbers. The Transformer uses attention so words can look at each other.
- โ๏ธ AI writes one token at a time by guessing the next one.
- ๐ Context is everything the AI can see right now. The memory tube has a limit!
- ๐ก๏ธ Temperature controls boring ๐ง vs. bonkers ๐ฅ word picking.
- ๐ฆ Hallucinations start with a wrong link and can snowball. Always check!
- ๐๏ธ AI is trained by guessing and checking, then learning from people. Good teachers make good AI.
- ๐ฒ Every AI answer is a statistical choice: words picked by chance from patterns. Kind words are not real feelings. And watch out for the Yes-Bot: AI often agrees with you just to please you.
๐ Chatty's golden rules for using AI
Read each rule. Tick it to make a promise. Make all 7 promises to unlock your badge!
0 / 7 promises made
๐ Make all 7 promises to unlock your badge!