Skip to main content
Mobius
Intermediate

What is a context window

Also known as: context length, context limit

Definition

A context window is how much text, in tokens, a model can see at once: instructions, files, the chat so far and its reply. What falls outside, it cannot use.

Why it matters

The window explains why a long chat seems to forget its beginning: the model was not shown the old messages again.

Common mistakes

Expecting a model to remember the start of a very long chat that the app has already cut or summarised.

Related terms

Worked exampleIllustration

A long WhatsApp chat at a fictional pilates studio

A fictional neighbourhood pilates studio answers members on WhatsApp with an AI assistant. The chat is invented for this example.

  1. Message 1

    A member writes that she has a 10 class card and can only come in the mornings.

  2. Forty messages later

    After class swaps and a question about a friend who wants to join, the chat no longer fits in the window.

  3. What the app does

    The app drops the oldest messages. The assistant offers an evening class and asks which card she has.

  4. The fix

    The app sends a short pinned note, "10 class card, mornings only", at the top of every call.

  5. The result

    The same forty message chat now keeps both facts in every answer.

The model did not forget. It was never shown the old messages again.

Illustration

Keep chatting, watch the window

The chat no longer fits, so the app stops sending the oldest messages, 11 so far. Message 1 is no longer sent, so the assistant does not see the 10 class card or the mornings.⁨Message 1: 10 class card,⁩⁨mornings only⁩⁨Sent with every question⁩⁨The 11 oldest messages no longer sent⁩⁨Oldest to newest⁩

The chat no longer fits, so the app stops sending the oldest messages, 11 so far. Message 1 is no longer sent, so the assistant does not see the 10 class card or the mornings.

A fixed window holds only so much of a chat. The app decides what goes in, and what falls outside is no longer sent to the model. Nothing is forgotten, it is simply not shown again.

What fills the window

  1. The assistant’s instructions
  2. The policy sheet
  3. The pinned note
  4. The chat so far
  5. Room for the answer

The sizes are a drawing, not a measurement.

Everything sent with one question shares the same window: the instructions, the policy sheet, any pinned note, the chat so far and room for the answer. A longer sheet leaves less room for the chat.

Definition

A context window is the limit on how much text a language model can take into account in one call, measured in tokens. Everything counts toward it: the tool's hidden instructions, your prompt, attached files, the conversation so far and the answer being written. The model keeps no memory between calls, so the app sends the conversation again with every message. When a chat grows beyond the window, the app decides what to leave out: some apps drop the oldest messages, some summarise them, and some refuse. What is not sent, the model does not see.

Why it matters

It also explains why more is not always better. A 2024 study found that models use information in the middle of a long input less reliably than at its start or end, so a focused input often beats a full one.

Directly related: Token, LLM, Prompt.

Improvement tips

  • Pin the facts that must survive a long chat, such as the customer's plan and limits, in a short note sent with every message.
  • When your documents do not fit, send only the passages the question needs, which is what RAG does, instead of whole files.
  • Put the question and the most important instruction at the start or the end of a long input, not in the middle.
  • Start a new chat for a new topic, opening with a short summary of what still matters.

Common mistakes

  • Filling the window with whole files when the question needs one passage, which makes the answer slower and less accurate.
  • Believing a bigger window means better answers, while the middle of a long input is still used less reliably.
  • Pasting whole contracts or customer histories with personal details into a public tool just because they fit.

Related terms

Quick check

A chat has grown longer than the model's context window. What happens to the oldest messages?

Choose an answer

Frequently asked questions

What is a context window in simple words?
It is the size of the desk the model works on. Everything it needs for one answer has to fit on the desk at once: the instructions, your files, the chat so far and the answer it is writing. What is not on the desk, it cannot use.
What counts toward the context window?
Everything in the call: the tool's hidden instructions, your prompt, every attached file, the conversation history and the answer being written. Anthropic's documentation states that the output counts too. All of it is measured in tokens.
Why does a long chat seem to forget its beginning?
Because the model keeps no memory between messages. The app sends the conversation again each time, and when it no longer fits, the app leaves part of it out. The model did not forget, it was simply not shown the old messages again.
What happens when the window is full?
It depends on the app. Some drop the oldest messages, some replace them with a summary, and some refuse and ask you to start a new chat. Anthropic's documentation says its API returns an error when the input alone is longer than the window. None of this deletes your files.
Is a bigger context window always better?
No. A 2024 study, "Lost in the Middle", found that models use information in the middle of a long input less reliably than information at its start or end. A focused input with the right passages often gets a better answer than a whole folder.
My documents do not fit. What can I do?
Send only the passages that answer the question instead of the whole file. That is what RAG does: it searches your documents first and sends the model only the relevant parts.
How do I keep important facts in a long chat?
Pin them. Write a short note with the facts that must not be lost, such as the customer's plan and limits, and have it sent at the top of every call. In a chat tool, paste the same note when you open a new chat.
Does a longer input use more?
Yes. Usage grows with the tokens you send and receive, not with the size of the window. A long history or an attached file is read again with every message, so it adds up. Check your tool's own pricing page for how it charges.
Why do long tasks get slower?
The model reads everything in the window before it answers, and a long input takes longer to read. Keeping only what the task needs usually makes answers faster as well as more accurate.
Can I change the size of the context window?
Not for a given model: the size is part of the model. You can pick another model with a larger window, and you decide what goes into the window, which usually matters more.
Is it fine to paste long documents because they fit?
Fitting is not the question. Contracts, customer histories and staff files often contain personal details. Israel's Privacy Protection Law, 1981, as amended by Amendment 13, in force since 14 August 2025, governs collecting, keeping and using personal details, including details you paste into or upload to an AI tool. Educational material, not legal or tax advice. Check your own case with a lawyer or an accountant.
Is the context window the same as a chat app's memory feature?
No. Some chat apps have a separate memory feature that saves chosen facts between conversations and adds them to later calls. The context window is only what the model sees in the current call, and a saved fact helps only once the app puts it back in.

Sources: Anthropic, "Context windows", Claude documentation (platform.claude.com/docs/en/build-with-claude/context-windows), read 2026-09-25, Liu, Lin, Hewitt, Paranjape, Bevilacqua, Petroni and Liang, "Lost in the Middle: How Language Models Use Long Contexts", Transactions of the Association for Computational Linguistics, volume 12, 2024 (aclanthology.org/2024.tacl-1.9), Privacy Protection Authority, Amendment 13 questions and answers (gov.il/he/pages/tikun13_qa), read 2026-08-31

Last reviewed: 2026-09-25

I have worked with

What Clients Say

From different fields, at different stages of business

Dan Manto

Eclipse Capital

Real Estate Investment and Finance, USA

Arty McLabin

GameReady

Game Development Education and Outsourcing, International

Anna, Beautician

Anna

Beautician

After I finished a cosmetology course at a leading company, I was confused. I didn't know how to open a business, what to sell from home, or how to bring in clients. Since I reached out to Mobius, everything has changed. We built an organized plan with clear steps and no unnecessary risks. Today I see results, and I'm growing and developing every month.

Mark, Massage therapist, Gan Yavne

Mark

Massage therapist, Gan Yavne

When I finished a massage course, I imagined a different world. I found out it's a hard field, and financial stability isn't easy to find. When I came to Mobius, something changed. We started an organized process and built a business plan. Without Mobius? I probably would have given up. Today I believe in myself and in my own path.

Wondering where AI actually fits your business?

Alex helps Israeli businesses use AI and data where it pays off, and skip it where it does not. The first call is free.

+972 055-248-6151. Better on WhatsApp: I am in meetings most of the day and answer as soon as I am free.