Skip to main content

Context Window

How much text an AI model can consider at one time.

The size of the model's desk, and what falls off the edge.

The desk analogy

A model's context window is its working memory: everything it can "see" at once, including your question, the conversation so far, and any documents you pasted in. Think of it as a desk. A small desk fits one letter. A huge desk fits every binder for a whole project, spread out where the model can read all of it.

When the desk is full, the oldest pages fall off the edge. That's why a very long chat can suddenly "forget" what you said at the start. It literally can't see it anymore.

Tokens: word pieces

Context windows are measured in tokens, chunks of about three-quarters of a word. "Hamburger" might be three tokens, while "the" is one. A 1M-token window is roughly 750,000 words, which is the whole Lord of the Rings trilogy with room to spare.

On the comparison table, context ranges from 200K tokens, about a long novel, up to Llama 4 Scout's absurd 10M, about a small library. Bigger is not automatically better, since you pay for what the model reads. But for big documents it is the number that decides whether the job is possible at all.

Your desk is huge. Here's how to use it without wasting money.

Bigger isn't always better

A 200K-token window is huge: a whole book. But if you're asking a simple question, you pay for all that unused space. Models charge per token read, so a big context means a bigger bill.

When big context helps

Big context wins when you analyze a 50-page codebase, summarize a book, or work through multiple PDFs at once. When you are simply asking what something is, a small context is fine.

Smart strategies

Cut irrelevant sections, and summarize before dumping text in. Use RAG, which searches your documents and feeds the model only the relevant snippets. Put the most important information first, so the model sees it even if it forgets the end.

For huge documents, chunk them, process each part separately, and then synthesize. That is cheaper than one gigantic query.

This is a context window drawn as a capacity bar. You can add content blocks and watch how much of the window they fill, and how much the model would charge to read them at a typical rate of $3 per 1M input tokens.

Each colored slice is one content block. Empty space is capacity you could still use.

Tokens the model reads

30.5K of 200K

Estimated input cost

9.2¢

Saved by trimming