Thursday, December 3, 2026 | London 10°C · Drizzle
DailyGlimpse

AI

Understanding Tokenization, Context Windows, and Common AI Mistakes

Kyle Balmer | AI with Kyle 2 min read

In a recent video, AI educator Kyle Balmer breaks down the fundamental concepts of tokenization and context windows, explaining why AI models often make seemingly silly errors.

Tokens are the basic units that language models use to process text. While humans think in words, AI models break text into tokens — which can be parts of words, whole words, or even punctuation. Balmer demonstrates using a tool called Tiktokenizer to show how a simple sentence splits into tokens, each assigned a unique ID number.

One key insight is that English is more token-efficient than many other languages, meaning the same meaning in English often costs fewer tokens to process. This can affect pricing and performance when using AI services.

Balmer also addresses the famous "raspberry problem" — why AI can't accurately count the number of 'r's in the word "strawberry." The answer lies in tokenization: the model doesn't see individual letters; it sees tokens like "str," "aw," "berry," etc. This limitation leads to what looks like a dumb mistake but is actually a structural constraint of how the technology works.

Context windows refer to the amount of text (in tokens) an AI model can consider at once. While newer models boast context windows of up to 1 million tokens, Balmer warns that bigger isn't always better. Performance can degrade as the context grows, and processing larger contexts is computationally expensive.

He introduces the concept of "context compaction," a technique that allows models to summarize or compress older parts of a conversation to stay within the context limit, enabling longer chats without abrupt cutoffs.

Understanding these core concepts helps users set realistic expectations and use AI more effectively by crafting prompts that work with — not against — the model's token-based nature.

React