What is a context window?
The context window is everything a language model can refer to while it writes a response (opens in a new tab), including the response itself. Think of it as the model's working memory.
What counts?
Everything in the conversation: the instructions up front, all messages, documents and images you add, and also the answer the model writes. Its size is measured in tokens, small pieces of text.
What if it is full?
Then nothing else fits. A chat app may then drop the oldest messages, so the model forgets the start of a long conversation.
Is bigger always better?
No. More context isn't automatically better: as more text goes in, the model's accuracy and recall get worse. That is called context rot. So give a model what it needs, not everything you have.