previews · research · case-context model benchmark

Migrating case context off the dying GPT-5 models

Per-stage benchmark of the December migration for our highest-volume LLM pipeline, run by replaying real production generations.

Final 2026-07-14 Author: Adolfo Tamayo Harness: ai-platform#689 Notion report Deprecation audit

Per-stage verdict: extraction and factuality move to gpt-5.6-luna; chain-of-key CCO generation moves to gpt-5.6-terra@medium; chain-of-key CCO reconciliation — the dominant stage — moves to gpt-5.5@low, because terra fails to produce cleanly-applicable reconcile operations on up to 58% of cases (an objective disqualification, not a judging call). Materiality scoring is deferred: it has no December deadline and every candidate flips 20–30% of material/not-material decisions. And 8 of the audit's 20 at-risk prompts turn out to be dead code — delete, don't migrate.

167k
gens / 30d on dying models
20 → 10
prompts actually needing migration
3,120 + 930
replayed gens + judge verdicts
42–68%
terra ops-apply on reconciliation — the disqualifier

The pipeline under migration

Statement extraction 65k gens / 30d Factuality classification 62k gens / 30d Materiality gate ×3 88k gens / 30d · gpt-4.1-mini CCO initial (CoK) 519 gens / 30d CCO reconciliation (CoK) 17.2k gens / 30d · gpt-5 Ingestion events → statements per asset → materiality gate → Case Context Object generation / reconciliation → everything Lawrence knows about a case

Case context is the pipeline that turns raw matter documents into the structured Case Context Object (CCO) behind Lawrence. Every stage is an LLM call whose model lives in a Langfuse prompt config — which is why the December 11 shutdown of gpt-5 / gpt-5-mini hits it for ~99.9% of our exposure, and why the migration itself is a set of prompt-version edits. The question this benchmark answers is which model goes into each config.

Method — replay production, judge twice, trust objective metrics first

No synthetic corpus. Langfuse stores every production generation with its fully-compiled prompt and output, so we harvested recent real generations per prompt (85 per extraction/factuality prompt, 40 per CCO prompt, 60 per materiality prompt, stratified UK/US) and re-sent the exact same compiled messages to each candidate model. The production output, latency, and token usage are the baseline — no re-runs of the old models needed.

Objective metrics carry the load. Schema validity against the module's own pydantic contracts; statement-ID grounding (every supporting fact must reference a real input statement); whether chain-of-key reconcile operations actually apply using the module's own apply code; factuality agreement vs the baseline; materiality decision flip-rate. LLM judging (position-swapped pairwise, gpt-5.5 primary with a claude-opus-4-8 cross-provider pass) covers what objective checks can't.

Scope finding first: 8 of the audit's 20 at-risk prompts have zero 30-day volume — dead code to delete, not migrate:

case_context_document_context_extractioncase_context_document_reconciliationcase_context_summary_generationcase_context_summary_generation_USstatement_based_cco_generation_initialstatement_based_cco_reconciliationstatement_extraction_with_disambiguationstatement_factuality_classification

The minis: extraction & factuality — luna wins, the official replacement loses again

Exactly as in the ingestion benchmark, OpenAI's suggested drop-in gpt-5.4-mini is the weakest candidate: it loses pairwise against today's gpt-5-mini output under both judges, while gpt-5.6-luna wins under both.

Extraction — pairwise vs prod baseline, win / tie / loss (uk, both judges)
luna@none · gpt-5.5 judge
4
2
1
scores 7.8 / 5.9
luna@none · claude judge
4
1
2
scores 7.1 / 5.4
gpt-5.4-mini · gpt-5.5 judge
2
1
6
scores 6.4 / 6.8
gpt-5.4-mini · claude judge
4
5
scores 5.9 / 5.7
wintielossn≈8–9 per row — small but directionally consistent across judges and jurisdictions
Factuality — classification agreement with prod baseline (uk / us) — higher is safer
gpt-5.6-luna@low
92.8% / 96.7%
gpt-5.6-luna@none
93.7% / 93.6%
gpt-5.6-terra@low
91.0% / 94.5%
gpt-5.4-mini@low
85.6% / 87.3%

