Part 13 / Topic 4 of 6
Context windows
The context window is how many tokens the model can attend over — prompt plus generated reply. Everything you want it to use must be inside: instructions, documents, history. Consequences:
- Cost scales with context. Input tokens are billed; attention compute grows with length. Sending a book to answer one question wastes both.
- Multi-turn chat resends history every call (Part 14) — long conversations grow quadratically in total tokens.
- Retrieval beats stuffing — pick the few relevant passages (Part 17's RAG) instead of pasting everything.
Done here? The practice set for Part 13 — 4 exercises with solutions — is on the part page.