Skip to content

    AI Architect Case Files

    Case: Legal Triage, Model Cascade Break-Even

    A legal intake team sent every contract to its largest model. A cascade with a lawyer-calibrated threshold cut cost 55%, and a break-even check kept it honest.

    By Published 6 min read

    • ai-architect
    • case-file
    • industry-legal
    • pattern-model-cascade
    • failure-cost-overrun
    • kind-composite
    Share

    Composite scenario, not a real company. Assembled from common industry patterns; every number is illustrative and its assumptions are listed at the end.

    This case belongs to Cost and unit economics for AI Architects.

    Context

    A legal services firm triages 40,000 inbound counterparty contracts a month for corporate clients. Each contract is marked "standard" (normal signature path) or "needs lawyer review". The 40,000 are contracts that did not match an approved template. Every contract currently goes to the largest approved model.

    Problem statement

    Always using the large model costs 2,880 cost units (cu) a month against a budget of 1,500.

    Measurable goals:

    • Monthly model cost at or below 1,500 cu.
    • On a lawyer-labelled sample, the upper end of the 95% Wilson interval for the share of risky contracts wrongly marked standard is 4% or less.
    • Every decision traced with tier, score and prompt version.

    Constraints

    • Lawyers decide on anything marked "needs review".
    • Privileged documents go only to the approved provider.
    • A change of model or prompt version needs a fresh calibration.

    Why the traditional approach fell short

    A clause library with keyword rules catches contracts written on the firm's own paper. Counterparty paper words the same clause many ways, and a heading such as "limitation of liability" appears in nearly every contract, so keyword flags fire too often and lawyers learn to ignore them. A classic classifier needs labelled examples per clause type and breaks when the law or a template changes.

    Options considered

    Option Why accepted or rejected
    A. Clause library and keyword rules only (non-AI) Rejected as the whole plan: too many false flags on counterparty paper
    B. Large model for every contract Rejected: 2,880 cu a month, 1.9 times the budget
    C. Small model only Rejected: it misses 38 of 300 risky contracts (12.7%) on the calibration set
    D. Cascade: small model first, escalate below a calibrated threshold, with a break-even check Accepted

    Solution architecture

    Figure 1. Components of the cascade

    flowchart LR accTitle: Legal triage cascade components accDescr: The Orchestrator reads contracts from the Document store and calls the Model gateway. The small tier answers first. The Policy engine scores the answer and applies the threshold. Low scores go to the large tier. Contracts marked for review go to the lawyer queue in the Approval service. Every decision is traced and the Eval service samples decisions against lawyer labels. DS["Document store"] --> OR["Orchestrator"] OR --> MG["Model gateway"] MG --> SM["LLM provider: small tier"] MG --> LG["LLM provider: large tier"] OR --> PE["Policy engine (scorer and threshold)"] OR --> AP["Approval service (lawyer queue)"] OR --> TS["Trace store"] TS --> EV["Eval service (lawyer-labelled sample)"]

    How to read this: the Policy engine owns the threshold, and the arrow to the large tier is the only place a contract is paid for twice.

    Figure 2. One contract, accepted or escalated

    sequenceDiagram accTitle: Runtime path of one contract through the cascade accDescr: The Orchestrator sends the contract to the small tier through the Model gateway. The Policy engine scores the answer. At or above the threshold the answer is accepted. Below it the same contract goes to the large tier. Contracts marked for review go to the lawyer queue. The tier, score and label are traced. autonumber participant O as Orchestrator participant M as Model gateway participant S as LLM provider small tier participant G as LLM provider large tier participant P as Policy engine participant A as Approval service participant T as Trace store O->>M: contract and triage prompt M->>S: small tier request S-->>M: label and reasons M-->>O: answer O->>P: score this answer P-->>O: score alt score at or above 0.90 Note over O: Accept the small tier answer else score below 0.90 O->>M: same contract, large tier M->>G: request G-->>M: label and reasons M-->>O: answer end opt label is needs review O->>A: lawyer queue end O-)T: tier, score, label

    How to read this: the alt block is the cascade, and the opt block is unchanged from the old design.

    How AI solved it, step by step

    One contract through the cascade (interactive when JavaScript is on)

    As designed

    1. Small tier first. The Orchestrator sends the contract (6,000 input tokens) and the triage prompt to the small tier. It returns a label and short reasons (300 tokens).
    2. Score. The Policy engine rates the answer from 0 to 1 with a scorer trained on lawyer-labelled outcomes. The model's own stated confidence is not used.
    3. Decide. At 0.90 or above the answer is accepted. Below it, the same contract goes to the large tier. On the calibration set 35% escalate.
    4. Route. A needs-review label goes to the lawyer queue. A standard label follows the normal signature path and may be sampled.
    5. Weekly gate. Lawyers label a sample of accepted contracts. The missed-risk bound and the break-even escalation rate are recomputed with the current numbers.

    Without the fix

    1. Every contract, large tier. All 40,000 contracts go to the large tier.
    2. Cost per contract. Each costs 0.072 cu, so 72 cu per 1,000.
    3. The bill. The month costs 2,880 cu, 1.9 times the budget, mostly on contracts the small tier would have handled.

    Under the hood

    The cascade follows the FrugalGPT paper (arXiv 2305.05176): a scoring function rates an answer between 0 and 1; the answer is returned if the score is above a threshold, otherwise the next model is queried. The paper reports that its cascade matched the best single model with up to 98% cost reduction on its benchmarks; that is the paper's result, not a forecast here.

    Every request pays the small call; a share e also pays the large one.

    cascade cost per request = c_small + e x c_large
    always-large cost        = c_large
    break-even escalation e* = 1 - c_small / c_large
    Small / large cost ratio Break-even escalation rate
    0.05 95%
    0.10 90%
    0.25 75%
    0.50 50%

    Try escalation rates in the widget; the starting values are per 1,000 contracts. The full derivation is in Under the hood: Cascade break-even.

    Cascade versus always-large, cu per 1,000 contracts (interactive when JavaScript is on)
    Cascade cost per request32.4
    Always-large cost per request72
    Break-even escalation rate90.0%

    What went wrong / failure modes

    Failure What the system does Why
    The small tier is confidently wrong on a rare clause type Indemnity and liability clauses always escalate by rule; weekly per-clause sample A global score hides weak spots
    Escalation drifts up (new counterparty paper) Alarm at 45%; at 60% the cascade costs 50.4 per 1,000 Cost and quality both move
    Model or prompt version changes Scores shift, so the threshold is recalibrated before release The scorer learned the old outputs
    Price ratio changes Break-even recomputed; at ratio 0.5 and 52% escalation the cascade costs 73.44, more than always-large (72) Break-even depends on both costs
    Calibration sample too small The interval is wide, so collect more labels before trusting it 300 risky contracts is a floor

    Results

    These are illustrative targets, not measurements. The calibration set holds 1,200 lawyer-labelled contracts, 300 of them risky. The gate: upper end of the 95% Wilson interval of missed risk at 4% or less.

    Threshold Escalation Cost per 1,000 (cu) Risky contracts missed (of 300) Upper bound Gate
    0.70 18% 20.16 21 10.5% fail
    0.80 26% 25.92 12 6.9% fail
    0.90 35% 32.40 5 3.8% pass
    0.95 52% 44.64 3 2.9% pass

    The lowest passing threshold, 0.90, costs 32.4 cu per 1,000: 1,296 cu a month against 2,880 (a 55% saving) and inside the 1,500 budget. A higher threshold buys safety at a price: 0.95 is cheaper than always-large only because the small tier costs a tenth of the large.

    Tradeoffs and when NOT to use this approach

    • A cascade needs labelled data and a weekly review; with few labels, use the large model.
    • Escalated contracts wait for two calls, so the slowest path is slower than always-large.
    • Where a miss has legal consequences that no bound can cover, keep a lawyer or the large tier in the loop.
    • If the small tier is not much cheaper, the break-even is low and the cascade may cost more.
    • Practitioners differ on whether to fine-tune one small model instead.

    Design rules extracted

    1. Compute the break-even escalation rate first: 1 - small cost / large cost.
    2. Choose the threshold from a labelled sample, with an interval, not a single percentage.
    3. Escalate high-stakes clause types by rule, whatever the score.
    4. Recompute the gate and the break-even whenever a model, prompt or price changes.
    5. Alarm on the escalation share: it moves both cost and quality.

    Assumptions

    Prices are invented cost units per million tokens: large 10 input and 40 output, small 1 and 4. No real price is used.

    • Per contract 6,000 input and 300 output tokens. Large (6,000 x 10 + 300 x 40) / 1,000,000 = 0.072 cu; small (6,000 x 1 + 300 x 4) / 1,000,000 = 0.0072 cu; per 1,000: 72 and 7.2 (ratio 0.1).
    • 40,000 contracts a month: always-large 40 x 72 = 2,880 cu (2,880 / 1,500 = 1.92). Cascade at 35%: 7.2 + 0.35 x 72 = 32.4 per 1,000; x 40 = 1,296 cu (45% of 2,880).
    • Other thresholds: 7.2 + 0.18 x 72 = 20.16; 7.2 + 0.26 x 72 = 25.92; 7.2 + 0.52 x 72 = 44.64; at 60%: 7.2 + 0.6 x 72 = 50.4.
    • The scorer's own cost is taken as zero here; the lesson's formula adds it. Break-even 1 - 7.2 / 72 = 90%. At ratio 0.5: small 36, cascade at 52% = 36 + 0.52 x 72 = 73.44 against 72.
    • Calibration counts and escalation rates are invented. Wilson interval at z = 1.96 (the NIST e-Handbook's recommended interval for a proportion): 21/300 upper 10.46%; 12/300, 6.86%; 5/300, 3.84%; 3/300, 2.90%; 38/300 = 12.7%.
    • The budget of 1,500 cu, the firm and its contracts are invented.

    Last verified: 2026-10-22

    Ask about this article

    Get answers grounded in this post. AI-generated — based on this article, and may be imperfect.

    Scaled AI Weekly

    Enjoyed this? Get more like it every Monday.

    Real architecture decisions, LLMOps patterns that survive production, and engineering leadership advice — from 12+ years of building at enterprise scale. Free. No spam. Unsubscribe anytime.

    Get new articles by email

    Free. We email a confirmation link first, and you can unsubscribe from any email.

    Join engineers building production AI systems

    Comments