Home Knowledge Base Context Length and Context Windows

Context Length and Context Windows

What is Context Length? Context length (or context window) is the maximum number of tokens an LLM can process in a single request, including both the input prompt and generated output.

Context Lengths by Model

ModelMax ContextNotes
GPT-4 Turbo128,000~300 pages of text
GPT-4o128,000Most efficient
Claude 3.5 Sonnet200,000Largest commercial
Gemini 1.5 Pro1,000,000Experimental
Llama 3 70B8,192Base, extendable with RoPE
Mistral Large32,000Good balance

Why Context Length Matters 1. Document processing: Longer context = more pages per request 2. Conversation history: More turns remembered 3. Few-shot learning: More examples in prompt 4. RAG applications: More retrieved chunks

Trade-offs of Long Context

Longer ContextImplications
✅ More informationCan include full documents
❌ Higher costMore tokens = higher API bills
❌ SlowerMore computation required
❌ Lost in the middleModels may miss information in middle of long contexts

Extending Context

Best Practices

contextcontext lengthwindow

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.