TOPIC 02/4215 MINNOT STARTED

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.

  1. Cut the pile
  2. Put the key rule at the edges
  3. Ask for quotes
  4. Check the quotes
A small desk: put the key pages at the edges

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The deskThe context window
A page on the deskA piece of text, counted in tokens
Pages at the edges, easy to seeFacts at the start and the end of the input
Pages buried in the middle of the pileFacts 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.

What each part of the trick stands for
In the trickWhat it stands for
Start or endPages at the edges are easy to see
MiddleDetails most easily lost
Past the limitAnything 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
  1. 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)

    A research paper (accepted to a journal, Transactions of the Association for Computational Linguistics, in 2023) on how models use long input. Results are for the models tested then and may differ for newer ones. · Checked 2026-10-18

    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.

  2. 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)

    Vendor documentation for one provider. Each provider splits text its own way, so counts differ between tools. · Checked 2026-10-18

    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.

  3. 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.

    Public overview of the specialist certification known as CT-GenAI: uses of large language models in testing, prompt design, managing risks of generative artificial intelligence (AI), and test tooling that uses such models. Named as a public overview only; syllabus text not quoted. · Checked 2026-10-18

    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.

  4. 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)

    Vendor documentation for one tool. Says to be clear and direct, to explain the reason for a rule, to give a few examples and to separate parts of a prompt with tags. Other tools may differ. Search excerpt only. · Checked 2026-10-18

    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
  1. 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)

    A research paper (accepted to a journal, Transactions of the Association for Computational Linguistics, in 2023) on how models use long input. Results are for the models tested then and may differ for newer ones. · Checked 2026-10-18

    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.

  2. 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)

    Vendor documentation for one provider. Each provider splits text its own way, so counts differ between tools. · Checked 2026-10-18

    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.

  3. 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.

    Public overview of the specialist certification known as CT-GenAI: uses of large language models in testing, prompt design, managing risks of generative artificial intelligence (AI), and test tooling that uses such models. Named as a public overview only; syllabus text not quoted. · Checked 2026-10-18

    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.

  4. 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)

    Vendor documentation for one tool. Says to be clear and direct, to explain the reason for a rule, to give a few examples and to separate parts of a prompt with tags. Other tools may differ. Search excerpt only. · Checked 2026-10-18

    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.

  5. 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.

    Position effect in long inputs, measured on models of 2023. · Checked 2026-10-19

    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.