AI Glossary / Prompting and human-AI interaction / Intermediate

Token budget

Token Budget (Prompting and human-AI interaction)

Definition

A token budget is a limit, set in advance, on how many tokens an AI model may read and write in a request, a task or a billing period. Tokens are the small chunks of text a model processes. A budget can cap the prompt, the reply, the total context window, or the spend over a month. It is a planning and control tool, not a quality setting, and teams define it at different levels.

What it means

Language models do not count words. They count tokens, which are pieces of words, whole short words or punctuation marks. Every request has a cost in tokens, and most providers bill by token, with input and output often priced differently. Every model also has a maximum context window, which is the most tokens it can handle in one request.

A token budget turns those facts into a decision. It answers questions such as: how much background material can we paste in, how long may the answer be, and how many tokens may this workflow use per day. For a business, it links prompt design to cost, speed and reliability.

How it works

A budget is usually set at several levels. The first is the single request: a limit on prompt tokens plus a limit on the reply, often called a maximum output setting. The second is the task or workflow, where one job may involve several requests, so the budget covers the sum. The third is the period, such as a daily or monthly allowance per team or per customer.

To stay within budget, teams measure first. They run sample inputs through the provider's token counter or a tokenizer tool, note the average and the worst case, and add a safety margin. Then they cut where it is cheap to do so: shorter instructions, fewer pasted examples, retrieving only the relevant passages instead of whole documents, summarizing earlier conversation, and asking for a defined reply length.

Budgets have trade-offs. A reply cap that is too tight can cut an answer off mid-sentence. A prompt trimmed too hard can drop facts the model needed. Reasoning-style models may also use hidden thinking tokens that count toward the limit, depending on the provider. For these reasons, teams track results as well as tokens, and revise the budget when quality slips.

Three practical examples

  • Finance team: An accounts payable group uses a model to read supplier invoices and extract fields. They set a limit of 1,500 prompt tokens and 200 reply tokens per invoice, and they flag any invoice that exceeds it for manual handling.
  • Retailer: An online store uses an assistant to draft product descriptions. The team caps each reply at 120 tokens, which keeps the copy short and keeps the monthly bill predictable during a large catalog upload.
  • Support desk: A help desk bot answers from a knowledge base. Instead of pasting the whole manual, it retrieves the three most relevant articles, and the team caps the combined context at 3,000 tokens to hold response time and cost down.

Think of it this way

A token budget is like a prepaid phone plan with a monthly allowance: you can do a lot within it, but you choose what to spend it on. The analogy stops working because a phone plan meters usage only, while a token budget also shapes the quality of the output, since cutting input can remove information the model needs.

Worked example

A support team handles 2,000 chats a day. Each request has a fixed instruction block of 400 tokens, an average retrieved context of 1,100 tokens and a customer message of 100 tokens. That is 400 + 1,100 + 100 = 1,600 input tokens. The reply cap is set at 300 tokens. Total per chat is 1,600 + 300 = 1,900 tokens at most.

For the day, 2,000 chats x 1,900 tokens = 3,800,000 tokens. Suppose the fictional price is $2 per million input tokens and $8 per million output tokens. Input: 2,000 x 1,600 = 3,200,000 tokens, so 3.2 x $2 = $6.40. Output: 2,000 x 300 = 600,000 tokens, so 0.6 x $8 = $4.80. Daily cost is $6.40 + $4.80 = $11.20.

Now the team trims the instruction block from 400 to 250 tokens. Input per chat falls to 1,450. Daily input is 2,000 x 1,450 = 2,900,000 tokens, or 2.9 x $2 = $5.80. The new daily cost is $5.80 + $4.80 = $10.60, a saving of $0.60 a day, as long as answer quality holds.

Illustrative case study

Fictional case: Larkfield Mutual, a small insurance broker, added an assistant to summarize policy documents for its advisers. In the first month the bill was far above plan. A review showed that advisers were pasting entire 40-page policies into every request, and the assistant was writing long summaries nobody read.

The operations lead set a token budget. Policies were split into sections, and only the sections relevant to the adviser's question were sent, capped at 4,000 tokens. Replies were capped at 250 tokens, with a note telling advisers they could ask for more detail. A monthly allowance per adviser was added, with an alert at 80 percent.

