insomnia.club back to site
[ ai glossary · models and how they work ]

Context window

What is a context window?

A context window is the maximum amount of text, measured in tokens, that a language model can take into account in a single request, including your instructions, any documents or conversation history, and the answer it writes. Anything outside the window is invisible to the model for that request, as if it never existed.

01why it matters for a business

Context windows have grown large enough that many models can take in hundreds of pages at once, which tempts teams to paste everything in and let the model sort it out. That works for some tasks but has three costs. Every token in the window is billed on every request. Long inputs slow responses. And models do not use all of a long input equally well; research has shown that details buried in the middle of a long prompt can be missed more often than details near the start or end.

So the window is a budget, not a storage system. Models do not remember past conversations unless your software feeds the history back in, and for large knowledge bases the efficient pattern is to retrieve the few relevant passages for each question rather than sending the whole library every time.

02what it looks like in practice

A legal operations team wants answers from a library of several thousand contracts. No context window holds all of them, and sending even a fraction per question would be slow and expensive. Instead the system indexes the library, retrieves the handful of clauses relevant to each question, and sends only those, with citations, to the model. For a single long agreement under negotiation, the team does the opposite: the whole document fits in the window, so the model reads it end to end.

03common mistakes

04related terms

05where insomnia club fits

Insomnia Club designs how context is assembled for each request, deciding what to retrieve, what to summarize, and what to leave out, so systems stay accurate and affordable as your data grows.

see custom AI development →
← Computer visionall 60 termsConversions API →

tell us what keeps you up at night.

Scoped by the people who ship it. Priced before we start.

book a call drop your number

info@insomnia.club