AI Glossary · Definition
What is Context window?
Context window: The context window is the maximum amount of text, measured in tokens, that an AI model can consider at one time, including your prompt, documents and its reply.
By DAIDU EditorialUpdated
Context window, explained
Anything outside the context window is invisible to the model. Larger context windows let you include long documents or long conversations, but filling them with irrelevant text can still reduce quality and increases cost. For large knowledge bases, RAG is usually better than pasting everything in: it retrieves only the relevant passages. In long chats, assistants may lose track of early details as the conversation grows, so restating key facts helps.
Example
A lawyer pastes a full 60-page contract into an assistant with a large context window and asks for a list of termination clauses.
