Tokens, context windows and what a prompt costs
An assistant reads text in small pieces and can hold only so many at once. Learn why a long paste loses details, what it costs, and how to give it less but better.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a desk of fixed size. Picture a desk where you can spread only so many pages at once. Pages at the edges are easy to see. Pages in the middle of a huge pile get lost. And if you add a new page, an old one falls off.
Daily List is a to-do list app. Tom, the tester, has a long document about the paid plan. He pastes all of it into an assistant. Then he asks about refunds. The answer ignores the refund rule, which sits deep inside the document.
An assistant reads text in small pieces called tokens. It can hold only so many tokens at one time. That limit is the . Anything beyond the desk is not seen.
The picture has a limit. A real desk is full or not full. A model may still miss a page that fits. The middle of a long paste is where details are most easily lost.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named here are made up.)
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Choosing what to put in front of an assistant, so that the details that matter are seen and the cost stays small.
- Cut the pile
- Put the key rule at the edges
- Ask for quotes
- Check the quotes
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| The desk | The context window |
| A page on the desk | A piece of text, counted in tokens |
| Pages at the edges, easy to see | Facts at the start and the end of the input |
| Pages buried in the middle of the pile | Facts the model may use badly |
WHERE THIS PICTURE STOPS
- A real desk is simply full or not full. A model can miss a page that fits.
- You can see every page on a desk. You cannot see what the model uses.
- A desk does not charge by the page. Many tools charge by tokens.
HOOK
A small desk: put the key pages at the edges.
REMEMBER IT THIS WAY
A rule of thumb: if you see this, think that.
Usually put the rule that matters at the start or the end of a long paste. The middle is where details get lost.
| In the trick | What it stands for |
|---|---|
| Start or end | Pages at the edges are easy to see |
| Middle | Details most easily lost |
| Past the limit | Anything beyond the desk is not seen |
A model can still miss a page that fits, so ask it to quote the rule and check the quote.
TELL A FRIEND
The assistant has a small desk. Keep the pile short and put the key pages at the edges.
OFTEN MIXED UP WITH What a large language model is, and is not, for testers. The first lesson explains that a model guesses likely words. This lesson explains how much text it can hold, and why a long paste loses details.
Sources & standards — 4 sources
- Market practice
Lost in the Middle: How Language Models Use Long Contexts (Liu and others, arXiv 2307.03172) ↗ — arXiv, Cornell University · Models do best when the relevant information sits at the start or end of a long input, and accuracy drops when it sits in the middle; performance also falls as the input grows longer (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Tokens and tokenizers (Cohere documentation) ↗ — Cohere · A token can be a whole word or part of a word, and the number of tokens per word depends on how common the words are (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Certified Tester, Testing with Generative Artificial Intelligence, certification page ↗ — International Software Testing Qualifications Board (ISTQB) · Public overview of the specialist certificate: uses of large language models in testing, prompt design, managing risks of generative AI, and test tooling (search excerpt, page not opened) The syllabus text, read in full from a mirror copy of the publisher PDF (ISTQB syllabus CT-GenAI v1.1, 27 April 2026), confirms the scope. Its chapters are an introduction to generative AI for software testing, prompt engineering, managing the risks of generative AI, LLM-powered test infrastructure, and deploying and integrating generative AI in test organisations.
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Syllabus v1.0 approved July 2025; minor update v1.1. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Prompting best practices (Claude Platform documentation) ↗ — Anthropic · Be clear and direct, explain the reason for a rule, give a few examples and separate parts of a prompt with tags (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
PRACTISE AND KEEP
Sources for this topic — 5 sources
- Market practice
Lost in the Middle: How Language Models Use Long Contexts (Liu and others, arXiv 2307.03172) ↗ — arXiv, Cornell University · Models do best when the relevant information sits at the start or end of a long input, and accuracy drops when it sits in the middle; performance also falls as the input grows longer (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Tokens and tokenizers (Cohere documentation) ↗ — Cohere · A token can be a whole word or part of a word, and the number of tokens per word depends on how common the words are (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Certified Tester, Testing with Generative Artificial Intelligence, certification page ↗ — International Software Testing Qualifications Board (ISTQB) · Public overview of the specialist certificate: uses of large language models in testing, prompt design, managing risks of generative AI, and test tooling (search excerpt, page not opened) The syllabus text, read in full from a mirror copy of the publisher PDF (ISTQB syllabus CT-GenAI v1.1, 27 April 2026), confirms the scope. Its chapters are an introduction to generative AI for software testing, prompt engineering, managing the risks of generative AI, LLM-powered test infrastructure, and deploying and integrating generative AI in test organisations.
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Syllabus v1.0 approved July 2025; minor update v1.1. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Prompting best practices (Claude Platform documentation) ↗ — Anthropic · Be clear and direct, explain the reason for a rule, give a few examples and separate parts of a prompt with tags (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Lost in the Middle: How Language Models Use Long Contexts ↗ — Liu et al., TACL 2024 / arXiv 2307.03172 · search excerpt, page not opened: Liu et al., arXiv 2307.03172, TACL 2024; best at start or end, worse in the middle, also for long-context models of that time.
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.