The context window is the maximum amount of text — measured in tokens — that a language model can process at once in a single operation. It covers both the input (prompt, instructions and any retrieved documents) and the generated output. Everything the model is meant to "take into account" must fit within this window.
Depending on the model, the size ranges from a few thousand to millions of tokens. A larger context window allows longer documents, entire codebases or extensive conversation histories to be processed in one piece. When the limit is exceeded, content must be truncated or summarized; information outside the window is invisible to the model.
The context window is therefore a hard technical limit that shapes application architecture — for example in RAG, where only the most relevant passages are selected to use the window efficiently. Very long contexts also increase compute cost and latency.