What is the context window?

Published - January 12, 2026 06:00 am IST

AI models don’t read words; instead they read chunks of characters called tokens.

AI models don’t read words; instead they read chunks of characters called tokens. | Photo Credit: Solen Feyissa/Unsplash

A: In the context of artificial intelligence (AI), specifically large language models (LLMs) like GPT-5 and Claude, the context window is the maximum amount of text the model can consider at any one time while generating a response.

AI models don’t read words; instead they read chunks of characters called tokens. Typically 1 token is roughly equivalent to 0.75 words (in English), so 1,000 tokens will represent around 750 words. So when a model has a context window of 8,000 tokens, for example, it means it can handle roughly 6,000 words of data at once.

Each context window needs to hold three things simultaneously: the rules telling the AI how to behave; the history of the current chat; and the space required for the AI to generate its next answer.

If the limit is 8,000 tokens and your conversation history is 7,900 tokens long, the AI only has 100 tokens left. If a conversation exceeds the context window, the model might start deleting the oldest parts of the conversation.

The context window is linked to the computational resources available to the model. If you increase the context window length by 2x, the power required increases by roughly 4x. So models with larger windows are much more expensive to run.

Sometimes even if a model can accept a lakh tokens, it may struggle to find a piece of information buried in the middle. This is called the ‘lost in the middle’ phenomenon.

0 / 0
Sign in to unlock member-only benefits!
  • Access 10 free stories every month
  • Save stories to read later
  • Access to comment on every story
  • Sign-up/manage your newsletter subscriptions with a single click
  • Get notified by email for early access to discounts & offers on our products
Sign in

Comments

Comments have to be in English, and in full sentences. They cannot be abusive or personal. Please abide by our community guidelines for posting your comments.

We have migrated to a new commenting platform. If you are already a registered user of The Hindu and logged in, you may continue to engage with our articles. If you do not have an account please register and login to post comments. Users can access their older comments by logging into their accounts on Vuukle.