What is Context Window?

Context Window

The maximum number of tokens an LLM can process in a single request, including both the input prompt and the generated output. Context window size determines how much information the model can reason over at once.

How Context Window Works

AI glossary showing essential machine learning concepts

Each LLM has a fixed maximum context length determined by its architecture and training. Tokens are subword units (roughly 3-4 characters or 0.75 words each). When input plus generated output exceed the context window, older tokens are dropped or the request fails. Modern models use techniques like sliding window attention, ring attention, and positional encoding modifications (RoPE, ALiBi) to scale context efficiently. Long-context performance varies significantly: a model with a 200K window may not perform equally well across that entire range.

Why Context Window Matters

Context window size has expanded dramatically: GPT-3.5 had 4K tokens, GPT-4 launched at 8K and now supports 128K, Claude 3.5 supports 200K, and Gemini 1.5 reaches 2M tokens. Larger windows enable new applications: full codebase analysis, long document summarization, multi-document RAG, and extended conversations. But longer is not always better; cost and latency scale with context length, and effective context use varies by model.

Practical Example

A legal tech company uses Claude's 200K context window to analyze entire merger agreements (typically 80K-150K tokens) in a single request. The system surfaces unusual clauses, compares against the firm's playbook, and flags negotiation points. Previously this required chunked retrieval; now the full document fits in one prompt.

Use Cases

  • Long document analysis
  • Codebase-aware coding
  • Multi-turn conversations
  • Document Q&A

Salary Impact

Understanding context window tradeoffs is core to AI engineering and product roles.

Where this skill pays off

This skill shows up most in software engineering roles. See live data on the AI premium, the tools, and what hiring managers screen for.

AI for Software Engineering →  ·  Skills page  ·  Salary breakdown

Related Terms

Concepts that pair with this one. Each links to a deep explainer.

Frequently Asked Questions

What does Context Window stand for?

Context Window stands for Context Window. The maximum number of tokens an LLM can process in a single request, including both the input prompt and the generated output. Context window size determines how much information the model can reason over at once.

What skills do I need to work with Context Window?

Key skills for Context Window include: LLM APIs, RAG, Prompt Engineering, Tokenization. Most roles also expect Python proficiency and experience with production systems.

How does Context Window affect salary?

Understanding context window tradeoffs is core to AI engineering and product roles.

Data Source: Analysis based on AI job postings collected and verified by AI Pulse. Data reflects active job listings as of May 2026. Salary figures represent posted compensation ranges and may not include equity, bonuses, or other benefits.

Track AI Skill Demand

See which skills are growing fastest in the AI job market.