Basic

The context window

Every model can only see so much text at once. That limit is the context window, and it's the whole reason long conversations and huge documents are awkward. Keep it in mind and you'll stop surprising yourself with what the model forgot.

About 2 min of reading

Data Flow

Prompt and reply share one window. Add more text and eventually it fills, so older details drop away.
1 Prompt enters window
↓
2 Model replies in same window
↓
3 Conversation grows
↓
4 Window fills and old text drops
Why this works
A fixed size

The context window is the maximum amount of text the model can hold at the same time, and it includes your prompt and everything the model writes back. Once you're at the limit, nothing more fits.

It fills up

As a conversation grows, the window fills. When it's full, the model can no longer see the earliest messages, which is why long chats start forgetting the beginning. Short prompts and summaries buy you room to keep going.

Examples

A small blackboard

Think of the context window as a blackboard.
If your notes are bigger than the board, some of them are hidden.

When the board fills up, the oldest notes get wiped clean and the model genuinely forgets them. It's not ignoring you on purpose, it simply has nothing left to see.

The board shrinks as you talk

Blackboard space: 4,000 tokens.
Prompt + notes fill 3,900 tokens.
Only the last bit stays visible.

As the conversation grows, the earliest details get pushed out of view. Keeping notes short is what lets more of them stay on the board longer, which is a useful trick to remember.

Windows come in different sizes

Some models hold 8,000 tokens.
Others hold 128,000 tokens or more.

A bigger window lets you paste an entire document at once. Pick one big enough for what you're doing, or you'll fight a blackboard that's too small the moment the project grows.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← How models read text: tokens
Previous Lesson
How models read text: tokens
Next Lesson
Temperature: control vs chaos
Temperature: control vs chaos →