AI glossary
Context window
The context window is the most text, counted in tokens, that a model can take in one call: the prompt, the history and its own reply together.
Everything the model can use must fit in the window: the system prompt, earlier turns of the chat, retrieved documents and the answer it is writing. Anything outside it simply does not exist for that call.
A chatbot that runs for a long time has to decide what to drop. It can trim the oldest turns, summarise them, or keep only the parts that matter, and each choice loses something different.
A bigger window is not free. Long prompts cost more, reply more slowly, and a fact buried in the middle of a very long prompt is easier for the model to miss than one near the start or the end.
Learn it hands-on
These free lessons teach it with commands to run in a lab and checked tasks. Read them whole with no account.