Skip to content

Reduce LLM token costs

Accuracy up. Token cost down. Latency reduced.

Your models work night and day.

So they better be optimal.

Against any foundation model. Client token bills fell 18% to 93% before any partner discount, measured on ground truth, p95 latency and cost per successful task.

Receipt · one agent task, 8 turns
LineTokensCost
System prompt × 8 turns48,000$0.24
Tool schemas × 8 turns72,000$0.36
Retrieved chunks60,000$0.30
Repeated history90,000$0.45
Reasoning tokens24,000$0.60
Failed run, retried1 run$0.49
The answer2,000$0.05
Total$2.49
Accuracy on ground truth↑
p95 latency↓

How

Four levers, in that order.

We tune the system around the model in four places: what goes in, what each call costs, how many calls the loop makes, and what model runs. Baseline first, one lever at a time.

  1. Up to 93% fewer tokens

    Context: only what the call needs

    Retrieval, reranking, sparse reading, and compaction that keeps the cache warm. Reading is the biggest line item: observations are 60 to 80% of agent tokens, and only 6 to 15% of what gets read is used. [1]

    On the receipt Retrieved chunks 60,000 → 9,000 tokens. History 90,000 → 18,000.

    Read less, solve more ↗
  2. 58% cut over 8 live weeks

    Cache and route every call

    Stable prefixes at a tenth of the input price, batch tiers at half, a cheap model first with escalation on low confidence, and a cache for repeat questions. [2]

    On the receipt System prompt and tool schemas read from cache at a tenth of the price.

    Closed-loop routing ↗
  3. Cost per successful task

    Tight loops, scored per task

    Every loop runs against our open evaluation framework: accuracy, p95 latency, and cost per successful task. Prompt wording alone moves reasoning tokens 2.4 to 7.4x with no gain in success. [3]

    On the receipt Reasoning 24,000 → 8,000 tokens. The failed run, and its retry, are gone.

    Evaluation framework on GitHub ↗
  4. 770M beat 540B

    The model itself, when the eval says so

    Distill, fine-tune, quantize, or draft-and-verify. A 770M model trained on a frontier model’s rationales beat a 540B model in the original study. [4]

    On the receipt Routine turns move to a distilled model: −$0.10.

    Distilling step-by-step ↗
A puzzled robot lawyer holds one sheet of paper beside a towering stack of documents, with a short stack and a case file at the other end of the desk

Most teams pay for tokens the model never needed.

We find them, measure the removal, and keep the accuracy.

Sixteen techniques

Welcome to the weeds.

Six of these usually apply to a given stack. Which six depends on your traffic.

Context

TechniqueWhat it doesMeasured effectSources
Contextual retrieval and rerankingFewer, better chunks in context.−67% retrieval failures[5]
Sparse readingPreview, then read only the evidence the step needs.Up to 92.9% fewer tokens[1]
Prompt compressionA small model deletes low-information tokens before the call.2–5x compression[6][7]
Compaction that keeps the cacheDrop stale tool output and old turns without breaking the prefix.61–87% lower cost on long sessions[8][9]

Cache and route

TechniqueWhat it doesMeasured effectSources
Prompt cachingMark the stable prefix, or let the provider match it.Cached input at 0.1x[10][11]
Cache-aware agent loopsCache system prompt and tools. Keep volatile output after the breakpoint.41–80% cost cut on long runs[12]
Batch and flex tiersQueue what can wait an hour. Slow synchronous calls at the same rate.50% off[13][14]
Routing, cascades, semantic cacheCheap model or cached answer first. Escalate on low confidence.58% live, up to 98% in benchmarks[2][15][16]

Tight loops

TechniqueWhat it doesMeasured effectSources
Effort and reasoning controlsSet thinking per call. Stop paying for max everywhere.Low to max, per request[17]
Prompt and harness discipline“Try multiple approaches” multiplies reasoning tokens. Harness choice moves cost per success 5 to 30x.2.4–7.4x reasoning tokens, no gain[18]
Structured outputsSchema-bound answers. No prose padding.JSON schema enforced[19]
Cost per successful taskThe metric the loop is tuned against. Tokens and cache hits are consequences.Accuracy · p95 · cost[3]

The model

TechniqueWhat it doesMeasured effectSources
DistillationTrain a small model on the big model’s rationales. Target the failures that escalate.2x the cut of random distillation[4][2]
Fine-tuning on your ground truthThe smaller model learns your schema, your tone, your edge cases.Held to the same eval[20]
Quantization and prefix cacheSelf-hosted: activation-aware 4-bit weights, prefix reuse in the serving layer.>3x speedup vs FP16[21][22]
Speculative decodingA draft model guesses. The big model verifies in parallel. Now batched for agents.2–3x faster[23][24]

Partner rates

Discounts on the tokens themselves.

We partner with OpenAI and Anthropic. For qualifying new clients that can mean discounts on the tokens themselves, on top of everything above.

Our partners and collaborators

  • Anthropic
  • OpenAI
  • Google
  • Microsoft
  • Amazon Web Services
  • NASA

Ab initio

When no foundation model fits, we build one.

Data, architecture, training loop, evaluation, and serving, written at the level where the cost is decided. We have worked at that depth since the first transformer paper: speech systems that informed early Whisper, a scientific question-answering layer for NASA Space Biology, and a write-up on language-model products a year before ChatGPT.

NASA Space Biology work · Pioneering the LLM revolution · Our write-up a year before ChatGPT

Results, before any partner discount

18% to 93%

token cost saved across client engagements.

Almost every client has room to save money and improve accuracy and/or p95 latency. The baseline tells us which, in about a week.

Short answers

Token cost FAQ

How much can LLM token costs be reduced?

Our client engagements saved 18% to 93% of token cost before any partner discount. The range depends on how much of each prompt is stable, how many agent turns repeat context, and whether a smaller model holds accuracy on the ground-truth set.

Does reducing tokens reduce accuracy?

Usually the opposite. Tight retrieval and shorter loops remove noise from the context. Every change runs against the evaluation framework, so accuracy, p95 latency, and cost per task are measured before and after it ships.

What is the fastest first win?

Prompt caching. Cached reads cost a tenth of fresh input at Anthropic and up to 90% less at OpenAI. Batch processing takes another 50% off work that can wait an hour. Partner token discounts apply on top for qualifying cases.