Technology
Context Window
The short answer
The context window is the maximum amount of text (measured in tokens) that a language model can process at once in a single request — instructions, documents, conversation history and response combined. Current models handle context windows of hundreds of thousands of tokens, allowing them to work through entire folders of documents in a single pass.
The Model's Working Memory
Think of the context window as working memory: only what fits inside it is "visible" to the model during the current request. Anything that falls outside — such as the beginning of a very long conversation — ceases to exist for the model unless you explicitly include it again.
Large context windows have made many applications practical for the first time: reviewing complete contracts, summarizing long email threads, comparing multiple documents simultaneously. That said, feeding in relevant excerpts strategically (RAG) is usually more precise and cost-effective than dumping everything in.
Practical Implications
For persistent AI agents, you need additional long-term memory outside the context window: a database or knowledge base from which the agent retrieves relevant information for each task. This keeps company knowledge permanently available without having to send it along with every request.
Development and Limits of Large Context Windows
Context windows have grown dramatically in just a few years — from a few thousand tokens to hundreds of thousands, even over a million in current models. This has opened up new application classes: reviewing entire contract sets in a single pass, analysing large codebases, evaluating extensive project histories.
There's also a known practical limit: with very long contexts, the model's attention to detail drops in the middle of the text — information at the beginning and end gets processed more reliably. Professional systems therefore structure long inputs deliberately, place critical information at the edges, or break the task into steps rather than relying on sheer window size.
Economics also favour discipline: every token in the context window is charged for with each request. If you routinely send hundreds of thousands of tokens when three relevant passages would suffice, you're multiplying ongoing costs with no quality gain. Techniques like prompt caching (recurring instructions are cached and charged at a lower rate) help, but they don't replace the discipline of selecting relevant content carefully.
Long Dialogues: Compress, Don't Cram
In extended conversations — like a support chat spanning many messages or an agent handling a complex task across multiple steps — the history grows and risks filling the context window. Naively sending the complete history with every request is expensive and eventually dilutes precision because what actually matters gets lost among the noise.
Professional systems solve this through compression: older parts of the conversation are condensed by the model into a compact summary, while recent messages remain in full text. This preserves the thread without overflowing the window. Additionally, facts that matter permanently — customer ID, decisions made, open items — are stored in external memory and retrieved only when needed.
For clients, this is a quality marker worth asking about: how does the system handle long-running processes? An assistant that 'forgets' the beginning during extended conversations or suddenly becomes slow and expensive has exactly this gap. Clean context management is invisible when it works — and painfully obvious when it doesn't.
Practical example
A rental agreement review tool doesn't load all 200 contracts into the model when answering a question. Instead, it first retrieves the three relevant passages and feeds only those into the context window. Result: more precise answers, lower costs, no space problems.
Frequently asked questions about Context Window
Is a larger context window always better?
Not automatically. Very long contexts cost more and can dilute accuracy because the model must distinguish important from unimportant information. Targeted selection of relevant content beats raw size.
Does the AI forget our conversation?
Not within a single session, as long as the history fits in the context window. Across sessions, you need external memory — that's standard for enterprise agents.
Can all our company knowledge fit in one context window?
Usually not — and that's not the goal. Company knowledge belongs in a searchable knowledge base from which only what's relevant gets loaded per request.
What happens to the context window with very long conversations?
Without countermeasures, the growing history would eventually fill the window. Good systems compress older conversation parts into a summary, keep recent messages in full text, and store permanently important facts in external memory.
Related terms
How relevant is this for your business?
In the free intro call we look at your specific process.