Bird
0
0

Why might the 'total_tokens' value in an AI response not always equal the sum of 'prompt_tokens' and 'completion_tokens'?

hard📝 Conceptual Q10 of 15
Agentic AI - Agent Observability
Why might the 'total_tokens' value in an AI response not always equal the sum of 'prompt_tokens' and 'completion_tokens'?
ABecause some tokens may be counted twice internally
BBecause tokenization methods can differ causing slight mismatches
CBecause 'total_tokens' is always the sum of prompt and completion tokens
DBecause 'total_tokens' counts only prompt tokens
Step-by-Step Solution
Solution:
  1. Step 1: Understand token counting nuances

    In some cases, tokenization methods or internal counting may cause slight mismatches between 'total_tokens' and the sum of 'prompt_tokens' and 'completion_tokens'.
  2. Step 2: Recognize possible differences

    Therefore, 'total_tokens' might not always exactly equal the sum due to these differences.
  3. Final Answer:

    Because tokenization methods can differ causing slight mismatches -> Option B
  4. Quick Check:

    Tokenization differences can cause mismatches [OK]
Quick Trick: Tokenization differences can cause total_tokens mismatch [OK]
Common Mistakes:
  • Thinking there are tokenization mismatches
  • Believing tokens are double-counted
  • Confusing total with prompt only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes