Tokens, Context Windows and Their Business Effects
Tokens and context windows determine how much information a model can use, how long its answers can be and how much it costs. This lesson explains these limits and how to recognise and work around them.
Learning outcomes
After completing this lesson, you will be able to:
- Explain tokens and how they affect pricing, limits and latency.
- Describe the context window and maximum output tokens.
- Identify symptoms of token and context limits and their remedies.
- Identify what fills the context window in assistants and agents.
- Choose between long context and RAG, and explain prompt caching.
- Estimate token costs from request volume and input and output size.
Tokens
Models do not read words; they read tokens, which are fragments of text. In English, one token averages roughly four characters, or about three-quarters of a word, so 1,000 tokens is roughly 750 words. Other languages, code and numbers often need more tokens for the same content. Tokens matter for three reasons: pricing for most generative AI services is per input and output token, limits are expressed in tokens, and latency grows with the number of tokens processed and generated.
~4characters
Average size of an English token
~750words
Roughly 1,000 tokens of English text
2prices
Input and output tokens are priced separately
Context windows and output limits
The context window is the maximum number of tokens a model can consider in a single request. It includes the system instructions, the conversation history, any documents or retrieved passages, and the response itself. Context windows vary widely between models, from a few thousand to hundreds of thousands of tokens or more. A separate maximum output tokens setting limits how long the response can be.
A larger context window allows longer documents and conversations, but it is not free: every token in the context is processed and paid for on every request, and models can pay less attention to information buried in the middle of very long inputs.
What fills the context window
Business users often think of the context window as the space for their question. In practice, the user's question is usually a small part of it. The following list shows what a typical request contains.
- System prompt: the application's standing instructions, sent with every request.
- Conversation history: previous turns, which grow as a conversation continues.
- Retrieved content: passages or documents supplied by RAG or attached by the user.
- Tool definitions and results: for agents, descriptions of each tool and the data returned by each call, which can be large.
- The user's input and the response being generated.
Agents and long conversations therefore reach context limits much sooner than a single question would suggest, and their cost per request rises as the context grows.
The following diagram compares how much of the context window a single question and a long agent task use.

Long context or RAG
When a model must work with large amounts of information, there are two broad options: send everything in a long context, or use RAG to send only the most relevant passages. Long context is simple and suits tasks that need the whole document at once, such as summarising a complete report. RAG suits large or frequently changing collections, where only a small part is relevant to each question. Repeated content, such as a long system prompt or a document queried many times, can also be cached by services that support prompt caching, including Amazon Bedrock, which reduces the cost and latency of repeated requests. The following comparison summarises the choice.
Long context or RAG?
Recognising and addressing the symptoms
Business users often see the effects of these limits without knowing their cause. The following list connects the common symptoms to their likely cause and remedy.
- Responses stop mid-sentence: the maximum output token setting is too low; raise it or ask for a shorter format.
- Early instructions are forgotten in long chats: the conversation exceeded the context window and older messages were dropped; summarise history or restate key instructions.
- A large document is rejected or partly ignored: it exceeds the context window; split it, summarise sections, or use RAG to send only relevant passages.
- Costs and latency are higher than expected: prompts include more context than needed; trim instructions, send fewer documents or cache repeated context.
Symptom and remedy
A contract review assistant that misses clauses
A procurement team pastes entire 300-page supplier agreements, with all schedules, into a generative assistant and asks it to list every liability clause. The assistant misses clauses in the middle of long agreements, and each request is slow and expensive. What is the problem and the better design?
The agreements approach or exceed the context window, and even when they fit, information in the middle of very long inputs is less reliably used. Every request also pays for hundreds of thousands of input tokens. A better design splits the agreement into sections and processes each one (prompt chaining), or uses RAG to retrieve only the sections relevant to liability. Choosing a model with a larger context window can help, but it increases cost per request and does not remove the attention problem.
Estimating monthly token cost
A support assistant will handle 10,000 requests a day. Each request sends about 1,500 input tokens (system prompt, history, retrieved passages and the question) and receives about 300 output tokens. For illustration, assume prices of USD 3 per million input tokens and USD 15 per million output tokens. What is the approximate monthly cost, and where are the savings?
Each day uses 15 million input tokens (USD 45) and 3 million output tokens (USD 45), so about USD 90 a day or roughly USD 2,700 over 30 days. The figures below summarise the calculation.
15million
Input tokens per day
3million
Output tokens per day
90USD
Approximate cost per day
2,700USD
Approximate cost per 30 days
Although there are five times as many input tokens, output tokens account for half of the cost because they are priced higher. Savings could come from a shorter system prompt, fewer retrieved passages, summarising long conversation histories, caching repeated context, limiting answer length, or a smaller model for simple questions. Real prices vary by model and change over time, so the AWS Pricing Calculator and the current price list should be used for an actual estimate.
Roughly how many English words correspond to 1,000 tokens?
Show answer
About 750 words, because a token averages about three-quarters of an English word.
Exam Tips
Remember for the exam
- A token is about three-quarters of an English word; pricing and limits are in tokens.
- The context window covers instructions, history, documents and the response.
- Cut-off answers: output limit. Forgotten instructions: context window. Huge documents: split or use RAG.
- More context means more cost and latency on every request.
- The context window also holds the system prompt, history, retrieved content and agent tool results.
- Output tokens usually cost more than input tokens; estimate cost from volume, input size and output size.
- Prompt caching reduces the cost and latency of repeated context.