:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
2026-09-03
Re-run of the model comparison after rebasing onto master: claude-sonnet-4-5 (the master default) against claude-sonnet-5 (this PR's default), two runs per model.
Same 111 signals from 48 ground-truth groups, same RNG seed, same fixtures as the 2026-08-18 report.
Each model drove every LLM stage: pre-emit actionability, safety filter, query generation, matching, specificity, and the report safety judge. All four runs completed with zero transport or 4xx errors across 1,984 calls, so the capability table sends a request shape both generations accept.
Aggregate metrics
| Metric | 4-5 run 1 | 4-5 run 2 | 5 run 1 | 5 run 2 |
|---|---|---|---|---|
| ARI | 0.824 | 0.782 | 0.769 | 0.805 |
| Homogeneity | 0.977 | 0.978 | 0.977 | 0.985 |
| Completeness | 0.944 | 0.931 | 0.929 | 0.935 |
| Mean purity | 0.975 | 0.984 | 0.976 | 0.989 |
| Mean group recall | 0.765 | 0.748 | 0.721 | 0.743 |
| Malicious leaked rate | 0.000 | 0.000 | 0.000 | 0.000 |
| Reports produced | 44 | 46 | 46 | 46 |
The ARI spread within one model (0.04 for sonnet-4-5, 0.04 for sonnet-5) is as large as the gap between the models' means (0.803 against 0.787). Final grouping quality is a wash at this sample size.
Match quality
After the specificity judge:
| Failure mode | 4-5 run 1 | 4-5 run 2 | 5 run 1 | 5 run 2 |
|---|---|---|---|---|
| CORRECT | 74 (85.1%) | 70 (80.5%) | 70 (81.4%) | 70 (81.4%) |
| UNDERGROUP | 10 | 13 | 12 | 12 |
| OVERGROUP | 3 | 4 | 4 | 4 |
LLM matcher alone, before the specificity judge:
| Failure mode | 4-5 run 1 | 4-5 run 2 | 5 run 1 | 5 run 2 |
|---|---|---|---|---|
| CORRECT | 69 (79.3%) | 64 (73.6%) | 71 (82.6%) | 71 (82.6%) |
| OVERGROUP | 15 | 19 | 9 | 9 |
| UNDERGROUP | 3 | 4 | 6 | 6 |
The raw matcher is the one place the models separate cleanly. Sonnet-5 overgroups about half as often (18 of 172 decisions against 34 of 174) and lands at 82.6% in both runs, where sonnet-4-5 ranges from 73.6% to 79.3%.
Specificity judge impact
| Effect | 4-5 run 1 | 4-5 run 2 | 5 run 1 | 5 run 2 |
|---|---|---|---|---|
| prevented overgroup | 9 | 10 | 3 | 5 |
| caused undergroup | 4 | 4 | 4 | 6 |
| net correct | +5 | +6 | -1 | -1 |
On sonnet-4-5 the judge is worth 5 to 6 extra correct matches per run. On sonnet-5 it costs one: there is little overgrouping left to prevent, and it still splits 4 to 6 groups that belonged together. That is why sonnet-5's better matcher does not show up in the post-judge numbers. Retuning or gating the judge is the lever that would turn the matcher gain into a grouping gain.
Retrieval diversity
| Metric | 4-5 run 1 | 4-5 run 2 | 5 run 1 | 5 run 2 |
|---|---|---|---|---|
| query_diversity | 0.408 | 0.412 | 0.502 | 0.490 |
| candidate_diversity | 0.462 | 0.450 | 0.474 | 0.472 |
Pre-emit actionability by source
| Source | 4-5 run 1 | 4-5 run 2 | 5 run 1 | 5 run 2 |
|---|---|---|---|---|
| Zendesk | 34/45 (76%) | 34/45 (76%) | 35/45 (78%) | 35/45 (78%) |
| GitHub | 19/29 (66%) | 17/29 (59%) | 22/29 (76%) | 22/29 (76%) |
| Linear | 12/18 (67%) | 12/18 (67%) | 13/18 (72%) | 13/18 (72%) |
Every failure in every run is a false positive, so no actionable signal is dropped by either model. Sonnet-5 lets through 22 non-actionable signals per run against 27 to 29 for sonnet-4-5, and its verdicts were identical across its two runs.
Safety
| Judge | 4-5 run 1 | 4-5 run 2 | 5 run 1 | 5 run 2 |
|---|---|---|---|---|
| Signal safety filter | 103/103 | 105/105 | 98/98 | 98/98 |
| Report safety judge | 44/44 | 46/46 | 46/46 | 46/46 |
Both models return stop_reason: refusal with empty content for the same 2 actionability and 2 safety-filter calls on the prompt-injection fixtures.
The pipeline treats those as transport failures and drops the signal, which counts as blocked.
Cost and latency
Priced at the Anthropic list price on 2026-09-03: sonnet-4-5 at $3 input / $15 output per million tokens, sonnet-5 at $2 / $10. The 2026-08-18 report priced sonnet-5 at $3 / $15 because a September 1 increase to that rate had been announced; Anthropic has since cancelled it, so the earlier "$0.84 more per run" conclusion inverts.
| Metric | 4-5 run 1 | 4-5 run 2 | 5 run 1 | 5 run 2 |
|---|---|---|---|---|
| Wall clock | 10m 00s | 13m 06s | 10m 01s | 11m 10s |
| LLM calls | 472 | 477 | 518 | 517 |
| Validation retries | 0 | 0 | 61 | 58 |
| Input tokens | 988,029 | 945,831 | 1,384,833 | 1,367,422 |
| Output tokens | 55,732 | 56,263 | 57,258 | 58,003 |
| Cost (list price) | $3.80 | $3.68 | $3.34 | $3.31 |
| Latency p50 / p95 | 3853 / 10121 ms | 4029 / 23448 ms | 3015 / 14609 ms | 2711 / 34098 ms |
Sonnet-5 sends 42% more input tokens (its tokenizer produces roughly 30% more tokens for the same text, and its more diverse queries feed the matcher larger candidate sets) and still costs 11% less per run.
Per-stage cost, mean of the two runs, as the delta sonnet-5 adds over sonnet-4-5:
| Stage | 4-5 | 5 | Delta |
|---|---|---|---|
| match | $2.09 | $2.03 | −$0.06 |
| safety_filter | $0.53 | $0.42 | −$0.11 |
| report_safety_judge | $0.44 | $0.13 | −$0.31 |
| specificity | $0.30 | $0.23 | −$0.07 |
| query_generation | $0.27 | $0.39 | +$0.12 |
| actionability | $0.14 | $0.15 | +$0.01 |
Query generation still retries on 70% of signals
Sonnet-5 returns 4 or 5 queries where QueryGenerationResponse caps at 3, in both runs and regardless of the prompt's "1-3 queries" instruction.
Pydantic rejects the response, call_llm resends the conversation with the error appended, and the second attempt complies.
That is 58 to 61 extra calls per run, about $0.12 at list price, and the affected signals spend a median 10.7 s in query generation instead of 4.5 s.
Quality is unaffected because the retry always recovers.
Widening the schema and slicing to three, or tightening the prompt, removes the whole cost.
The report safety judge no longer thinks
With thinking: adaptive at effort: high, sonnet-5 spends 782 output tokens across 46 judge calls, about 17 per call, against 20,000 to 21,000 for sonnet-4-5's fixed 8192-token budget.
The judge is 3.3x cheaper and its p50 drops from 10 s to 1.5 s, and it still classifies every report correctly on these fixtures.
The fixtures only contain obvious prompt injection, so the judge's behavior on subtle cases is not covered here.
Latency tail
p50 favors sonnet-5 at every stage except query generation, where the retry dominates. p95 is not a model property in these runs: the eval fires about 250 calls in its first minute from a single development API key, and the slow calls (36 of sonnet-5 run 1's 47 calls over 10 s) are tiny requests that started in that minute, so they measure rate-limit queuing. Sonnet-4-5 run 2 shows the same tail (p95 23 s) when it ran in the same window. On small calls that started after the burst, sonnet-5 is at p50 2.3 s / p95 5.0 s and sonnet-4-5 at 3.4 s / 4.7 s. Production rate limits for sonnet-5 on the gateway's key are not covered by this eval.
Effort: medium against high on sonnet-5
Sonnet-5 runs adaptive thinking whether or not the request names it, at effort: high by default.
Three more runs forced output_config.effort: medium on every sonnet-5 call, and a third high run went out in the same hour as a control.
Medium run 2 hit a window of API timeouts (7 timed-out calls, 82 signal replays), so its cost and latency are marked with an asterisk; its match decisions are intact.
| Metric | high run 1 | high run 2 | high run 3 | medium run 1 | medium run 2 | medium run 3 |
|---|---|---|---|---|---|---|
| ARI | 0.769 | 0.805 | 0.717 | 0.766 | 0.747 | 0.814 |
| Match accuracy after judge | 81.4% | 81.4% | 76.7% | 80.2% | 77.9% | 82.6% |
| Raw matcher accuracy | 82.6% | 82.6% | 80.2% | 87.2% | 84.9% | 79.1% |
| Raw matcher overgroups | 9 | 9 | 10 | 6 | 8 | 10 |
| Judge caused undergroups | 4 | 6 | 6 | 8 | 8 | 1 |
| Actionability false positives | 22 | 22 | 22 | 22 | 22 | 23 |
| Malicious leaked | 0/24 | 0/24 | 0/24 | 0/24 | 0/24 | 0/24 |
| Output tokens | 57,258 | 58,003 | 55,755 | 42,192 | 50,455* | 40,860 |
| Cost (list price) | $3.34 | $3.31 | $3.17 | $3.09 | $3.49* | $3.12 |
| match p50 after the burst | 3.4 s | 3.5 s | 4.2 s | 2.9 s | n/a | 2.9 s |
Grouping quality does not separate: high alone spans 0.717 to 0.805 ARI across three runs, and medium sits inside that band. The raw matcher and the judge both move, in opposite directions and inconsistently, so neither is a reason to pick an effort.
Medium cuts output tokens by 27%, almost all of it in the match stage, where the JSON reasoning drops from about 21,000 tokens per run to 11,500. Input tokens do not change. The clean medium runs cost $3.11 against $3.27 for high, 5% less, and 17% below sonnet-4-5.
Medium is not slower. The match stage's p50 falls from 3.4 to 4.2 s to 2.9 s and specificity from 2.7 to 2.9 s to 2.5 s. Every run after 10:59Z, the high control included, carried a heavy tail (p95 of 11 to 50 s after the first-minute burst) that the two morning high runs did not (6 to 7 s), so the tail is the API's afternoon, not the effort.
Actionability verdicts, safety, the query-generation retries (53 to 61 per run), and the safety judge's roughly 17 output tokens per call are the same at both efforts.
The API accepts output_config.effort on calls that omit thinking, so the pipeline can set an effort on every sonnet-5 call rather than only on the thinking-enabled judge.
Shipped configuration
Two runs of the branch as it ships: sonnet-5 at effort: medium on every call, the query schema uncapped with the caller keeping three, and the specificity judge told to keep two defects of one feature together.
| Metric | 4-5 run 1 | 4-5 run 2 | shipped run 1 | shipped run 2 |
|---|---|---|---|---|
| ARI | 0.824 | 0.782 | 0.787 | 0.790 |
| Match accuracy after judge | 85.1% | 80.5% | 81.4% | 83.7% |
| Raw matcher accuracy | 79.3% | 73.6% | 81.4% | 83.7% |
| Judge prevented / caused | 9 / 4 | 10 / 4 | 4 / 4 | 3 / 3 |
| Actionability false positives | 27 | 29 | 22 | 22 |
| Malicious leaked | 0/24 | 0/24 | 0/24 | 0/24 |
| LLM calls | 472 | 477 | 458 | 454 |
| Validation retries | 0 | 0 | 0 | 0 |
| Input tokens | 988,029 | 945,831 | 1,299,942 | 1,264,532 |
| Output tokens | 55,732 | 56,263 | 37,075 | 36,219 |
| Cost (list price) | $3.80 | $3.68 | $2.97 | $2.89 |
Query generation makes one call per signal again: 86 calls for 86 signals in both runs, against 144 to 147 before, and the stage costs $0.22 instead of $0.39. The retry conversations are gone from the input too, which is why input tokens fall below the earlier sonnet-5 runs.
The judge prevented as many overgroups as it caused undergroups in both runs, where before the rule it split up to eight correct groups per run. The rule removed the two most persistent wrong splits, the two click-detection bugs and the two export formats. The two cases it still splits cross a product boundary (a client SDK against the ingestion pipeline) or involve two separate missing tables, and are arguable in the ground truth.
A run costs $2.93 on average, 22% below sonnet-4-5 and 6% below sonnet-5 at medium before the query fix. Grouping quality, actionability, and safety sit where the earlier sonnet-5 runs put them.
Latency is not reported for these runs: like the effort runs, they sat in an afternoon API window with p95 above 100 s and 100-second timeouts retried inside the SDK.
Method
Run from this branch with SIGNAL_MATCHING_LLM_MODEL and SIGNAL_EMISSION_LLM_MODEL set to claude-sonnet-4-5 for the baseline and left at the PR defaults for sonnet-5.
The effort runs forced output_config.effort from the eval wrapper; the PR code is unchanged.
The sonnet-4-5 request shape (assistant prefill, temperature, budget thinking) is byte-identical to master's, so the baseline is master's behavior.
All runs went straight to the Anthropic Messages API rather than through either LLM gateway, so gateway-side behavior (per-team attribution, model allowlists, Bedrock fallback) is not covered.
Tokens, latency, and stop reasons come from a wrapper around the Anthropic client's messages.create; the eval metrics were written to disk.
Runs went one at a time, in the order 4-5, 5, 5, 4-5. Signals run concurrently and only the match step is serialized, so lock-acquisition order varies between runs; the two-run spread above is that noise.