Skip to content

Context

1. What Is It?

One-sentence definition

Context is all the information you provide to the model for the current interaction: the prompt, conversation history, references, retrieved documents, and tool outputs.
Context Window is the maximum amount of context the model can handle at one time.

2. How It Works

The easiest analogy is a desk:

  • the desk is the Context Window
  • the papers on the desk are the Context
  • a larger desk can hold more material
  • once the desk is full, something must be removed, compressed, or summarized

3. What Is Actually Inside the Window?

text
1. System prompt
2. Conversation history
3. Retrieved references
4. Tool outputs
5. The current user message
6. The model's current answer generation

All of these compete for the same limited space.

4. Example Window Sizes

ModelContext windowRough intuition
GPT-3 (2022)~4K tokensa few pages
GPT-3.516K tokensa long article
GPT-4 Turbo128K tokensa short book
Claude 3.5200K tokensmultiple long documents
Gemini 1.5 Pro1M+ tokensa very large corpus

5. Key Insight: Bigger Is Not Always Better

A larger window often helps with longer conversations and longer documents, but it also brings tradeoffs:

  • higher cost
  • heavier computation
  • more noise
  • weaker use of information in the middle of long contexts

6. Intuitive Analogies

AnalogyMeaning
Deskhow much material can be open at once
Working memoryhow much can be actively held
RAMactive runtime information
Spotlightonly what gets attention is truly used well

7. Business Applications

ScenarioWhy context matters
Customer supportremembers the current issue and prior constraints
Document analysishandles whole contracts or reports
Long-form writingkeeps style and consistency
Code reviewsees more of the codebase at once

8. What You Need to Remember

  • Context is what the model can actually see
  • Context Window is how much it can see
  • many bad answers are not model problems but context-design problems

From Zero, To Next