Context window

The context window is a parameter of a language model that determines the maximum amount of information, typically measured in tokens, that the model can process at once. This window covers all the input text supplied by the user together with the response generated so far within a single conversation. Anything lying outside the bounds of this window is invisible to the model at that moment and cannot influence its further output. The size of the context window is thus a crucial factor limiting the model’s ability to work with very long documents or maintain coherence across extensive dialogues.


Think of the context window as the artificial intelligence’s working memory. Just as a person can hold only a limited number of thoughts in mind while solving a task, a model can work with only a certain amount of text at any one moment. Both your query and the whole preceding conversation have to fit into this “memory”. If the conversation is too long and its beginning no longer fits in the window, the model simply “forgets” it and cannot draw on it when generating the next reply.

Is this article useful to you and are you citing it? Copy the citation