Context Windows

Last updated

What is Context Windows?

A context window is the chunk of text a large language model can read at one time. It is measured in tokens, which are pieces of words. If a model has a 4,000-token window, it can only “look at” up to about 3,000 words before it must forget or shorten earlier parts. New tokens push old ones out, like a sliding window moving over text. The window size sets hard limits on how long a prompt, chat history, or document can be. A small window forces you to keep inputs short or split them, while a large window lets the model follow longer stories and hold more facts. Choosing the right window size balances cost, speed, and how much detail the model can keep in mind at once.

New techniques, like retrieval-augmented generation (RAG) and long-context transformers (e.g., Claude 3, Gemini 1.5), aim to extend usable context without hitting model limits directly.

Free resources to learn Context Windows

More in stage 13: Agent Loop

Context Windows: common questions

Can I learn Context Windows in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Context Windows in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Context Windows tutorial for beginners?

It is lesson 19 of 101 in the free AI Agents roadmap, in stage 13, Agent Loop. If you are new to AI Agents, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me