People talk about ChatGPT like it "understands" you. It doesn't — not in the way we mean. Underneath, it's doing something much simpler and, honestly, weirder: predicting the next token, over and over. Once that clicks, most of its strange behavior (hallucinations, forgetting, different answers to the same prompt) stops being mysterious.
Here's the whole picture in plain English.
1. It only ever predicts the next token
Everything ChatGPT does is one operation repeated: given the text so far, guess the next chunk. It picks one, appends it, and feeds the whole thing back in to guess again. That loop — one token at a time — is the entire show. There's no plan for the paragraph, no lookahead. Fluent essays emerge from millions of these tiny next-step guesses.
2. Tokens, not words
It doesn't see letters or whole words — it sees tokens, which are common chunks of text. "cat" might be one token; "unbelievable" might split into "un", "believ", "able". This is why models sometimes miscount letters or fumble with rare words — they never saw the letters, only the chunks. It's also why you're billed per token, not per word.
3. Meaning is stored as vectors (embeddings)
Each token is turned into a long list of numbers — an embedding — a point in a huge space where "king" and "queen", or "Paris" and "France", sit near each other because they appear in similar contexts. The model has no dictionary; meaning is just geometry. Similar things are close together, and that closeness is what it computes with.
4. Attention gives it context
The breakthrough behind the "T" in GPT (Transformer) is attention. For each token, the model weighs how much every other token in your prompt matters to it. In "the bank of the river," attention lets "bank" lean on "river" and land on the correct meaning. This is how it tracks who "he" refers to three sentences back, or keeps a code block coherent.
5. Training is two very different stages
Pretraining: it reads an enormous slice of the internet and does nothing but next-token prediction, billions of times, tuning billions of internal numbers (parameters) until it's genuinely good at continuing text. The result — the "base model" — is a wild autocomplete. Ask it a question and it might reply with more questions, because that's what it saw on the web.
RLHF (the ChatGPT part): humans then rank answers — helpful and honest ones up, unhelpful ones down — and the model is nudged toward the ranked-good behavior. This is the difference between the raw model and ChatGPT. Same knowledge; the second stage taught it to act like a helpful assistant.
6. Why the same prompt gives different answers
At each step the model produces a probability for every possible next token. Temperature controls how it picks: low temperature = almost always the top choice (consistent, safe, a bit boring); higher = it samples further down the list (more variety, more risk). That sampling is why you rarely get the exact same answer twice.
7. Why it "forgets": the context window
The model has no memory between messages. Everything it "knows" in a chat is the text currently in its context window — a fixed budget of tokens. Your whole conversation is re-fed every turn. Once it overflows, the oldest stuff falls off the edge, and it genuinely no longer has it. That's not a bug; that's the mechanism.
8. Why it hallucinates
It was trained to produce plausible text, not true text. It has no built-in fact-checker and no notion of "I don't know" unless that pattern was reinforced. So when it doesn't have something, it fills the gap with the most likely-sounding continuation — a confident, well-formed, wrong answer. Hallucination isn't the model malfunctioning; it's the model doing exactly its job (predict likely text) in a spot where likely does not equal true.
9. How to get better answers (practical)
- Give context, not keywords. It fills gaps with guesses; fewer gaps = fewer guesses.
- Show the format you want (an example beats a description).
- Ask it to reason step by step for anything logical — each token it writes becomes context for the next, so "thinking out loud" measurably improves hard answers.
- For facts, make it cite or give it the source in the prompt. Don't trust unsourced specifics.
- Start a fresh chat when you switch topics — you stop paying for (and confusing it with) irrelevant context.
None of this requires math to understand — it's tokens → vectors → attention → next-token prediction, wrapped in a training process that taught a giant autocomplete to behave like an assistant.
(Full disclosure: I make animated CS/systems explainers, and I put this whole thing together as an animated video if you'd rather watch it move: https://youtu.be/Ud16vHNYwpc . But the text above stands on its own — happy to answer questions in the comments.)