Glossary

Context window

The amount of text an AI model can consider at once, including your prompt, any documents, the conversation so far and its reply. It is measured in tokens.

Also known as: context length, context limit

A context window is the amount of text an AI model can consider at once, including your prompt, any documents you attach, the conversation so far and the reply it is writing. It is measured in tokens. Anything outside the window is not part of what the model is working with.

Anthropic’s documentation on context windows describes it as all the text a language model can reference when generating a response, including the response itself, and calls it the model’s “working memory”, separate from the large body of data it was trained on. Google’s Machine Learning Glossary defines it as the number of tokens a model can process in a given prompt.

Why it matters for an Indian business

The context window explains several things owners notice when they start using AI tools:

  • Long chats hit the limit. Anthropic’s page notes that as conversations grow, they eventually approach the context window limit. Tools handle this differently, for example by condensing earlier parts of the chat, so early instructions may not carry through.
  • Big documents may not fit. A year of WhatsApp exports, a full product catalogue or a set of tender documents can exceed what a model can take in one go.
  • More is not always better. Anthropic’s page says that as token count grows, accuracy and recall degrade, and calls this “context rot”. It advises curating what goes into context, not only checking how much fits.
  • Cost follows size. On API-based tools, everything in the window is usually billed as input tokens on every request.

An example

Say a manufacturing firm in Ludhiana wants an assistant that answers staff questions from its 400-page set of machine manuals. Pasting every manual into each question would be slow and costly, and may not fit. A better design is to search the manuals first and pass only the few relevant pages into the context window with the question. That approach is called retrieval-augmented generation, and it keeps each request small and focused.

What to watch for

Context window sizes differ between models and change over time, so check the provider’s current documentation. A large window does not mean the model has read and understood everything in it equally well. For important answers, ask the model to quote the section it relied on.

Context windows are counted in tokens. Your prompt and any attached files all share the same window. Retrieval-augmented generation (RAG) is a common way to work within the limit, and every large language model has one. For help designing a knowledge-search or drafting tool around these limits, see implementation.

Sources

  1. Anthropic: Context windows (Claude Platform Docs)
  2. Google for Developers: Machine Learning Glossary