midLLMs
What is context window in LLMs?
Updated May 16, 2026
Short answer
Context window is the maximum number of tokens an LLM can process at once.
Deep explanation
The context window defines how much input and history a model can consider. Larger context windows allow better reasoning over long documents but increase compute cost.
Real-world example
Analyzing long legal contracts in one pass.
Common mistakes
- Assuming infinite memory in LLMs.
Follow-up questions
- What happens if context exceeds limit?
- Why larger context is expensive?