llm-masters · one question, traced · 2026-10-09

What Happens When You Ask a Chatbot the Weather

Every inference step behind one chat answer, run for real in Claude Code. Which model ran, what it read, what it produced, and which parts were hidden from me.

“What is today's weather in Destin, FL?”
The answer it produced
~81 °Fnow, feels like ~86 °F
86–90 °Fhigh
~78 °Flow
40–70 %chance of rain
Partly cloudysky

Taken from WeatherBug and The Weather Network. The page snapshots carried no timestamp and disagree a little, which is why the rain figure is a range. For a forecast you can trust, use weather.gov (NWS Mobile/Pensacola).

Trace

Who computed what, in order

Claude Code harness (plain code, no model) Opus 5.5 (me): prefill, then decode Search tool backend A model I can't see
HarnessClaude Code Opus 5.5the model you talk to SearchAnthropic server tool Unseenwhatever wrote the digest order of events, left to right (not to time scale) build R1 schema R2 search summary R3 answer dashed: auto-mode permission classifier on each tool call (Sonnet 5 by default, per the docs) pale = prefill · solid = decode
Step log

Each step, with its inputs and outputs

  1. Harness · no model

    0 · Build the prompt

    reads
    Claude Code's system prompt and tool definitions, your three CLAUDE.md files, the memory index, the summary of our earlier conversation, file-change notices, and your question.
    does
    Joins them into one long text and turns it into tokens.
    why it's cheap
    Almost all of it matches the previous turn, so its KV state likely comes from the prefix cache. It's the same mechanism projects/15 used to time pure decode.
  2. Opus 5.5 · round 1

    1 · Decide a tool is needed

    prefill
    One forward pass over the new, uncached tokens. Most of the time to first token is spent here.
    decode
    One token at a time: a short reasoning trace, then a tool call. WebSearch was deferred: I knew its name but not its definition, so I had to fetch that first.
    emits
    ToolSearch("select:WebSearch")
    stops
    Generation ends at the tool call. The harness runs ToolSearch locally and returns the definition. No model runs here.
  3. Opus 5.5 · round 2

    2 · Write the search

    prefill
    Only the appended tool definition. Everything before it is cached.
    decode
    The date comes from the context the harness supplies (2026-10-09). The model has no clock of its own.
    emits
    WebSearch(query="Destin FL weather today October 9 2026", mode="standard")
  4. Search backend+ unseen model

    3 · Search and summarize, server side

    search
    Claude Code's documentation says WebSearch "returns result titles and URLs. It doesn't fetch the result pages." Nine links came back. Five were low-quality SEO pages on one domain. The others were WeatherBug and two Weather Network pages (city and airport).
    summary
    Yet the result reached me with prose attached: a digest saying the snapshots were undated and contradicted each other, and an instruction to cite sources. The docs don't describe that step. I didn't write it, so something on the server side did, most likely a model; I can't see which one, its size, or its prompt. This is an observation from this session, not documented behaviour.
    lesson
    The facts went through two models before you saw them: summarized once by that model, then again by me. Neither one checked a weather API.
  5. Opus 5.5 · round 3

    4 · Write the answer

    prefill
    The search result.
    decode
    The reply you read. It kept the rain chance as a range, flagged that the pages were undated, and pointed to weather.gov, all because the sources disagreed.
    emits
    Text, streamed to your terminal token by token.
Tally

The bill of compute

WhoCallsKind of workVisible to me
Opus 5.53prefill (mostly cached) + decode, each round ending in a tool call or the answeryes
Search summarizer≥ 1read the pages and wrote a prose digestonly its output
Auto-mode classifier0–2reviews each tool call before it runs; auto mode was on. The docs say it runs on Claude Sonnet 5 by default, not on the session's model: a separate model, but not a small oneno
Background (Haiku-class) model0–1the docs name a Haiku-class model "for background functionality", and list conversation summaries for claude --resume among background jobs. Whether it titled this session is not documentedno
Harness3prompt assembly, ToolSearch, and sending the search request: plain code, no modelyes
Small helper models

The small models around the big one

A chat product is rarely one model. Around the large model that writes the answer sit smaller ones doing quick, narrow jobs: naming the conversation, digesting a web page, summarising a session so it can be resumed, deciding whether a request is safe. "Small" means fewer parameters, which means fewer bytes to read for every token. That makes them faster and cheaper, and for a narrow job the extra reasoning a large model brings goes unused.

What Claude Code documents, and what it doesn't

ClaimStatusWhat the docs say
A Haiku-class model does background workdocumentedANTHROPIC_DEFAULT_HAIKU_MODEL: "Model ID that the haiku alias resolves to, also used for background functionality". The older ANTHROPIC_SMALL_FAST_MODEL ("Haiku-class model for background tasks") is deprecated.
Which background jobs rundocumented"Conversation summarization: background jobs that summarize previous conversations for the claude --resume feature", and "command processing" for commands like /usage. The page does not say which model runs each one.
WebFetch digests the page with another model calldocumented"it then runs the prompt against the content in a separate model call, and Claude receives the result of that call rather than the raw page." The model is not named.
The auto-mode permission check is a separate modeldocumented"The classifier runs on Claude Sonnet 5 by default rather than on your /model selection." Separate, but not small.
WebSearch results arrive as titles and URLsdocumented observed otherwise"returns result titles and URLs. It doesn't fetch the result pages." In this session the result also carried a prose digest, which the docs don't explain.
A small model writes session titlesnot documentedNothing in the docs says this. An earlier version of this page said it as fact; that was an assumption and is withdrawn.

Quotes from code.claude.com (environment variables, model configuration, costs, tools reference and permission modes pages), read 2026-10-10.

Six jobs a small model does well, with examples from this session

illustrative The inputs come from this conversation. The outputs are written for this page to show the shape of each job; they were not captured from Claude Code.

Session title

inWhat is today's weather in Destin, FL?outDestin, FL weather today

A few words from one sentence. No reasoning, one short pass.

Resume summary

inthis whole conversation: tens of thousands of tokensoutTraced the models behind a Destin weather answer, built a trace page, then designed and pushed a GPU node-readiness tool.

The documented background job. Compression, not judgement.

Page digest

in~40 kB of a forecast page's HTML + "today's weather in Destin"out81 °F, feels like 86; high 86, low 78; partly cloudy

Extraction. The big model then reads 20 tokens instead of 10,000.

Topic change

intitle "Destin, FL weather today" + "show me an html"outsame topic

A choice between two labels: should the title change?

Command prefix for a permission rule

ingit -C ~/Projects/my-tool push -u origin mainoutgit push

Parsing into a fixed format, so "allow git push" can match.

Search query rewrite

inWhat is today's weather in Destin, FL? + today's dateoutDestin FL weather today October 9 2026

In this session the large model wrote this query itself. Many search pipelines hand it to a small one.

Where small models sit in other systems

  • Routers: a classifier picks which model answers, sending easy requests to a cheap model.
  • Safety and moderation classifiers screen inputs and outputs before and after the main model.
  • Retrieval: embedding models (often well under 1B parameters) turn documents and questions into vectors; a reranker orders the hits; only the best few reach the large model.
  • Speculative decoding: a small "draft" model guesses the next few tokens and the large model checks them all in one forward pass. Accepted guesses cost a fraction of a large-model step, and the output matches what the large model would have produced alone. Here the small model speeds up the large one instead of doing a separate job.

Why small is cheap: the arithmetic

Generating a token reads every weight once, so on one request decode speed is roughly memory bandwidth divided by the size of the weights. Anthropic doesn't publish its models' sizes, so these numbers use open models on one H100.

ModelWeights (BF16)Decode, one requestA 6-token titleKind
Qwen3-8B16.4 GB136 tokens/s≈ 44 msmeasured llm-masters projects/15, 2026-10-01
a ~1B model≈ 2.2 GBup to ≈ 1,000 tokens/s≈ 6 msestimate scaled by bytes; fixed per-step costs lower it
a ~70B model≈ 141 GB≈ 30 tokens/s on two GPUs≈ 0.2 sestimate doesn't fit one 80 GB card; split across two

For one title the difference is milliseconds. Across millions of conversations, and with the small model often running on cheaper hardware, it is the difference between a background feature that costs almost nothing and one that costs as much as the answers. That is the "bigger vs overkill" trade in practice: a title doesn't get better with more parameters, so a product spends them only where they improve the answer.

Mapping to the benchmark work

What did not run

  • No subagents.
  • No open-weight model: no vLLM, SGLang or TRT-LLM box was up, and nothing ran on your Mac.
  • No weather API, only web text.

Why it looks like AA-AgentPerf

  • Three short prefill+decode rounds in a row, not one long generation.
  • Each round's prefill is small because the prefix cache holds the long, shared context.
  • Each round's TTFT is mostly prefill. With a fresh cache it would be the whole context, every round.
  • End-to-end time is dominated by the round trips and the tool wait, not by token rate.