Testing with Generative AI study guide
Tokenization and Context Limits
Tokenization is the process of breaking raw text into smaller chunks (tokens) that an LLM can mathematically process. The Context Limit is the maximum number of tokens (input + output combined) that a model can "remember" and process in a single interaction.
Practical example
A token is roughly 0.75 of an English word. If an LLM has a 4,000-token context limit, it cannot summarize a 10,000-word PDF in one go. If the prompt exceeds the limit, the application may reject, truncate or split it, depending on the implementation. Missing information in the middle of a long context is a separate potential issue.
Exam scenario and common trap
Question: An LLM perfectly summarizes the beginning and end of a massive document but completely misses crucial facts located in the center. What is happening? The Trap: "The model is hallucinating." The Correct Answer: The "Lost in the Middle" problem. LLMs struggle to recall information located in the center of a heavily loaded context window.
Related syllabus sections cover this topic. Reference sections: 1.1.2, 2.1.1. See the official ISTQB syllabus for exam scope. Examples are independent; QA-ace is not affiliated with ISTQB.