Context Window
The maximum amount of text (in tokens) an LLM can consider in a single call.
/ quick answer
The Context Window is the hard limit on how much input + output a model can hold at once, measured in tokens. Larger windows allow longer documents and richer agent state, but cost more and can dilute attention — making retrieval and summarization still essential.
What is Context Window?
The Context Window is the hard limit on how much input + output a model can hold at once, measured in tokens. Larger windows allow longer documents and richer agent state, but cost more and can dilute attention — making retrieval and summarization still essential.
What is an example of Context Window?
A 1M-token model could read an entire codebase at once, but a focused 8K-token RAG pipeline answering one question is often cheaper, faster and more accurate.
Why does Context Window matter for AI and automation?
The maximum amount of text (in tokens) an LLM can consider in a single call. It connects to the workflows, prompts and tool stacks linked on this page, so you can move from definition to execution without leaving Onexial.
/ continue exploring
Related concepts
The vocabulary this page depends on.
- →Contextual Compression
Contextual compression is a technique used to reduce the size of the input context for a Large Language Model (LLM) while retaining its most relevant information, typically by summarizing or filtering.
- →Token Budgeting
Token budgeting is the strategic allocation and management of token usage within large language model (LLM) operations to control costs and optimize performance.
- →Token Budget
A token budget is a predefined limit on the number of tokens an AI application or specific request can consume within a given period or for a single interaction. It is a critical mechanism for controlling costs and managing resource allocation for Large Language Model (LLM) usage.
- →Context Engineering
Context engineering is the discipline of deciding exactly what information enters a model's context window, in what order and at what cost.
Related workflows
Turn this into a repeatable process.
- →RAG Content Ingestion Pipeline
Convert messy docs into searchable, cited knowledge chunks for AI systems.
- →Context Window Optimization Workflow
This workflow outlines steps to optimize the information fed into an LLM's finite context window, ensuring maximal relevance and efficiency while managing token limits.
- →Multi-Turn Context Management Workflow
This workflow manages conversation history and other dynamic context in multi-turn interactions with LLMs, ensuring coherence and relevance over extended dialogues.
- →Reduce Agent Context Window Costs
This workflow details methods to minimize the token count within an AI agent's context window, directly reducing LLM API costs.
Related tool stacks
The tools that run it in production.
- →RAG Starter Stack
Minimum viable stack to ship a production RAG chatbot.
- →AI Research & Knowledge Stack
Default toolset for analysts, founders and creators doing deep research with AI.
Comparisons & alternatives
Pick between the options.
- →OpenAI API vs Anthropic API
Choosing between the two leading LLM API providers for production apps.
- →OpenAI vs Gemini for Agent Building
Both ship strong models and SDKs — differences are in tool calling, context and pricing.
- →Claude vs GPT vs Gemini
The three frontier model families, side by side.
- →Claude Sonnet vs Opus
When to spend up within the Claude family.