Skip to content
5 free audits openClaim a spot

Glossary · AI

Context window

A context window is the total amount of text, measured in tokens, that a language model can work with in a single request. It covers the instructions, the conversation so far, any documents or tool results, and the model's own reply. Anything outside it does not exist for the model.

In one line

A context window is the maximum amount of text, counted in tokens, that a model can read and write in one request.

  • Claude
  • Codex
  • Cursor

AI helps us move faster.Our team makes the decisions and stands behind the work.

  • Savari
  • hyperAI
  • ImmoAdmin
  • Spring
  • OrthoTropic
  • Clover
  • uptk

How a context window works

Models read and write in tokens, which are chunks of words. Everything in a request takes up room, from the system prompt and earlier messages to pasted documents and tool results. Anthropic's documentation notes that the reply the model writes counts too.

The model keeps nothing between requests beyond what you send. A chat app that seems to remember is resending the history each turn, or a summary of it.

For the model itself, see large language model. What you put into the window, and how you word it, is the subject of prompt engineering.

How big are context windows today?

These are the sizes each provider published for its current models when we checked on 12 November 2026. They change often, and each provider also offers other models with different limits, so check the linked page before you plan around a number.

ProviderModelsContext windowMaximum output
AnthropicCurrent Claude models (Fable 5.2, Opus 5.5, Sonnet 5.5, Haiku 5.5)1M tokens128K tokens
OpenAIFlagship models listed (GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna)1.05M tokens128K tokens
GoogleGemini 4 Carbon and Gemini 4 Argon1M tokens65K tokens as standard

Sources: Anthropic models overview, OpenAI models and Google Gemini models. Anthropic's page also lists earlier Claude models with 200K-token windows, which is a reminder that the limit belongs to a model, not to a company.

A token is not a word. Anthropic's page puts 1M tokens at roughly 555,000 words on its current tokenizer, so the same document can take a different number of tokens on a different model.

What takes up space in a context window

It helps to think of the window as a set of slots that all draw on the same limit:

  • Instructions. The system prompt that tells the model its role, rules and format. It is sent with every request.
  • Tool definitions. If the model can call tools, the description of each one is part of the request too.
  • The conversation. Every earlier message, the model's own earlier replies included, unless the app trims or summarises them.
  • Documents and tool results. Files you pass in, search results, database rows. This is usually the largest and most variable part.
  • The reply. Room has to be left for the answer. A request that fills the window leaves the model nowhere to write.

Before you design a feature, add up the parts you control. Most providers offer a way to count tokens for a request before you send it, which turns the estimate into a number.

Why a bigger context window isn't automatically better

Larger windows let you pass long contracts or whole codebases in one go. But Anthropic's docs warn that accuracy and recall degrade as the token count grows, a problem they call context rot.

Every token also costs money and time. Stuffing a request with every document just in case makes answers slower and pricier. They're often worse, too, than if you'd passed the few pages that matter.

Context window vs RAG vs memory

The context window is the model's working space for one request. Retrieval-augmented generation (RAG) is a way to choose what goes into that space, by searching your documents and passing in only the relevant parts.

Memory is a product feature built on top. The app stores facts or summaries somewhere else and adds the useful ones back into later requests. All three meet in the same place: whatever you send is all the model sees.

Long windows haven't made RAG obsolete. Google's Gemini docs encourage passing all relevant information upfront, while saying techniques like RAG remain valuable in specific scenarios. With cost and context rot in the picture, most products still select.

For how retrieval chooses what goes in, see retrieval-augmented generation.

How to tell whether your content will fit

Start with the largest realistic input, not the average one: the longest contract, the busiest customer account, the conversation that has been running for a month. Count its tokens with the provider's own tool, add your instructions and the space the reply needs, and compare the total with the model's limit.

If it fits with room to spare, you may not need retrieval at all for a first version. If it fits only just, plan for growth, because customer data rarely gets smaller. If it does not fit, you need to select: retrieve the relevant parts, summarise the older ones, or split the job into steps.

Then test quality, not only size. Ask the same questions with a small context and a large one. If answers get worse as you add material, the limit that matters for your feature is lower than the one on the model card.

What happens when the context window fills up

Depending on the API, the request fails or the output gets cut short. Chat apps usually drop or summarise old turns, which is why a long conversation can forget early details.

For long-running agents, Anthropic describes compaction. The system summarises a conversation near the limit and starts a fresh window with that summary. It works, but anything the summary leaves out is gone.

How Gr8r manages the context window in AI products

We treat context as a budget. For each feature we decide what the model must always see, what it can look up when needed, and what it never needs.

We measure token use and test answer quality as the context grows. That way a feature doesn't quietly get worse as customers add more data.

We do this as part of product engineering. Tokens are also the unit you are billed in, so the same budget decides the monthly bill. Our post on what drives the cost to build an AI app shows how to estimate it from published prices.

How we budget context

For each AI feature we sort the information into three piles. What the model must see on every request, such as the instructions and the record on screen. What it can look up when it needs to, through search or a tool. And what it never needs. Then we test the same questions as the context grows, and watch token use and answer quality together, so a feature does not quietly get worse as a customer adds more data.

FAQ

Context window questions answered

  • What is a token in a context window?

    A token is a chunk of text, often part of a word. Context windows, prices and rate limits are all measured in tokens, and different models split text into tokens differently.

  • Does the output count toward the context window?

    Yes. Anthropic's documentation says the output the model generates counts, along with the system prompt, messages, tool definitions and tool results. Leave room for the reply when you plan a request.

  • What happens if I exceed the context window?

    Depending on the provider, the API rejects the request or limits the output. Chat products usually trim or summarise older messages so the conversation can carry on, which can lose early details.

  • Is a bigger context window always better?

    No. It helps with long documents, but accuracy can drop as context grows, and every token adds cost and delay. Passing fewer, more relevant tokens often gives better answers.

  • Does a large context window replace RAG?

    Not for most products. It reduces the need for retrieval on small sets of documents. With large or changing data, retrieval is still the practical way to pick what goes into each request.

  • Does the model remember earlier conversations?

    Not by itself. Each request stands alone, and the model only sees what's sent with it. Memory features store information outside the model and add it back into later requests.

Book a call with our CEO.

Pick a time that suits you. A product idea or a workflow that slows your team down: a clear problem is enough, no full specification needed.

Your call is with Tanjim Islam, our CEOA free 30-minute conversation about your problem, not a sales pitch.

Calendar not loading? Open the booking page