Engineering, made clearer.Find a tool /
Learn · Practise · Understand

Learn LLM Context Windows

Context is a finite token budget. Instructions, history, evidence and output reservations all consume it.

3 sections · 10 explained questions · About 10 minutesAll lessons →

Read each short explanation, work through the example, then answer a pop quiz. Every answer explains the reasoning. Incorrect answers unlock a fresh question on the same idea; the full lesson contains ten questions.

01Understand the basics

Ready to learn

A language model has a finite context budget measured in tokens. Instructions, conversation history, retrieved evidence and reserved output all need room. A token is a piece of text, and the exact split depends on the model tokenizer.

Section 1 question · 4 variations
Is four characters per token exact?

02Budget before sending

Ready to learn

Reserve room for the answer before adding evidence. When allocations exceed the available context, shorten or select input deliberately rather than dropping important instructions at random.

Try a different value

Move the slider or use the arrow keys to see what changes.
2,000 instructions/history8000 evidence2,000 output4000 remaining
Section 2 question · 3 variations
With a 16,000 budget and 4,000 reserved elsewhere, how much evidence fits?

03Handle overflow

Ready to learn

An oversized request may be rejected or truncated by the application. Use the actual tokenizer and service limits. Prefer relevant extracts and verified summaries to indiscriminately removing text.

Section 3 question · 3 variations
What does a negative remaining budget mean?

Put it to work

Apply what you’ve learned using the related tools.