A new problem appeared. A few summaries missed exclusions that sat in a section the retrieval step had skipped. The team added a rule that exclusion and limit sections were always included, raised the cap to 4,500 tokens for those cases, and sampled 20 summaries a week against the source. Cost came down and the omissions stopped.

Common misconceptions and mistakes

A token is the same as a word. It is not: a token is a chunk of text, often part of a word, and one word can be several tokens. Use the provider's tokenizer to count rather than estimating from word counts.

A bigger budget always gives better answers. More tokens can add noise and cost without improving accuracy. Relevant, well-chosen context usually beats a large pile of it.

Only the reply counts toward the cost. Most providers charge for both the input you send and the output you receive, and input is often the larger share. Hidden reasoning tokens may count too, depending on the provider.

A token budget is a one-time setting. Prompts, documents and models change, so the budget needs regular review against real usage and real quality.

Business use

To start, measure before you limit. Run a sample of real requests through a token counter, record the average and the largest cases, and set a per-request cap with a margin. Then set a task-level and monthly allowance, add alerts at a threshold such as 80 percent, and decide what happens at the limit: truncate, summarize, queue or hand off to a person.

Measure tokens per task, cost per task, the share of replies cut off by the cap, and a quality check such as sampled accuracy or user ratings. The risks are false savings and silent failure. A cap that is too tight can drop key facts or truncate answers, and a missing alert can let spend run on unnoticed. Prices and limits vary by provider and change over time, so check current terms.

People also ask

How do I estimate how many tokens my text uses?

Use the tokenizer or token counter offered by your provider and run real samples through it. A rough word-count rule can be misleading, especially for code, numbers and non-English text.

What happens when a request goes over the token limit?

It depends on the system. The request may be rejected, the input may be truncated, or the reply may be cut off mid-sentence. Design for this by setting alerts and a clear fallback.

Does a token budget reduce answer quality?

It can if set too tight, because needed context or answer length gets cut. Set the budget from measured needs and check sampled outputs after any change.

Check your understanding

In the worked example, what is the maximum number of tokens per chat?

Answer: 1,900 tokens: 1,600 input tokens plus a 300-token reply cap.

Why did trimming the instruction block from 400 to 250 tokens save money in the worked example?

Answer: It cut input per chat from 1,600 to 1,450 tokens, which reduced daily input from 3,200,000 to 2,900,000 tokens and the daily cost from $11.20 to $10.60.

Why did Larkfield Mutual always include exclusion sections despite the cap?

Answer: Retrieval had skipped sections that held exclusions, so some summaries missed key terms. Forcing those sections in protected accuracy.

Related terms

  • Token
  • Context window
  • Prompt
  • Prompt engineering
  • Retrieval-augmented generation
  • Inference cost
  • Maximum output tokens
  • Summarization

Learn next

Pick one workflow, count its tokens on ten real examples, and calculate cost per task using your provider's current prices. Then read about context windows and retrieval-augmented generation to see how to send less text without losing the facts that matter.

  • Retrieval-augmented generation

More in Prompting and human-AI interaction

  • Sycophancy - Sycophancy in an AI assistant is a tendency to agree with, flatter, or accommodate a user's stated views at the expense of an independent, evidence-based...
  • System prompt - A system prompt is an application-level instruction supplied to a language model to establish its role, task, behavior or response conventions.
  • Thinking budget - A thinking budget is a limit, set by the user or developer, on how much internal reasoning a language model may produce before it gives its final answer.
  • Tree-of-thought prompting - Tree-of-thought prompting organizes language-model problem solving as a search over alternative intermediate steps.
  • Trust - Trust is a person's confidence that an AI system can be relied upon in a particular situation.
  • Turn-taking - Turn-taking is the pattern in a human-AI conversation where each party speaks or acts in alternation: the person sends a message, the AI replies, then the...

Work in finance? Get the free CFO AI Prompt Pack: 7 prompts for finance leaders.

Sources

Google, Machine Learning Glossary: https://developers.google.com/machine-learning/glossary OpenAI, Prompt engineering guide: https://platform.openai.com/docs/guides/prompt-engineering Jurafsky and Martin, Speech and Language Processing: https://web.stanford.edu/~jurafsky/slp3/ The sources were consulted for the definitions of tokens and context limits and for prompt design practice; the examples, analogy, worked example and case are original educational illustrations. Checked 10 Nov 2026.

Previous: Token Next: Token-mixing

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer