Uploaded October 2026 | Updated December 2026, 3 hours ago
How Does ChatGPT Write an Answer? One Word at a Time — AI for Beginners, Lesson 25.
Free, no-code lesson for students (grades 6–12), teachers, parents and anyone curious about AI. School-level maths only.
A transformer predicts just one next word. So how does a chatbot write a whole answer?
In this lesson, we see that the model gives a chance to every possible next token, chooses one, adds it to the text, and repeats. With a hands-on spinner activity, we write a sentence one token at a time, then spin again from the same start and get a different answer.
In this lesson:
- A chance for every token, adding up to 100%.
- Choosing the most likely token, or choosing by chance.
- Predict, choose, add, repeat: how an answer grows until an end token.
- Why the same question can get different replies.
- Training nudges the weights; using a trained chatbot keeps them fixed while the text grows.
- Why "likely" is not the same as "true".
Try both quiz questions before the answers appear: which word comes after "The sun rises in the", and what changes while a chatbot writes?
Chapter 7, session 3 / Lesson 25. No coding required. Lessons 20, 23 and 24 give useful background.
All chances and spinner results are made up for teaching.
▶ Previous: How Does a Transformer Work? Explained Simply youtu.be/8eFbIqkQ2zA
▶ Full course playlist: youtube.com/playlist?list=PLZRvbQ5k8TxM
▶ Next: Why Is Training AI So Expensive? Chips, Power & Data youtu.be/xZIZvweztE8
Subscribe to The Practical School for short lessons that make ideas practical.
#AIForBeginners #Chatbots #ThePracticalSchool
How Does ChatGPT Write an Answer? One Word at a Time — AI for Beginners, Lesson 25.
Free, no-code lesson for students (grades 6–12), teachers, parents and anyone curious about AI. School-level maths only.
A transformer predicts just one next word. So how does a chatbot write a whole answer?
In this lesson, we see that the model gives a chance to every possible next token, chooses one, adds it to the text, and repeats. With a hands-on spinner activity, we write a sentence one token at a time, then spin again from the same start and get a different answer.
In this lesson:
- A chance for every token, adding up to 100%.
- Choosing the most likely token, or choosing by chance.
- Predict, choose, add, repeat: how an answer grows until an end token.
- Why the same question can get different replies.
- Training nudges the weights; using a trained chatbot keeps them fixed while the text grows.
- Why "likely" is not the same as "true".
Try both quiz questions before the answers appear: which word comes after "The sun rises in the", and what changes while a chatbot writes?
Chapter 7, session 3 / Lesson 25. No coding required. Lessons 20, 23 and 24 give useful background.
All chances and spinner results are made up for teaching.
▶ Previous: How Does a Transformer Work? Explained Simply youtu.be/8eFbIqkQ2zA
▶ Full course playlist: youtube.com/playlist?list=PLZRvbQ5k8TxM
▶ Next: Why Is Training AI So Expensive? Chips, Power & Data youtu.be/xZIZvweztE8
Subscribe to The Practical School for short lessons that make ideas practical.
#AIForBeginners #Chatbots #ThePracticalSchool










