Skip to content

Context Windows Quick Reference

Fresh

Understanding token limits and optimal chunk sizes is essential for AI-era content optimization. This reference covers model limits and chunking guidelines.

What Are Context Windows?

┌─────────────────────────────────────────────────────────────────────┐
│                    CONTEXT WINDOW EXPLAINED                          │
├─────────────────────────────────────────────────────────────────────┤
│                                                                      │
│   Context Window = Total tokens an AI can process at once           │
│                                                                      │
│   ┌─────────────────────────────────────────────────────────┐       │
│   │  Input (your content)     │  Output (AI response)       │       │
│   │  ◄───────────────────────►│◄────────────────────────►   │       │
│   │     Retrieved chunks      │   Generated answer          │       │
│   └─────────────────────────────────────────────────────────┘       │
│                                                                      │
│   Larger context = More content can be considered                   │
│   But: Quality of retrieval matters more than quantity              │
│                                                                      │
└─────────────────────────────────────────────────────────────────────┘

Model Context Windows (2025)

ModelContext WindowApprox. WordsNotes
GPT-4 Turbo128K tokens~96,000Current ChatGPT default
GPT-4o128K tokens~96,000Multimodal
Claude 3.5 Sonnet200K tokens~150,000Anthropic flagship
Claude 3 Opus200K tokens~150,000High capability
Gemini 1.5 Pro1M tokens~750,000Largest available
Gemini 1.5 Flash1M tokens~750,000Fast, large context
Llama 3.1128K tokens~96,000Open source

Token Estimation

Quick Conversions

TokensApprox. WordsApprox. Characters
10075400
5003752,000
1,0007504,000
10,0007,50040,000
100,00075,000400,000

Rules of Thumb

  • 1 token ≈ 0.75 words (English)
  • 1 token ≈ 4 characters (including spaces)
  • 1 page ≈ 400-500 tokens (standard formatting)

Optimal Chunk Sizes

For AI Retrieval

┌─────────────────────────────────────────────────────────────────────┐
│                    CHUNK SIZE GUIDELINES                             │
├─────────────────────────────────────────────────────────────────────┤
│                                                                      │
│   Too Small (<50 tokens)                                            │
│   ─────────────────────                                             │
│   ✗ Loses context                                                   │
│   ✗ Incomplete ideas                                                │
│   ✗ Poor semantic representation                                    │
│                                                                      │
│   Optimal (100-300 tokens)                                          │
│   ────────────────────────                                          │
│   ✓ Complete ideas                                                  │
│   ✓ Clear semantic meaning                                          │
│   ✓ Good retrieval matching                                         │
│                                                                      │
│   Too Large (>500 tokens)                                           │
│   ───────────────────────                                           │
│   ✗ Mixed topics                                                    │
│   ✗ Diluted embeddings                                              │
│   ✗ Less precise matching                                           │
│                                                                      │
└─────────────────────────────────────────────────────────────────────┘
Content TypeOptimal TokensApprox. Words
FAQ answer100-15075-110
Paragraph100-20075-150
Definition50-10040-75
How-to step100-20075-150
Product description150-250110-190
Blog section200-300150-225

Content Structure by Token Count

Short Form (100-300 tokens)

Best for:

  • FAQ entries
  • Glossary definitions
  • Quick tips
  • Single concepts

Example structure:

markdown
## [Question/Topic]

[1-2 sentence answer]

[1-2 supporting sentences with specifics]

Medium Form (300-600 tokens)

Best for:

  • How-to sections
  • Product descriptions
  • Comparison points

Example structure:

markdown
## [Topic]

[Introduction - 1-2 sentences]

### Key Point 1
[Explanation]

### Key Point 2
[Explanation]

[Summary sentence]

Long Form (600+ tokens)

Best for:

  • Comprehensive guides
  • Research summaries
  • In-depth analysis

Important: Break into smaller chunks with clear headings.

Chunking Best Practices

Do's

  • [ ] One idea per chunk - Keep concepts separate
  • [ ] Clear headings - Make chunks self-contained
  • [ ] Complete thoughts - Don't split mid-sentence
  • [ ] Context within chunk - Include necessary context
  • [ ] Natural breaks - Follow logical content divisions

Don'ts

  • [ ] ❌ Split sentences across chunks
  • [ ] ❌ Separate context from claims
  • [ ] ❌ Create orphan pronouns ("it," "they" without referent)
  • [ ] ❌ Mix unrelated topics in one chunk
  • [ ] ❌ Create chunks that depend on previous chunks

Token Counting Tools

ToolURLNotes
OpenAI Tokenizerplatform.openai.com/tokenizerOfficial, accurate for GPT
tiktoken (Python)pip install tiktokenProgrammatic counting
Anthropic Tokenizerdocs.anthropic.comClaude-specific

Quick Python Check

python
import tiktoken

def count_tokens(text, model="gpt-4"):
    encoder = tiktoken.encoding_for_model(model)
    return len(encoder.encode(text))

# Example
text = "Your content here..."
print(f"Tokens: {count_tokens(text)}")

Impact on Retrieval

┌─────────────────────────────────────────────────────────────────────┐
│                    RETRIEVAL PIPELINE                                │
├─────────────────────────────────────────────────────────────────────┤
│                                                                      │
│   Query: "How do embeddings work?"                                  │
│                                                                      │
│   1. Query embedded → Vector                                        │
│   2. Search vector database                                         │
│   3. Retrieve top-k chunks (usually 3-10)                          │
│   4. Chunks inserted into context                                   │
│   5. AI generates response using chunks                             │
│                                                                      │
│   Your chunk competes with others for top-k slots.                  │
│   Clean, focused chunks = Higher retrieval odds.                    │
│                                                                      │
└─────────────────────────────────────────────────────────────────────┘

Checklist

Before publishing content:

  • [ ] Paragraphs are 100-300 tokens each
  • [ ] Each section has a clear heading
  • [ ] No ideas split across chunks
  • [ ] Context is self-contained
  • [ ] Key terms are in each relevant chunk

See Also

Based on insights from Duane Forrester Decodes Substack