AI Cost Management LLMOps Model Selection

How to Manage AI Costs in Production

SingleAxis Research
How to Manage AI Costs in Production

How to Manage AI Costs in Production

Most AI cost programmes start in the wrong place. Teams look at token prices, shorten prompts, and ask engineers to cache more aggressively. Those tactics help, but they miss the unit that finance and product leaders actually care about: cost per resolved workflow.

An AI support assistant that costs less per token but escalates twice as many conversations is not cheaper. A model that generates a low-cost draft but requires a senior reviewer to rewrite it is not cheaper. A RAG system that retrieves the wrong context and forces users to retry is not cheaper. The bill you need to manage is the complete cost of getting the job done.

The cost stack

Production AI cost has seven layers:

Cost layerWhat to measureCommon failure
InferenceInput tokens, output tokens, latencyOptimising token price while quality drops
RetrievalEmbedding, vector search, rerankingSending too much context to the model
Tool callsAPI usage, database reads, external servicesLetting agents loop or retry without budget limits
Human reviewReview minutes, escalation rate, rewrite rateCounting model cost but ignoring labour cost
Failed attemptsRetries, abandons, unresolved sessionsTreating every request as a success
EvaluationSampling, judge models, expert scoringNot measuring whether cheaper outputs still pass
GovernanceLogging, retention, auditsRebuilding evidence later at higher cost

The cheapest system is the one that resolves the workflow correctly with the least total effort.

Route tasks before you route models

A model router should not start with model names. It should start with task classes:

  • Classify and route — small model or rules first.
  • Extract structured fields — small or mid-size model with schema validation.
  • Summarise low-risk content — mid-size model with length and citation checks.
  • Answer from enterprise documents — RAG model with retrieval quality checks.
  • Reason across policy, finance, medical, or legal content — larger model plus human review threshold.
  • Act with tools or write to systems — agent harness with budget limits, approvals, and trace-level evaluation.

This lets you pay for expensive reasoning only when the task actually requires it.

Use budget gates inside the agent

Agents need explicit budgets. A production agent should know:

  • maximum tool calls per task
  • maximum retrieval chunks
  • maximum model retries
  • maximum latency
  • maximum spend per session
  • escalation threshold when confidence or grounding drops

Without these gates, cost growth looks like "usage growth" until someone inspects traces and finds tool loops, over-retrieval, or repeated failed attempts.

Measure cost alongside quality

Every candidate model should be evaluated on a paired scorecard:

MetricWhy it matters
Cost per resolved taskCaptures retries, escalation, and failed attempts
Pass rate against task rubricPrevents cheap but unusable outputs
Human edit distanceShows whether reviewers are really saving time
Citation accuracyReduces downstream correction cost
Latency at concurrencyCatches infrastructure cost before launch
Escalation precisionAvoids sending easy tasks to humans

Cost optimisation without quality measurement creates hidden risk. Quality optimisation without cost measurement creates prototypes nobody can afford to scale.

The operating cadence

Run cost reviews weekly during launch and monthly after stabilisation. Each review should answer:

  1. Which task classes consumed the most spend?
  2. Which model produced the highest cost per resolved workflow?
  3. Which prompts caused retries or long outputs?
  4. Which retrieval queries pulled unnecessary context?
  5. Which failures should be routed to a smaller model, larger model, or human?

The goal is not to minimise AI spend. The goal is to buy the right amount of intelligence for each workflow.

Where evaluation fits

You cannot safely reduce cost unless you know what quality you are allowed to lose. That is why cost management belongs inside the evaluation programme. A cheaper model is acceptable only if it still passes the task rubric, safety checks, citation checks, and escalation policy.

Use the AI Model Selection Benchmark to shortlist candidates, then run a production-style evaluation on your data before changing the routing policy. For high-stakes systems, capture the decision in an Evidence Report so finance, engineering, risk, and compliance are looking at the same proof.