The Context Window
Part of the Fundamentals section of Coddy's AI Prompts journey — lesson 10 of 23.
The context window is the AI's memory limit—the maximum number of tokens it can hold at once. Think of it as a fixed-size container that must fit everything: your prompt, the conversation history, the system prompt, and the AI's response.
Different models have different context window sizes. Some older models handle around 4,000 tokens. Newer models might support 100,000 tokens or more.
Once you hit the limit, the AI simply cannot process additional information.
Here's what fills up that window:
| Component | Takes Up Space? |
|---|---|
| Your current prompt | Yes |
| Previous messages in the conversation | Yes |
| System prompt | Yes |
| AI's response | Yes |
This is why long conversations can become problematic. Each back-and-forth exchange adds tokens. Eventually, the AI must "forget" earlier parts of the conversation to make room for new content.
When this happens, it loses context and may give inconsistent answers or forget instructions you gave earlier.
Challenge
Since everything in a conversation takes up space in the context window, efficient prompting means getting complete information in compact responses. Get the AI to give you a full weekly schedule (all 7 days) in the most token-efficient format possible.
The AI's response must:
- Contain all 7 day names:
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday, andSunday - Be 30 words or fewer in total
- Not contain the words
the,is,are,on, orfor
Cheat sheet
The context window is the AI's memory limit—the maximum number of tokens it can process at once. It's a fixed-size container that holds your prompt, conversation history, system prompt, and the AI's response.
Different models have different context window sizes, ranging from around 4,000 tokens in older models to 100,000+ tokens in newer ones.
What fills the context window:
- Your current prompt
- Previous messages in the conversation
- System prompt
- AI's response
Long conversations consume more tokens with each exchange. When the limit is reached, the AI must discard earlier parts of the conversation to accommodate new content, potentially losing context and giving inconsistent answers.
Start this challenge with Coddy's AI tutor
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
2How AI Reads You — Tokens
What Are Tokens?Words ≠ TokensWhy Token Counts MatterThe Context WindowTokens in Other LanguagesSpecial Tokens You Never See3Writing Your First Prompts
AI Talks Markdown (By Default)Controlling the Output FormatControlling Tone and StyleWhen the AI Ignores You