PromptForge
AI Glossary

Core concepts

Context window

Also known as: context length, context size

Definition

The context window is the maximum number of tokens a model can consider at once — your prompt, any attached documents, the conversation history, and the response it generates. Exceed it and the earliest content gets dropped.

The context window is a hard architectural limit, not a soft preference. It covers input and output together, which is the detail people most often miss: if you fill the entire window with your prompt, the model has no room left to answer.

Windows have grown quickly. Early models handled 2,000-4,000 tokens; current flagships range from 128,000 to over 1,000,000. But a large window is not the same as effective use of it. Models frequently show a "lost in the middle" effect, attending well to the start and end of a long context while glossing over material buried in the centre.

Practical guidance: reserve 2,000-4,000 tokens for the response, put your most important instructions at the very start or very end, and prefer retrieving the relevant 5% of a document over pasting all of it.

Example

A 200,000-token window sounds enormous, but a 150,000-token codebase plus a long conversation history can still overflow it — and quality often degrades well before the hard limit.

Related terms

Put this into practice

Understanding the term is step one. Our free courses and tools let you actually use it.

Project

Build a Personal Study Assistant

Turn a stack of lecture notes into a study partner that quizzes you, explains what you got wrong, and tracks which topics you keep failing. You will finish with a reusable system prompt you can point at any subject.

Challenge

Summarise Without Losing the Point

Compress a long document to a tenth of its length while keeping what matters, then verify nothing important was dropped. Tests whether you can direct compression rather than just requesting it.

Prompt

The 5-Part Prompt Framework — Claude

Every strong prompt combines five parts: Role (who the AI should act as), Context (background info it needs), Task (the specific ask), Format (how you want the output structured), and Constraints (length, tone, things to avoid).

Glossary

Context engineering

Context engineering is the practice of deciding what information enters a model's context window and in what order. As windows grew, choosing what to include became more consequential than wording the instruction.

Article

Context Engineering vs Prompt Engineering: What Actually Changed

Context engineering is the term that replaced prompt engineering in serious AI work. It is not a rebrand — the job genuinely shifted from writing better instructions to controlling what the model can see. Here is the difference and why it matters.

Article

Context Windows Explained: Why Bigger Is Not Always Better

What a context window is, why it includes the response, why models under-use the middle of long inputs, and how to design prompts that work within real limits rather than theoretical ones.