What is a context window?

A context window is the amount of text an AI tool considers at one time.

A context window refers to the specific portion of text that an AI model uses to understand and generate responses. This window helps the model keep track of relevant information while processing input.

For example, when you ask a question, the AI looks at a limited number of words or sentences before and after your question to provide a relevant answer. The size of this window can affect the quality of the response, as a larger window can include more context.

In practical terms, if an AI has a context window of 100 tokens, it will only consider the last 100 tokens of text when generating a reply. This limitation is crucial for understanding how AI models operate and what they can remember during a conversation.

Example

AI can only remember the last 100 words of our chat.

Related terms

Want to use Context window in real work?

WeCode workshops are built around AI coding tools. Pick a tier, or browse more glossary entries to get the lay of the land.