Back to Discover
Curiosity

How Does ChatGPT Actually Work?

ChatGPT is a large neural network that predicts the next word in a sequence, trained first on huge amounts of text and then refined with human feedback, so its replies are shaped predictions rather than looked-up facts.

Before you enter

A complete interactive classroom, not just a preview.

Start when you are ready to enter this Stage's 9 scenes and explore, respond, and learn as you go.

9
Scenes
18 min
Estimated
Content language: en-US
Start this Stage
Sign-in may be required to play
What happens inside
  1. 01The Mystery in the Chat Windowslide
    Question

    Frame the driving question by showing a familiar chat exchange and asking what could possibly be producing the reply.

    • ChatGPT writes fluent, context-aware replies
    • It is not searching the web or looking up a database
    • Something inside the model is generating each word
  2. 02What Do You Think ChatGPT Is Doing?quiz
    Prediction

    Let the learner commit to one intuition before the mechanics are revealed.

    • Choose the model that best matches your current intuition
    • Your guess will be revisited after the explanation
  3. 03Try a Tiny Next-Word Predictorinteractive
    Evidence

    A simple simulation that, given a few prompt words, shows the probability distribution over possible next words so the learner can see prediction in action.

    • The model assigns a probability to many possible next words
    • One token is sampled from that distribution
    • The chosen token is appended and the process repeats
  4. 04Tokens, Not Wordsslide
    Evidence

    Show how text is broken into tokens, the actual units a language model reads and writes, with a visual of a sentence split into colored token blocks.

    • Models do not see letters or words directly
    • A tokenizer breaks text into common subword pieces
    • Each token is converted into a vector of numbers
  5. 05Attention and the Transformerinteractive
    Explanation

    An interactive diagram where the learner highlights which earlier tokens a given token attends to, revealing how context flows through the model.

    • Attention lets each token weigh the relevance of every other token
    • Multiple attention heads run in parallel
    • This is the core mechanism behind long-range coherence
  6. 06Two Stages of Trainingslide
    Explanation

    Walk through pretraining on broad text and then reinforcement learning from human feedback, explaining why two stages are needed.

    • Pretraining teaches general language patterns at huge scale
    • Human feedback teaches helpfulness, safety, and style
    • The same next-token objective drives both stages
  7. 07Change the Temperatureinteractive
    Transfer

    Let the learner adjust a temperature slider on the same prompt and compare the sampled outputs, testing the idea that randomness shapes style but not knowledge.

    • Low temperature yields predictable, repetitive text
    • High temperature yields varied but riskier text
    • The underlying knowledge distribution is the same
  8. 08What ChatGPT Is Notslide
    Boundary

    Address common misconceptions: ChatGPT does not store facts as a database, does not think in human sense, and can confidently produce wrong information.

    • It has no live search by default
    • It has no internal truth-checker
    • Confidence in tone does not equal correctness
  9. 09So How Does ChatGPT Work?slide
    Resolution

    Tie everything back to the driving question with a single, clear answer and revisit the learner's earlier intuition.

    • It tokenizes your prompt and predicts the next token, repeatedly
    • Training on text plus human feedback shapes those predictions
    • Scaled up, this simple objective produces helpful, conversational replies
Discussion

Discussion threads for a Stage aren't available yet.

Where this leads
Explore more

More in Technology & Computing

See all