Skip to content

Contact LV

lv@dablock.com

Juan Lago (LV) uses your details to reply to enquiries (legitimate interest), fulfil a contract with you, or take steps you request before entering one. Privacy and your rights

Context Window

The token budget available for a model request

LV glossary Updated

What is a context window in a language model?

A context window limits the tokens a model can process within a request. Instructions, earlier messages and material supplied by an app take up space. When input and output share a window, the model also needs room to generate its response.

How it works

What fits in a 10,000-token window?
Manual text to send to the model
Existing input
8,000
Added text
900
200
Reserved for the answer
1,500

400 tokens over the limit.

300 tokens free.

Calculator

Allocate a context budget

Calculate remaining space within a shared input/output limit. Input includes instructions, conversation, documents and tool results. The starting values are an editable sample; providers may apply additional limits.

Input + reservation
10,000
Remaining capacity
0
Allocate a context budget · data
CategoryTokens
Capacity10,000
Input + reserve10,000
View inputs and results
Allocate a context budget
ItemValue
Shared capacity · tokens10,000
Total input · tokens8,000
Output reservation · tokens2,000
Input + reservation10,000
Remaining capacity0
Allocated percentage100%

Remaining = capacity − input − output reservation. The reservation is space planned for a response. This calculator uses the supplied counts; it does not tokenize text or check a real model’s limits.

Reference: Anthropic: context windows

Key takeaways

  • Budget instructions, documents, tools, history, and output.

  • Check exact model limits and application truncation rules.

▸

Illustrative example

A support assistant has 8,000 input tokens in a shared window of 10,000. It reserves 1,500 for its answer, leaving 500 for more input. Fetching a 900-token manual page would put the request 400 over budget. Sending the relevant 200-token paragraph instead leaves 300 tokens free and keeps the full answer allowance.

Why can a chat lose track of an earlier message?

A chat can show the full transcript while the app sends a shorter history to the model. If a customer changed a delivery address and the app kept only an earlier summary, the model may see the old address. Check which address appears in the messages or retrieved records for that turn. If both versions are present, make the correction and its date explicit.

How much of the context window is left for the answer?

For a shared window, subtract the full input count from the window size. Then check the model’s separate output limit. With 8,000 input tokens in a 10,000-token window, there is room for 2,000 more tokens. If the model caps output at 1,500, that smaller limit sets the longest possible generation. A model that counts reasoning within its output budget can return a shorter visible answer.

Sources and documentation