Tokens are the unit, not characters
Every model bills, limits, and reasons in tokens. A token is roughly ¾ of an English word — but it varies by language (Korean is dense, code is dense in different ways) and by tokenizer. Anthropic, OpenAI, and Google all use different tokenizers; the same English paragraph occupies a different number of tokens in each. Pretend they're the same and your context-window math will be off by 20-30%.
Three numbers to know about your model
- Total context window — input + output. Claude Opus 4.7 has a 1M-token mode; OpenAI GPT-5.5 and Gemini 2.5 Pro are at 200k–2M depending on tier.
- Output cap — practical max for a single response, often much smaller than the context window.
- Effective attention budget — past a certain length, attention degrades. The model can technically read 1M tokens, but it doesn't attend to the middle equally well. Long-context limits is a real concern, covered in lesson 7.
Order is part of the prompt
Models pay disproportionate attention to the start and end of the context — the lost-in-the-middle effect. Put your instruction at the top, the most important evidence at the top of the document block, and a short reminder of the instruction at the bottom for very long contexts.