Macha
AI Support & Agents

Context Window

Definition

The context window is the maximum amount of text — measured in tokens — that a language model can consider at once, including both the input you give it and the output it generates.

Also known as: context lengthcontext sizetoken limit

How it works

Everything the model "sees" for a request — the system prompt, the conversation history, any retrieved documents, and the reply being written — has to fit inside the context window, counted in tokens. Exceed it and older content is truncated or dropped, so the model effectively forgets the earliest parts.

Window sizes vary by model, ranging from a few thousand tokens to well over a million. A larger window lets the model reason over more history or documents at once, but processing more tokens also costs more and can slow responses.

Why it matters for support

The context window sets the practical limit on how much of a long ticket thread, knowledge base, or customer history an agent can hold in mind at once. This is a core reason RAG exists: rather than stuffing an entire knowledge base into the window, you retrieve just the relevant passages and fit them in — keeping answers grounded and costs controlled.

Frequently asked

What happens when the context window is exceeded?

Content beyond the limit is truncated or dropped, so the model may lose earlier parts of the conversation or documents. Techniques like retrieval and summarization keep only the most relevant text within the window.

Is a bigger context window always better?

Not always. A larger window handles more history at once, but processing more tokens increases cost and latency, and models can still overlook details buried in a very long context. Good retrieval often beats simply cramming in more text.

Put these ideas to work

Macha is an AI agent layer that sits on top of the help desk you already run — Zendesk, Freshdesk, Front, Intercom, or Gorgias.

Start Trial