# Context Window Source: https://customlabs.io/glossary/context-window/ Updated: 2026-10-19 Foundations The context window is the maximum text, measured in tokens, a model can consider at once. It spans the prompt, retrieved documents, conversation history, and the model's own output. A larger window does not mean it should be filled, since cost scales with tokens processed. Good retrieval still beats brute-force stuffing in every relevant document. Sizing the window is a cost and latency decision as much as a capability one. [Insight: What AI actually costs](https://customlabs.io/insights/what-ai-actually-costs/) [AI Cost Calculator](https://customlabs.io/tools/cost-calculator/) [← Back to the full glossary](https://customlabs.io/glossary/) ## Related terms [Token A token is the basic unit of text an LLM reads and writes.](https://customlabs.io/glossary/token/) [Context Engineering Context engineering decides what occupies a model's context window at every step, and in what order.](https://customlabs.io/glossary/context-engineering/) [Context Rot Context rot is a model's declining ability to use context well as it fills with stale material.](https://customlabs.io/glossary/context-rot/) [Context Isolation Context isolation gives each delegated unit of work its own scoped context window.](https://customlabs.io/glossary/context-isolation/) ## More in Foundations [Retrieval-Augmented Generation (RAG) Retrieval-Augmented Generation (RAG) retrieves relevant passages at query time and feeds them into an LLM's context.](https://customlabs.io/glossary/retrieval-augmented-generation/) [Embeddings Embeddings are numeric vectors that place similar content close together in vector space.](https://customlabs.io/glossary/embeddings/) [Model-Agnostic Architecture A model-agnostic architecture lets an application swap or route between LLM providers without a rewrite.](https://customlabs.io/glossary/model-agnostic-architecture/) [Fine-Tuning (vs RAG) Fine-tuning trains a model's weights on your own examples, changing its behavior directly.](https://customlabs.io/glossary/fine-tuning/)