Picks: gpt-5.6-luna (none or low) for extraction, gpt-5.6-luna@low for factuality. Both run 2–3× faster than today's prod calls.

CCO generation (chain-of-key) — terra@medium, near-flawless

CCO initial generation — pairwise vs prod baseline (gpt-5.5 judge), win / tie / loss of 40
terra@medium · uk
26
13
1
recommended
terra@medium · us
31
8
1
recommended
sol@low · uk
36
4
2.5× the cost
gpt-5.5@low · uk
28
7
5
2× slower
wintieloss

Every candidate beats today's gpt-5 output here — the stage is a free upgrade. terra@medium takes it on the balance: near-zero losses, 100% schema validity, 97–100% statement grounding, half the latency of gpt-5.5 at 2.4× lower cost. One behavioural note: terra writes leaner CCOs (fewer entities/events than the old model's bulk) — the judges prefer them anyway.

CCO reconciliation (chain-of-key) — the decisive stage, and terra is out

This is 17.2k generations/month and the heart of case context: the model emits update/add/remove operations against the existing CCO. An operation set that doesn't apply cleanly is a failed generation, whatever a judge thinks of its prose. That metric is objective — we run the module's own operation-apply code — and it disqualifies terra outright:

Reconcile operations applying cleanly (uk / us) — the objective gate
gpt-5.5@low
100% / 97.5%
gpt-5.6-sol@low
100% / 100%
gpt-5.6-terra@low
67.5% / 47.5%
gpt-5.6-terra@medium
60.0% / 42.5%

Between the two safe options, gpt-5.5@low wins: judge-preferred or tied under both judges (gpt-5.5 judge: 24/49/6 uk; claude judge: 7/31/1 — mostly ties, no regression), 20% faster than today's gpt-5 (0.81× p50), while sol runs at 1.05–1.07× baseline latency with worse UK verdicts for the same money. Since gpt-5.5 is both a candidate and the primary judge here, the pick deliberately rests on the objective ops-apply gate plus the cross-provider judge — not on self-preference.

Materiality — defer, this is a product decision

Material / not-material decision flip-rate vs prod (lower = safer swap)
gpt-5.6-luna@none
20–25%
gpt-5.6-luna@low
20–23%
gpt-5.4-mini@low
22–30%

Materiality runs on gpt-4.1-mininot in the December shutdown — and every candidate, including the same-family gpt-5.4-mini, flips 20–30% of material/not-material decisions with only 0.47–0.64 score correlation. Since this gate decides whether a CCO regenerates at all, that's a product-behaviour change. It needs a curated gold set and product signoff, on its own timeline.

Cost at current volumes

StageRecommended$ / month (volume-weighted)
Extraction (65k gens/mo)gpt-5.6-luna@low~2,500
Factuality (62k gens/mo)gpt-5.6-luna@low~340
CCO initial CoK (519 gens/mo)gpt-5.6-terra@medium~60
CCO reconciliation CoK (17.2k gens/mo)gpt-5.5@low~6,300
Materiality (88k gens/mo)deferred — stays gpt-4.1-miniunchanged
Migrated total~9,200

Reconciliation dominates because its inputs (the existing CCO + new statements) routinely exceed 100k characters. Terra would have halved that line but is unsafe there. If that number matters, the lever is input size — the existing-CCO payload — not the model choice. And as with ingestion: today's prices retire with today's models, so "keep paying the current bill" is not on the menu.

What happens next

Migrate now (Langfuse prompt-version edits, eval-gated)

  • uk/us extraction → gpt-5.6-luna; uk/us factuality → gpt-5.6-luna@low
  • uk/us CCO initial CoK → gpt-5.6-terra@medium
  • uk/us CCO reconciliation CoK → gpt-5.5@low
  • Keep existing cross-provider fallback_models; re-run the harness on new prompt versions before promoting to production

Don't

  • gpt-5.4-mini anywhere — loses head-to-head under both judges, twice-confirmed pattern across two services
  • terra on reconciliation — 32–58% of its operation sets fail to apply
  • Migrating materiality as a config swap — 20–30% decision flips need product eyes
  • Migrating the 8 dead prompts — delete them
Caveats.