Context and Context Windows
What should a model do with "Explain it."? On its own, nothing: explain what? But if Advitha first wrote "I'm learning about tokens", the same two words make perfect sense. The difference is context.
This lesson explains what context is, what a context window is, and what happens when a conversation or a document is too long to fit.
Context Is What the Model Can See
Context is all the text the model reads before it answers: the app's instructions, the conversation so far, any documents or search results the app adds, and your new message. The model has no other memory of your chat; everything it knows about this conversation must be in the context.
The Context Window
The context window is the maximum amount of text, measured in tokens, that a model can read at once, including its own reply. As of November 2026, window sizes vary widely by model, from a few thousand tokens to more than a million.
| What fills the window | Example |
|---|---|
| Instructions | The app's rules, such as "Be helpful and concise" |
| Conversation history | Every earlier message in the chat |
| Added material | A pasted document, search results, a file |
| Your new message | "Explain it." |
| The reply | The tokens the model generates |
When a conversation outgrows the window, the app must drop or summarize older messages, and the model no longer sees them. That is why, in a very long chat, an assistant can "forget" something you said at the start.
Working Well with Context
| Do | Why |
|---|---|
| Say what "it" and "this" refer to | The model can't guess what isn't in the context |
| Paste the relevant part, not everything | Less noise, fewer tokens, lower cost |
| Start a new chat for a new topic | Old, unrelated messages can confuse the answer |
| Repeat key facts in long chats | Early messages may have been dropped |
Common Mistakes
Assuming the model remembers earlier chats. Unless the app adds a memory feature, each new chat starts with an empty context.
Pasting a huge document and asking a vague question. Point the model to the relevant section.
Forgetting that the reply counts against the window. A long answer needs room too.
Interview Corner
What is a context window?
The maximum number of tokens a model can process at once, including the instructions, conversation, added documents and its own reply. Text beyond the limit must be dropped, summarized or retrieved selectively.
Why does a chat assistant sometimes forget the start of a long conversation?
The conversation outgrew the context window, so the app dropped or summarized the oldest messages, and the model can no longer see them.
Practice
Exercise: test context. In a new chat, type only "Summarize it in one line." and note the reply. Then paste a short paragraph and ask the same thing. What changed? Finally, in a long chat, ask about a detail from your very first message and see whether it is still known.
Check your understanding:
- What is in a model's context?
- What happens when a chat outgrows the context window?
- Give two habits that help a model use context well.
Key Takeaways
Quick reference
| Term | Meaning |
|---|---|
| Context | All the text the model reads before answering |
| Context window | The maximum tokens a model can handle at once |
| Conversation history | Earlier messages sent along with each new one |
Was this tutorial helpful?