# What Is a Context Window in AI? Explained Simply | Gr8r

> A context window is how much text a language model can work with in one request, its own reply included. Why it matters, what happens when it fills, and RAG.

Source: https://gr8rstudio.com/glossary/context-window

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.

[Build an AI feature that scales](https://gr8rstudio.com/services/product-engineering)[All terms](https://gr8rstudio.com/glossary)

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.

Related

- [RAG](https://gr8rstudio.com/glossary/retrieval-augmented-generation)
- [LLM](https://gr8rstudio.com/glossary/large-language-model)
- [Prompt engineering](https://gr8rstudio.com/glossary/prompt-engineering)

- $115M+ Client Funding
- [ 1.8K+ GitHub Stars ](https://github.com/gr8rstudio/gr8r-studio)
- 50+ Projects Shipped

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

- hyperAI

On this page

1. [How a context window works](#s-0)
2. [How big are context windows today?](#s-1)
3. [What takes up space in a context window](#s-2)
4. [Why a bigger context window isn't automatically better](#s-3)
5. [Context window vs RAG vs memory](#s-4)
6. [How to tell whether your content will fit](#s-5)
7. [What happens when the context window fills up](#s-6)
8. [How Gr8r manages the context window in AI products](#s-7)

## 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](https://gr8rstudio.com/glossary/large-language-model). What you put into the window, and how you word it, is the subject of [prompt engineering](https://gr8rstudio.com/glossary/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.

| Provider  | Models                                                                       | Context window | Maximum output         |
| --------- | ---------------------------------------------------------------------------- | -------------- | ---------------------- |
| Anthropic | Current Claude models (Fable 5.2, Opus 5.5, Sonnet 5.5, Haiku 5.5)           | 1M tokens      | 128K tokens            |
| OpenAI    | Flagship models listed (GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna) | 1.05M tokens   | 128K tokens            |
| Google    | Gemini 4 Carbon and Gemini 4 Argon                                           | 1M tokens      | 65K tokens as standard |

Sources: [Anthropic models overview](https://platform.claude.com/docs/en/about-claude/models/overview), [OpenAI models](https://developers.openai.com/api/docs/models) and [Google Gemini models](https://aistudio.google.com/docs/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](https://gr8rstudio.com/glossary/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](https://gr8rstudio.com/services/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](https://gr8rstudio.com/blog/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.

## Go deeper on Context window

- [ What Drives the Cost to Build an AI App AI app development cost explained: the five drivers behind any quote, build versus running cost with a worked token example, and how to scope v1. ](https://gr8rstudio.com/blog/cost-to-build-an-ai-app)
- [ How to Build AI Agents for Business Workflows How to build AI agents for business: pick one task, write a one page spec, limit the tools, build a test set, design the screens and run it with a plan. ](https://gr8rstudio.com/blog/build-ai-agents-for-business)

Reviewed by [Tanjim Islam](https://gr8rstudio.com/about/tanjim-islam), Founder & CEO · Updated 12 November 2026

Sources

- [Claude Platform Docs: Context windows](https://platform.claude.com/docs/en/build-with-claude/context-windows)
- [Anthropic: Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)
- [Gemini API docs: Long context](https://aistudio.google.com/docs/long-context)
- [Claude Platform Docs: Models overview](https://platform.claude.com/docs/en/about-claude/models/overview)
- [OpenAI API docs: Models](https://developers.openai.com/api/docs/models)
- [Google AI Studio docs: Models](https://aistudio.google.com/docs/models)

FAQ

## Context window questions answered

Ask anything else

- 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.

## Terms related to Context window

- [ 01 RAGRetrieval-augmented generation (RAG) is a technique where an AI system first searches your own documents or data for relevant passages, then gives those passages to a language model so its answer is grounded in your information. Explore ](https://gr8rstudio.com/glossary/retrieval-augmented-generation)
- [ 02 LLMA large language model (LLM) is an AI model trained on very large amounts of text to predict and generate language. It can draft, summarise, classify, extract and reason over text, but it can also produce confident errors. Explore ](https://gr8rstudio.com/glossary/large-language-model)
- [ 03 Prompt engineeringPrompt engineering is the practice of writing, structuring and testing the instructions, context and examples given to a language model so it produces useful, consistent output for a specific task. Explore ](https://gr8rstudio.com/glossary/prompt-engineering)

## 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.

5.0

[11 verified reviews Read them on Contra ](https://contra.com/tanjimislam/reviews)

- Tanjim is a great designer without any doubt. I love the way he heard my project details and created the better design I was looking for. I highly recommend Tanjim to other Business owners. Thanks Tanjim 🫶
Muhammad Talha · Founder, SetFrame
- Amazing work as always!
Md Nomail Hossain Samir · Co-founder, Remarked Design
- It was really amazing to work with Tanjim, superfast delivery and amazing work
Dhruval Golakiya · Founder, Ryplix
- It was really amazing to work with Tanjim, Superfast delivery and amazing work, highly recommended for any website design and development
Dhruval Golakiya · Founder, Ryplix
- Tanjim and his team did a great job on the hero section I needed in Framer. Super easy to work with and delivered exactly what I had in mind. Highly recommeded!
Muhammad Talha · Founder, SetFrame
- Tanjim is very good at what he does & super easy to work with. He is a genuinely good guy. I highly recommend him!
Md Nomail Hossain Samir · Co-founder, Remarked Design
- Tanjim is a very talented designer who delivers high-quality work with precision. I hired him to handle client projects for my agency & he exceeded expectations every time. If you need an efficient designer, he is the one to go for!
Md Nomail Hossain Samir · Co-founder, Remarked Design
- Every project I’ve entrusted to Tanjim has exceeded expectations. If you're looking for a top-tier designer who consistently delivers exceptional work, Tanjim is the one. Looking forward to working together on more projects 🤝
Md Nomail Hossain Samir · Co-founder, Remarked Design
- Tanjim is an excellent guy. He is super professional in his work and always goes the extra mile. If you're looking for any UI or Framer work, I highly recommend him!
Md Nomail Hossain Samir · Co-founder, Remarked Design
- Tanjim is the founder of Gr8r studio and his Framer expertise is exactly what you need if you are looking for design and development work. Tanjim goes the extra mile on his projects and his attention to detail makes every website stand out I collaborated with Tanjim on a project and he is my main choice for a design partnership.
Miguel Queirós · Collaborator

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

Calendar not loading? [Open the booking page](https://cal.com/tanjim-38/30min)

Ask Ali
