Tokens and Context
50%
Lesson 4 of 8

Tokens and Context

Models can only work with the information that fits into their current context.

Active reading
Why this matters

Models can only work with the information that fits into their current context.

Tokens

Small pieces of text the model processes.

Context window

The working space available for the current request.

Priority

Recent and explicit instructions often matter most.

Understand the working model

Long prompts are not automatically better. Context has a capacity, so every instruction, example and pasted document competes for attention. Put the goal and critical constraints where they are easy to find.

When a task uses a long document, ask the model to first identify the relevant section, then perform the task on that section. This reduces noise and makes verification easier.

Example
Goal: summarize the refund policy. Context: only use sections 4–6 below. Output: 5 bullets, each with the section number used.
Practice

Apply the pattern above to one real task you already do. Keep the first version small enough that you can inspect every input and output.

Common mistake

Do not paste everything you have “just in case.” Irrelevant context can make the answer less focused.

Key takeaway

Give the model the smallest complete context needed for the task, and make the goal and constraints explicit.

Next lesson

Why AI Hallucinates

Continue to the next lesson.

Continue →