Pip
Lesson 3 of 12

How does ChatGPT work?

4–6 min+100 XP
Grace and Pip in lesson 3: How does ChatGPT work?

Your mission

Is it a cricket bat or a bat in a cave? Grace discovers that chatbots predict the next piece of text, one token at a time, and that clear context gets far better answers.

Power-ups

  • TokensChatbots split text into small pieces called tokens, then predict the next one.
  • Context steers itThe words around "bat" decide which bat it means. Clear prompts help.
  • Check the mathsIt predicts text, it doesn't always calculate. 17 × 19 = 323: check it yourself!

Your turnTry it yourself

Quick checkThree questions

1What does a chatbot do to write a reply?

One piece at a time.

2Why add "used in cricket"?

Context steers the prediction.

3Are the weights changing while it answers you?

Learning happened during training.

Off-screen challenge: Next-word game

Say a sentence one word at a time with a friend. Each of you must guess the next word. How often did you agree?

Last time: what AI is. Next time: how AI makes pictures.