Raise first-pass completion
Improve task framing, structured outputs, validation and model fit where failures create repeated work.
Guide / AI unit economics
Token rates tell you what a provider charges for model usage. They do not tell you what your product pays to finish useful work. Cost per completed task includes the entire route from the initial request to an acceptable outcome, including failure, retries, fallbacks, tools and human review.
The key distinction
Suppose two models receive the same task. Model A has a lower token rate but often returns an invalid structure, misses required information or needs a stronger fallback. Model B has a higher rate but completes the task correctly on the first attempt. Comparing only the first call can make Model A appear cheaper. Comparing the cost of accepted completed tasks may reverse the decision.
This matters for chat, extraction, coding, classification, search, RAG and agents. Every system has a definition of useful completion, whether it is an answer accepted by a user, a valid record written to a database, a support case resolved, a pull request produced or a business decision approved. That definition should become the denominator of the cost metric.
What belongs in the numerator
The denominator
A completion definition must be observable and tied to business value. “The model returned a response” is usually too weak. A document extraction task may require all mandatory fields to pass validation. A coding agent may require tests to pass and a reviewer to accept the change. A support assistant may require the issue to remain resolved without reopening. A sales workflow may require a qualified record rather than a generated paragraph.
The definition should also distinguish partial success. Some workflows produce a useful draft that still needs human completion. That outcome can be measured separately with its own cost and labour requirement. Avoid forcing every route into one binary metric when the business genuinely values several levels of completion.
Once the denominator is stable, the team can compare models, prompts and architectures on a common basis. It can also detect a dangerous form of optimization: reducing token spend while lowering completion quality enough that total cost per accepted outcome rises.
A practical formula
Start by mapping every meaningful route: first-pass success, retry success, fallback success, human-assisted completion and failure. Estimate or measure the cost of each route and its probability. The expected cost per attempt is the probability-weighted sum of those routes.
Then divide total expected cost by the probability of accepted completion. If human-assisted outcomes count as completed, include them in the denominator and include labour in the numerator. If they do not meet the product requirement, leave them outside the denominator.
For actual measurement, aggregate costs and completions over a period that contains enough volume to be representative. Segment the results by task type, model route, customer tier or difficulty so a changing workload mix does not create misleading conclusions.
Worked comparison
Uncertainty
Some tasks complete on the first call while others require long outputs, several retrieval steps or human review. A single average can conceal that variability. Model task difficulty, output length, route choice, retries and intervention as distributions where the tail is material.
P50 describes a typical modelled outcome. P90 supports a conservative budget case under the declared assumptions. For a product with millions of tasks, even a small tail probability may create significant monthly exposure. Report the expected unit cost, percentile unit costs and the monthly distribution after demand is applied.
Keep estimate maturity visible. Early route probabilities based on a test set are not equivalent to measured production behaviour. Store the original basis, compare it with actuals and update future forecasts without rewriting history.
Instrumentation
Optimization
Improve task framing, structured outputs, validation and model fit where failures create repeated work.
Keep routine work on efficient routes and escalate only tasks that need stronger capability.
Retrieve only relevant information, cache stable prefixes and summarize state between turns.
Do not treat retries as a permanent operating assumption when the cause can be removed.
Use confidence, impact and exception rules to focus human attention where it changes outcomes.
Set a unit-cost envelope and multiply by forecast task demand to create a transparent monthly budget.
Governance
A pull request can change the completed-task economics by switching models, increasing maximum output, adding tools, changing routing or permitting more retries. Those code signals can be combined with declared demand and measured completion rates to estimate a monthly delta before deployment.
The approval should show both unit and monthly effects. A small increase per task can become material at scale, while an apparently large unit cost may be acceptable for a rare high-value workflow. The reviewer needs the task definition, value context, assumptions, estimate class, P90 monthly delta and largest controllable driver.
FAQ
No. One business task may require several requests, and some requests may fail. Cost per completed task aggregates the full route and divides by accepted outcomes.
Include it when review is required to produce the accepted outcome. Estimate both the probability of review and the labour time per reviewed task.
Use the same task set, completion definition, quality threshold and route rules. Compare total completed-task cost, latency and quality rather than isolated token rates.
Segment by task type or difficulty and report the workload mix. A blended average can move simply because the mix changed.
Class1 can price code-visible changes and declared assumptions before merge. Actual completion rates then calibrate future estimates. Explore the worked estimator.
Next step
Define one completed task, instrument its routes and calculate the full cost of accepted outcomes. That metric gives engineering, finance and product a common basis for model selection and budget approval.