Uploaded October 2026 | Updated December 2026, 3 hours ago
How ChatGPT Turns Words Into Numbers: Tokens & Embeddings — AI for Beginners, Lesson 22.
Free, no-code lesson for students (grades 6–12), teachers, parents and anyone curious about AI. School-level maths only.
A neural network only works with numbers. So how does a language model turn words into numbers?
In this lesson, we cut text into tokens and give each one an ID. Then we see why those IDs can't be used as amounts (remember Lesson 10's Park, Lake and Hill?), why one switch per word isn't enough, and what works better: an embedding, a learned list of numbers that puts words with similar meanings near each other. We explore a made-up word map, see how real embeddings are learned like any other weights, and finish Chapter 6 with the question that leads to attention.
In this lesson:
- Tokens: words, word pieces and punctuation, each with an ID.
- Why ID numbers and simple switches fall short.
- Embeddings: lists of numbers where similar words sit close together.
- How embeddings are learned, just like the weights in Lesson 20.
- The difference between a token's ID (like a roll number) and its embedding.
Try both quiz questions before the answers appear: place "milk" on our word map, then say what an embedding is.
Chapter 6, session 2 / Lesson 22 — the end of Chapter 6. No coding required. Lessons 10, 19 and 20 give useful background.
The word map and all its numbers are made up for teaching; real embeddings are much longer and learned. The classroom clip is AI-generated for illustration.
▶ Previous: Why Word Order Matters: How AI Reads a Sentence youtu.be/9bjrI4eAm3c
▶ Full course playlist: youtube.com/playlist?list=PLZRvbQ5k8TxM
▶ Next: How ChatGPT Pays Attention: Attention Explained Simply youtu.be/akkGZbCK9kY
Subscribe to The Practical School for short lessons that make ideas practical.
#AIForBeginners #LanguageModels #ThePracticalSchool
How ChatGPT Turns Words Into Numbers: Tokens & Embeddings — AI for Beginners, Lesson 22.
Free, no-code lesson for students (grades 6–12), teachers, parents and anyone curious about AI. School-level maths only.
A neural network only works with numbers. So how does a language model turn words into numbers?
In this lesson, we cut text into tokens and give each one an ID. Then we see why those IDs can't be used as amounts (remember Lesson 10's Park, Lake and Hill?), why one switch per word isn't enough, and what works better: an embedding, a learned list of numbers that puts words with similar meanings near each other. We explore a made-up word map, see how real embeddings are learned like any other weights, and finish Chapter 6 with the question that leads to attention.
In this lesson:
- Tokens: words, word pieces and punctuation, each with an ID.
- Why ID numbers and simple switches fall short.
- Embeddings: lists of numbers where similar words sit close together.
- How embeddings are learned, just like the weights in Lesson 20.
- The difference between a token's ID (like a roll number) and its embedding.
Try both quiz questions before the answers appear: place "milk" on our word map, then say what an embedding is.
Chapter 6, session 2 / Lesson 22 — the end of Chapter 6. No coding required. Lessons 10, 19 and 20 give useful background.
The word map and all its numbers are made up for teaching; real embeddings are much longer and learned. The classroom clip is AI-generated for illustration.
▶ Previous: Why Word Order Matters: How AI Reads a Sentence youtu.be/9bjrI4eAm3c
▶ Full course playlist: youtube.com/playlist?list=PLZRvbQ5k8TxM
▶ Next: How ChatGPT Pays Attention: Attention Explained Simply youtu.be/akkGZbCK9kY
Subscribe to The Practical School for short lessons that make ideas practical.
#AIForBeginners #LanguageModels #ThePracticalSchool










