Enterprise pain page
LLM cost too high? Cut inference spend (hosted APIs + self-hosted)
The problem is rarely just “too many tokens.” Bills spike when weak workflows create extra turns, retries, tool loops, and more human review. We decompose spend, tie it to successful outcomes, and fix the real drivers first.
Symptoms: what teams observe
Monthly spend rising without clear attribution. Bills spike after prompt or model changes. Cost per ticket or per user is unacceptable. Leadership asks for ROI and you can't explain where the money goes.
Why it happens: failure modes
Without instrumentation, you can't separate input-token waste from output-token waste, retries from successes, or tool loops from single-shot calls. We trace spend into buckets and identify the dominant drivers.
Context bloat
Full documents, long history, over-fetched RAG. Input tokens dominate.
Always-LLM-large
Simple tasks routed to expensive models. No intent-based routing.
Retries & failures
Failed requests still cost. Timeouts, rate limits trigger retries.
Tool loops
Each tool invocation = extra round-trip. Agentic workflows multiply cost.
No caching
Repeated or near-identical queries pay full inference every time.
Infra waste (self-hosted)
Low GPU utilization, poor batching, low cache hit-rate, mis-sized instances, noisy neighbors.
How we diagnose
We need request-level attribution: input vs output tokens, system vs history vs RAG vs tool, retry count, tool calls per request—and (for self-hosted) GPU utilization and throughput metrics. If you don't have this yet, we implement minimum logging as part of the audit. For a concrete walkthrough, see our token spend decomposition guide (OpenAI example).
Required for diagnosis
- • Token breakdown: input vs output, by source (system, history, RAG, tool)
- • Retry count and status per request
- • Tool calls count and agent steps
- • Model and surface (or cohort) labels
- • Self-hosted (if applicable): GPU utilization, throughput, queueing, batch size
Fix order (step-by-step)
We prioritize by impact. Usually: (1) instrument + baseline, (2) model routing (small vs large by intent), (3) context trimming and RAG pruning, (4) caching for repeated/similar queries, (5) tool-call guardrails and retry policies.
What "good" looks like
Before/after metrics. Cost per successful task down 25–60%. Quality held or improved. P95 latency stable. Exec-ready narrative: "We cut cost X% with no quality drop."
Example: before/after
| Metric | Before | After |
|---|---|---|
| Cost per task | High | 25–60% lower |
| Tokens per request | Bloated | Reduced |
| Quality score | Baseline | Held steady |
Ready to reduce LLM cost?
Start with an AI Production Audit to baseline cost and get a prioritized fix plan. Or jump to an Optimization Sprint if you already have a baseline.
FAQ
Why is my LLM cost so high?
Common drivers: context bloat (full docs when summaries suffice), always-LLM-large (simple tasks routed to expensive models), retries (failed requests still cost), no caching (repeated queries pay full price), tool loops (multi-step agents multiply cost). We trace spend by bucket and fix the dominant drivers.
Does this apply to self-hosted / open-source models too?
Yes. For self-hosted models, “cost” often hides in GPU utilization and throughput: oversized prompts, low cache hit-rate, poor batching, inefficient tool loops, and retry storms—plus infra waste (underutilized GPUs, mis-sized instances, noisy neighbors). We treat hosted and self-hosted the same way: cost per successful task, traced to the dominant drivers.
How do you reduce LLM cost without losing quality?
We use model routing (small vs large by intent), token/context optimization, and caching. Every change is validated with before/after benchmarks. Cost per successful task drops; quality holds or improves.
What is an AI Production Audit for cost?
A 1–2 week baseline: we instrument your system, decompose token spend by bucket (system, history, RAG, tool, retries), identify the top cost drivers, and deliver a prioritized fix roadmap. Often the first step before an Optimization Sprint.
How fast can we see cost reduction?
Typical Optimization Sprint: 4–6 weeks. We ship PRs for routing, caching, context trimming, and tool guardrails. Before/after metrics validate impact. Many clients see 25–60% cost reduction with quality held steady.
Recommended next
Part of Cost Optimization Hub.
Read next
Why LLM Features Fail ROI Reviews
ROIWhy usage metrics and deflection stories collapse when answer quality and unit economics are not measured together.
How to Calculate Cost per Successful AI Task
MetricTie spend to resolved outcomes instead of reporting one blended token number to finance.
Token Spend Decomposition (OpenAI example)
DiagnosisRun a token spend decomposition (retries, tool loops, context bloat) and find the dominant cost drivers fast.
Audit Readiness: Minimum Logging/Tracing Schema
PrereqThe minimum evidence you need so cost diagnosis is provable and repeatable (without a privacy disaster).
Proof
Reducing Inference Cost by 25–60% (Quality Held Steady)
Routing + token budgets + caching to cut spend without a quality drop.
From 'Shut It Down' to Positive ROI (Unit Economics)
Rebuild the exec narrative with cost per successful outcome and before/after evidence.
If you don’t have token-level attribution yet, start with an audit to baseline cost per successful task and prioritize fixes.