Skip to content

B3: measure and publish the token breakdown (12.3) - #189

Merged
joslat merged 1 commit into
mainfrom
docs/b3-token-breakdown
Aug 13, 2026
Merged

B3: measure and publish the token breakdown (12.3)#189
joslat merged 1 commit into
mainfrom
docs/b3-token-breakdown

Conversation

@joslat

@joslat joslat commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Ran the wired instrument. Cold build, 2 questions, both arms accepted at 100%. CountMethod=Exact, Encoding=gpt-4o — real token counts, not the chars/4 estimate this claim could not honestly have been made from.

Arm Context Full transcript Compression
Structured 351 98,409 280×
Structured 340 100,767 296×
Hybrid 1,067 98,409 92×
Hybrid 2,676 100,767 38×

Structured budget: preferences 179, facts 112, entities 60 — ten items each. Hybrid's is dominated by raw messages (904 and 2,520 tokens for 15), which is the comparison's whole point: one arm answers from extracted memory, the other also carries transcript.

Baseline is the full transcript — what a memoryless agent must send for the same question. A truncated window would flatter the result by measuring against a system that already gave up on remembering.

Documented as a verification run, not a headline. n=2 proves the instrument works end to end and gives an order of magnitude; it says nothing about variance across question types, and these two transcripts happen to be nearly the same size. Publishing needs 50 questions and a distribution — a compression ratio is a ratio of two skewed quantities and its mean is not a typical case.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PgDgctPpbTziBNE2RT8VdE

Ran the wired instrument: cold build, 2 questions, both arms accepted at
100%. Counted with Microsoft.ML.Tokenizers reporting CountMethod=Exact
and Encoding=gpt-4o, so these are token counts rather than the chars/4
estimate this claim could not honestly have been made from.

  Structured   351 tokens vs  98,409 transcript  = 280x
  Structured   340 tokens vs 100,767 transcript  = 296x
  Hybrid     1,067 tokens vs  98,409 transcript  =  92x
  Hybrid     2,676 tokens vs 100,767 transcript  =  38x

The structured arm's budget is preferences 179, facts 112, entities 60 --
ten items each. The hybrid arm's is dominated by raw messages, 904 and
2,520 tokens for 15 of them, which is exactly what the comparison is
for: one arm answers from extracted memory, the other also carries
transcript.

The baseline is the full transcript, what a memoryless agent would have
to send to answer the same question. A truncated window would flatter
the result by measuring against a system that has already given up on
remembering.

Documented as a verification run and not as a headline. Two questions
proves the instrument works end to end and gives an order of magnitude;
it says nothing about variance across question types, and the two
transcripts here happen to be nearly the same size. Publishing needs 50
questions and a distribution rather than a mean -- a compression ratio
is a ratio of two skewed quantities, and its mean is not a typical case.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PgDgctPpbTziBNE2RT8VdE
Copilot AI lite review requested due to automatic review settings August 12, 2026 23:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a performance documentation note that records an end-to-end verification run measuring token costs for “answering from memory” versus sending the full transcript, and links it from the performance docs index.

Changes:

  • Added a new doc page describing measured context-token counts for structured vs hybrid memory context assembly, including reproduction guidance.
  • Linked the new token breakdown doc from the performance documentation README.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/performance/token-breakdown.md New documentation page capturing measured token breakdown/compression ratios and how to reproduce the measurement.
docs/performance/README.md Adds a table entry linking to the new token breakdown documentation page.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants