Foundations Reviewed 24 Sep 2026 · 15 sources

context window

/ˈkɑn.tɛkst ˈwɪn.doʊ/ noun Plural context windows
Definition

The maximum number of tokens a language model can work with at once, counting its instructions, the conversation so far, attached material and its own reply.

Examples
  • GPT-3’s limit of 2,048 tokens in 2020
  • Claude’s 100,000 tokens in 2023, about 75,000 words
  • Gemini 1.5 Pro’s 1 million tokens, about an hour of video
  • A long chat whose first messages no longer fit
A long strip of chat messages passes behind a rectangular frame in front of a model. Lines inside the frame are solid. Earlier lines that have slid past it are dashed.
Inkling · The frame that sets how much the model can read at onceFig. C1
Current meaning
2020
Transformer models: the most tokens a model can read and use at once.
Also called
Context length
OpenAI’s wording for GPT-4’s 8,192-token limit in 2023.
§01

In plain words

In AI, a context window is the maximum amount of text, counted in tokens, that a model can read and use at once, including its own reply.

Every request to a large language model has to fit into one fixed space. The instructions, the conversation so far, any pasted documents and the reply being written all share it. None of it is part of what the model learned in training.1 The space is measured in tokens, the word pieces a model reads, rather than in words or pages. Anthropic put 100,000 tokens at about 75,000 words, more than five hours of reading for a person.2

Sizes have grown quickly. GPT-3 took 2,048 tokens in 2020. By 2026, Google said many of its Gemini models take 1 million tokens or more, which it likens to about eight average-length novels.3

The limit shows up in everyday use. A long contract or codebase may have to be split before a model can work through it. In a very long chat, the earliest messages can fall outside the window, and the model loses track of what they said. Some companies claim far larger windows: in 2024, Magic said it had reached 100 million tokens.4

A bigger window does not guarantee better reading. Models tend to use facts near the start or end of a long input more reliably than facts buried in the middle.5

The window is also different from long-term knowledge. What a model learned in training stops at its knowledge cutoff. Material in the window serves only the current request and has to be sent again to be used again.

§02

How it works

First, a tokenizer splits the input into tokens. The model turns each token into a list of numbers and processes the whole sequence together in transformer layers. In each layer, a step called attention compares every token with every other token. For n tokens that makes n² pairs, so doubling the input roughly quadruples that work.6 Each model is built and trained with a fixed maximum length. For GPT-3 it was 2,048 tokens.

The reply draws on the same budget. The model writes one token at a time, and each new token joins the sequence before the next is chosen. A long answer leaves less room for input.1

The model does not carry a conversation forward by itself. Each turn’s input includes all the earlier turns, so the total grows until it reaches the limit. At that point a product must drop older material or compress it. Anthropic calls one method compaction: summarizing the conversation and starting a new window from the summary.6 Choosing what to put in the window at all is the work of context engineering.

Fig. C2 · One request, one budgetIn tokens · Illustrative, not measured
  1. System prompt 3,000
  2. Tool descriptions 7,000
  3. Attached report 90,000
  4. Conversation so far 60,000
  5. New question 1,000
  6. Room left for the reply 39,000
An invented split of a single request in a 200,000-token window. Instructions, tools, documents, the chat so far and the reply the model has not yet written all draw on the same total.
§03

Origin and first known use

The idea is older than the phrase. In 1949 Warren Weaver proposed settling an ambiguous word’s meaning by also looking at the N words on either side of it. Language researchers later used context window for such a span: the few words around a target word, used to learn what words mean. By 2020, Google and OpenAI researchers used the phrase for the whole stretch of text a transformer model reads at once. Within three years its size had become a headline figure in model launches.

  1. 1949 Warren Weaver’s memo on machine translation proposes settling an ambiguous word’s meaning by also seeing “N words on either side” of it.
    Warren Weaver, “Translation”, memorandum, 15 July 1949 mt-archive.net →: source for 1949
  2. 2014 The GloVe paper uses context window in the older language-research sense: a set number of words to the left and right of a target word.
    Pennington, Socher and Manning, “GloVe: Global Vectors for Word Representation”, EMNLP 2014 stanford.edu →: source for 2014
  3. 2020 OpenAI’s GPT-3 paper says all its models use a context window of 2,048 tokens: a fixed limit on everything the model reads at once.
    Brown et al., “Language Models are Few-Shot Learners” arXiv 2005.14165 →: source for 2020
  4. 2023 OpenAI launches GPT-4 with a context length of 8,192 tokens, plus a 32,768-token version it describes as about 50 pages of text.
    OpenAI, “GPT-4”, research announcement, 14 March 2023 openai.com →: source for 2023
  5. 2023 Anthropic expands Claude’s context window from 9,000 to 100,000 tokens, which it equates with about 75,000 words.
    Anthropic, “Introducing 100K context windows”, 11 May 2023 anthropic.com →: source for 2023
  6. 2023 Liu et al. show that models use facts at the start or end of a long input better than facts in the middle.
    Liu et al., “Lost in the Middle: How Language Models Use Long Contexts” arXiv 2307.03172 →: source for 2023
  7. 2024 Google announces Gemini 1.5 Pro with a standard 128,000-token window and a 1 million token option: an hour of video or over 700,000 words. Tests reached 10 million.
    Sundar Pichai and Demis Hassabis, “Our next-generation model: Gemini 1.5”, 15 February 2024 blog.google →: source for 2024
  8. 2025 Chroma tests 18 models and finds performance grows less reliable as inputs lengthen, even on simple tasks. Its report calls the effect context rot.
    Hong, Troynikov and Huber, “Context Rot: How Increasing Input Tokens Impacts LLM Performance”, Chroma, 14 July 2025 trychroma.com →: source for 2025
§04

In the wild

9 sightings · 2020–2026 · oldest first
  1. Blog16 Jan 2020

    “…the context window (i.e., the span of data taken into consideration in the translation) covers from dozens to about a hundred words.”

  2. Paper28 May 2020

    “All models use a context window of … 2048 tokens.”

  3. Blog14 Mar 2023

    “gpt-4 has a context length of 8,192 tokens.”

  4. Blog11 May 2023

    “We’ve expanded Claude’s context window from 9K to 100K tokens, corresponding to around 75,000 words!”

  5. Blog15 Feb 2024

    “An AI model’s “context window” is made up of tokens, which are the building blocks used for processing information.”

  6. Blog1 Apr 2024

    “This context size limits how much text the transformer can incorporate to make its prediction of the next word…”

  7. Paper14 Jul 2025

    “Recent developments in LLMs show a trend toward longer context windows, with the input token count of the latest models reaching the millions.”

  8. Blog29 Sep 2025

    “…as the number of tokens in the context window increases, the model’s ability to accurately recall information from that context decreases.”

  9. Docs22 Jun 2026

    “An analogy for the context window is short term memory.”

§05

Not to be confused with

  • Maximum output length

    A separate cap on how many tokens a model may write in a single reply. The reply also counts toward the context window, so a long input leaves less room for output.

  • Training data

    The text a model learned from before release, fixed at its knowledge cutoff. The context window holds only what is sent with the current request, and nothing in it carries over once that request ends.

  • Memory across chats

    A product feature that saves notes from past conversations. The model sees those notes only when the product copies them into the context window of a new request.

§06

Questions

  • What is a context window in AI?

    It is the limit on how much a language model can work with in a single request, counted in tokens. The instructions, the conversation so far, any attached documents and the model’s reply all have to fit inside it. Anything outside the window is invisible to the model for that request, even if it appeared earlier in the same chat.

  • How many words fit in a context window?

    It depends on the model, because windows are counted in tokens rather than words. GPT-3’s window in 2020 held 2,048 tokens. In 2023 Anthropic equated 100,000 tokens with about 75,000 words. Google compares 1 million tokens, a size many of its Gemini models accept, to about eight average-length novels.

  • What happens when a chat gets longer than the context window?

    Something has to be left out. In some products the oldest messages fall outside the window, which is why a long chat can lose track of details from its start. Others compress the history. Anthropic describes compaction, in which a conversation near the limit is summarized and a new window starts from the summary.

  • Is a bigger context window always better?

    Not necessarily. A bigger window lets a model take in more at once, but the model may not use all of it well. Liu and colleagues found in 2023 that models used facts near the start or end of a long input better than those in the middle. In 2025, Chroma tested 18 models and found performance grew less reliable as inputs lengthened.

  • Is a context window the same as an AI model’s memory?

    Only in a narrow sense. Google’s documentation compares the window to short-term memory: it holds what is sent with the current request. What the model learned in training is separate and fixed at its knowledge cutoff. A chat product that seems to remember past conversations has to place the saved material back into the window before the model can use it.

§07

Watch

§09

Cite this entry

“Context window.” SUPERR_dictionary, Superrduperr, 24 Sept. 2026, superrduperr.com/dictionary/context-window.

First published 24 Sep 2026 · Last reviewed 24 Sep 2026 · Report an error →