Tokens and Context Windows Explained: Why AI "Forgets" Your Chat
Why does a long AI chat start ignoring your early instructions? Why do AI APIs charge "per token"? A simple explanation of tokens and context windows, and practical habits to keep long conversations on track.

If you have ever had a long conversation with an AI assistant and noticed it "forgot" something you said at the start, you have met the context window. And if you have looked at AI pricing and seen prices "per million tokens", you have met tokens. Both ideas are simple once you see them, and they explain a lot of AI behaviour.
What is a token?
AI models don't read text letter by letter or word by word. They read tokens: small chunks of text. A token is often a whole common word ("the", "and"), part of a longer word, a piece of punctuation, or a space plus a word.
A rough rule of thumb for English:
- 1 token ≈ 4 characters ≈ ¾ of a word
- 100 tokens ≈ 75 words
- A typical page of text ≈ 500 to 700 tokens
Other languages, code and unusual words often use more tokens for the same amount of text. That's why a paragraph in Hindi or a chunk of code can "cost" more tokens than the same length of English prose.
Why tokens matter
Tokens are the unit for three things:
- Cost. AI APIs charge for the tokens you send in (input) and the tokens the model writes back (output). Output tokens usually cost more.
- Speed. The model writes one token at a time, so longer answers take longer.
- Limits. Every model has a maximum number of tokens it can consider at once: its context window.
What is a context window?
The context window is the model's working memory for a single conversation. Everything it can "see" when writing its next answer has to fit inside it:
- the system's instructions,
- your messages,
- its previous replies,
- any documents or files you attached.
Modern models have large context windows (often enough for a long book), but they are not infinite. And there is a second, subtler issue: even within the window, models pay more reliable attention to some parts than others. Very long conversations can make earlier details easier to overlook.
Why AI seems to forget
Two things cause the "it forgot what I said" experience:
- The window filled up. In very long chats, some tools drop or compress the oldest messages to make room. Your early instructions literally aren't there anymore.
- Attention gets diluted. Even when everything fits, one instruction buried 40 messages ago competes with everything said since.
Important: the model doesn't learn from your conversation in a lasting way. Each new chat starts fresh, unless the tool has a separate "memory" feature that saves notes about you.
6 habits for long AI conversations
- Start a new chat for a new task. Don't run your email drafting, code debugging and holiday planning in one endless thread.
- Put key instructions in one clear message, and repeat the essentials when you change direction: "Reminder: British spelling, under 200 words."
- Summarise and restart. When a chat gets long, ask: "Summarise our decisions so far in 10 bullet points." Paste that summary into a new chat and continue.
- Attach only what's relevant. Five relevant pages beat a 300-page dump.
- Use project or custom-instruction features if your tool has them, for instructions you want in every chat.
- Ask it to quote. For document questions: "Quote the exact sentence you're relying on." It shows you whether the right part of the document was used.
For builders: thinking in tokens
If you call AI models from code, tokens become your budget:
- Estimate cost before you scale. Tokens per request × requests per day × price per token.
- Trim inputs. Send only the relevant parts of a document (this is exactly what retrieval-augmented generation, RAG, does).
- Cap output length when you only need a short answer.
- Reuse repeated instructions with your provider's caching features where available.
Learn more
The free course AI for Beginners has a lesson on tokens and context windows, plus a hands-on lab where you count tokens, estimate costs and see how much text fits in a model's window. If you want to build AI products, AI Builder goes deeper into cost, context and reliability.