Natural Language Processing
Context Window
The maximum number of tokens an AI model can process and reference in a single prompt or conversation.
Explanation
The context window defines the operational memory of a Large Language Model (LLM) during a specific session. It encompasses the total volume of input text (prompts) and output text (responses) that the model can 'see' at once. Measured in tokens—which can be words, characters, or sub-words—the size of the context window determines the model's ability to maintain coherence over long dialogues or analyze extensive documents. If the input exceeds this limit, the model typically discards the oldest information, leading to a loss of context. Advances in transformer architectures have significantly expanded context windows from a few thousand tokens to millions, enabling more complex reasoning and data retrieval tasks.