Match a job Paths Subjects Questions Quizzes Pricing
Overview Read Practice

Practice — Tokenization and Context Windows (10 questions)

Pro content

Sign up free, then start a 14-day Pro trial — no card needed.

Intermediate Open Free

Sizing a Multi-Turn Support Prompt to a Token Budget Permalink →

You are designing the prompt for a customer-support assistant. On a typical turn, the components are:

  • System prompt + tool schemas: 850 tokens
  • Few-shot examples (4 examples, ~180 tokens each)
  • Retrieved help-center chunks: 7 chunks, ~480 tokens each
  • Conversation history: the last 10 turns, averaging 220 tokens/turn
  • Chat-template and special-token overhead: 150 tokens
  • Current user message: 90 tokens
  • Output reserve (max_tokens): 400 tokens

Your team's practical per-request budget (chosen for cost and latency, not the model's advertised window) is 9,000 tokens total (input + output reserve).

  1. Compute the total token count for this prompt as specified.
  2. Is it within budget? If not, by how much is it over?
  3. Propose a concrete set of changes that bring it within budget, and compute the resulting total to show it works. Prefer changes that preserve answer quality over ones that blindly cut everything equally.

Share this question

Intermediate Open Pro

Defending a Cost Estimate Built on Word Count

Unlock this question →
Intermediate Open Pro

Diagnosing a 'Lost in the Middle' Failure

Unlock this question →
Intermediate Open Pro

A Multilingual Cost Surprise

Unlock this question →
Intermediate Open Pro

Pushback: 'Just Use the Big Context Window'

Unlock this question →
Intermediate Open Free

What a BPE Tokenizer Does With a Word It Never Saw Permalink →

A BPE tokenizer's vocabulary was built from a training corpus that never contained the word "hyperparameterization" as a whole unit. At inference time, a user's prompt includes that exact word. Which of the following best describes what the tokenizer actually does with it?

A. It falls back to a single special <unk> (unknown) token, since the word was never seen during vocabulary training. B. It greedily applies the merge table it learned during training, breaking the word down into whichever known subword pieces the merges produce (e.g., something like "hyper", "parameter", "ization"). C. Tokenization fails and the API request returns an error, since BPE vocabularies cannot represent out-of-vocabulary words. D. It matches the word to the closest whole word already in the vocabulary by edit distance and substitutes that instead.

Share this question

Intermediate Open Pro

How Consistently BPE Tokenizes Multi-Digit Numbers

Unlock this question →
Intermediate Open Pro

Where a Critical Fact Is Recalled Most Reliably in a Long Prompt

Unlock this question →
Intermediate Open Pro

Totaling a Second Token Budget Line Item by Line Item

Unlock this question →
Intermediate Open Free

Does a Whole Novel Fit in a 128K Context Window? Permalink →

An average adult novel runs about 100,000 words of English prose.

Roughly how many tokens is that — and does it fit in a 128K-token context window?

Show the words-to-tokens conversion you used, and name one thing that would push the count higher.

Share this question

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.