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:
- a JSON payload parses correctly
- all required fields are present
- a classification matches one allowed category
- an extraction matches an answer key
- a human reviewer approves the output
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 answersExample:
- 100 requests
- total spend: 40 USD
- 80 accepted answers
Then:
40 / 80 = 0.50 USD per accepted answerNow compare that to another provider:
- 100 requests
- total spend: 35 USD
- 60 accepted answers
Then:
35 / 60 = 0.58 USD per accepted answerEven 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:
- provider
- model
- request ID or batch ID
- timestamp
- estimated cost
- accepted: yes or no
- status: success, timeout, 429, error
- latency
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
| Metric | Formula | Why it matters |
|---|---|---|
| Acceptance rate | accepted / total requests | Shows output usability |
| Failure rate | timeouts + errors + 429s / total | Shows reliability issues |
| Average latency | sum of latency / total requests | Shows speed trade-offs |
| Cost per accepted answer | total cost / accepted | Combines 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
- Create a representative test set
- Run the same prompts across providers
- Apply the same acceptance check to every result
- Log failures separately from rejected answers
- 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:
- business value differences between “good” accepted answers
- edge-case quality not captured by your check
- latency sensitivity for real-time UX
- complex provider features beyond plain text generation
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
- Use the same prompt and acceptance rules across providers
- Test enough requests to reflect normal variability
- Separate transport failures from content rejection
- Do not compare providers using different models unless that is your real buying choice
- Note when your workload changes, because savings can change with it
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:
- your monthly LLM spend is very small
- your app is purely exploratory
- you have no repeatable definition of acceptance
- you only use one provider with no practical alternative
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?”
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.