Foundations
Context Window
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.
← Back to the full glossaryRelated terms
Token A token is the basic unit of text an LLM reads and writes. Context Engineering Context engineering decides what occupies a model's context window at every step, and in what order. Context Rot Context rot is a model's declining ability to use context well as it fills with stale material. Context Isolation Context isolation gives each delegated unit of work its own scoped context window.
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. Embeddings Embeddings are numeric vectors that place similar content close together in vector space. Model-Agnostic Architecture A model-agnostic architecture lets an application swap or route between LLM providers without a rewrite. Fine-Tuning (vs RAG) Fine-tuning trains a model's weights on your own examples, changing its behavior directly.