A context window is the maximum number of tokens an LLM can process for a request. Tokenization converts text into smaller pieces and integer identifiers, so the limit applies to tokenized prompts and responses rather than simply counting words. Larger prompts can provide more relevant context, but they remain bounded by the model and its hardware. section 10.1.1 section 10.3
Treat the context window as a practical constraint:
- Keep prompts within the limit. Excess tokens may be cut off, ignored, or cause an error, leaving a partially completed prompt. section 11.1 section 12.2.2
- Select relevant material instead of attaching every user story, test script, code sample, or other development artifact. section 11.1
- Manage token costs as well as capacity: sending more tokens can increase charges, even when the model accepts them. section 11.1
Testing ideas with retrieved context
A direct prompt such as “I want test ideas for deleting bookings” can be extended with relevant documents at a separate context point. Retrieving only the documents related to the query improves response accuracy and avoids filling the prompt with unnecessary data. This is the role of retrieval-augmented generation (RAG); fine-tuning offers another way to make responses more context-sensitive, but requires more tooling and preparation. section 10.3 section 11.1
List me five of the most populated cities in the world .
A token listing makes the constraint concrete by showing how an ordinary sentence is divided before an LLM processes it. section 10.1.1





















