ComputeRouter

Guides

How to Measure Cost per Accepted Answer for LLM Workloads

Token price is easy to compare, but it often hides the metric that actually matters in production. This guide explains how to measure cost per accepted answer and use it to make better provider decisions.

Why token price is not enough

When buyers compare LLM providers, they often start with list price per input and output token. That is sensible, but incomplete.

If your application needs a usable result, the real business outcome is not “a response was generated.” It is “a response was generated and accepted by the system or user.”

That is why cost per accepted answer is often a more useful metric than token price alone.

What “accepted answer” means

An accepted answer is any output that passes the rule you care about. The rule depends on the workload. Examples:

This metric works best when acceptance is objective or at least consistent.

The basic formula

The formula is simple:

cost per accepted answer = total cost / number of accepted answers

Example:

Then:

40 / 80 = 0.50 USD per accepted answer

Now compare that to another provider:

Then:

35 / 60 = 0.58 USD per accepted answer

Even though the second provider spent less in total, it cost more per accepted result.

What data you need to log

You do not need an elaborate analytics stack to begin. For each request, log:

If possible, also record why a request was not accepted, for example invalid JSON or missing field. That helps identify whether prompt changes or provider changes are more likely to help.

Useful companion metrics

MetricFormulaWhy it matters
Acceptance rateaccepted / total requestsShows output usability
Failure ratetimeouts + errors + 429s / totalShows reliability issues
Average latencysum of latency / total requestsShows speed trade-offs
Cost per accepted answertotal cost / acceptedCombines spend and usefulness

These metrics work together. A provider may look cheap until rejection or failure rates are included.

How to define acceptance checks by use case

Structured output

Use schema validation, required keys, or parser success.

Extraction

Compare extracted fields to answer keys on a benchmark set, or validate field presence and format.

Classification

Check whether the label is in the allowed set, and optionally compare against known labels on a test set.

Human-in-the-loop workflows

Use reviewer approval as the acceptance event. This is slower, but still useful for periodic measurement.

A lightweight evaluation loop

  1. Create a representative test set
  2. Run the same prompts across providers
  3. Apply the same acceptance check to every result
  4. Log failures separately from rejected answers
  5. Compute cost per accepted answer per provider

If you already run production traffic, you can do this on a slice of live requests as long as your logging is consistent.

What this metric does not solve

Cost per accepted answer is useful, but not sufficient by itself. It does not automatically account for:

So use it as a decision aid, not the only decision rule.

How routing uses this metric

Once you can measure cost per accepted answer, you can make better routing decisions across providers for the same model. Instead of asking “Who has the cheapest tokens today?” you ask “Who is most likely to produce the lowest-cost accepted result right now?”

That is the idea behind ComputeRouter. It is a client-side Python SDK that routes requests to the provider where expected cost per accepted answer is currently lowest, with failover when a host rate-limits, times out, or returns an answer your check rejects.

How to avoid misleading results

This is important because small benchmark choices can change the outcome.

When this approach may not be worth the effort

You may not need this metric yet if:

In those cases, simpler cost tracking may be enough for now.

Where ComputeRouter may fit

If you already have an acceptance check and use Python, the ComputeRouter beta may help you test routing on real traffic. The SDK is Apache-2.0, customer API keys stay with the customer, and the beta is free for 20 teams for 2 months. An SDK zip download is available on the site. In six live test runs on one workload, the team measured about 47% lower cost per gold-accepted answer than one provider alone, with 0 lost jobs. Those results are specific to that test workload, and your acceptance checks should be adapted to your own workload.

Final thought

If your LLM outputs feed a real workflow, cost per accepted answer is often the clearest way to compare providers and routing strategies. It turns “which model is cheaper?” into the more useful question: “which setup produces usable outcomes at lower cost?”

Try it: ComputeRouter

FAQ

Is cost per accepted answer only for benchmark datasets?
No. It can be measured on live traffic too, as long as you have a consistent acceptance signal and cost logging.
What if acceptance is subjective?
You can still use the metric with human review, but results will be slower and may be noisier. Clear review criteria help.
Should I ignore token price once I track accepted answers?
No. Token price still matters. Cost per accepted answer is a better summary metric because it combines price with output usefulness.

More guides