Track LLM evaluation cost by run, dataset revision, candidate model and grader. Attribute each billable attempt to the run that started it, including retries and cases that never received a usable grade. Compare the evaluated quality and the number of valid results alongside spend. Reconcile your totals with the provider before using them to set team budgets.
Distinguish the candidate from the grader
Give each run an identifier issued by your evaluation system. Record the application, team, dataset revision and target policy or prompt revision. Link each attempt to a case ID and a role such as candidate, grader or diagnostic retry. When one case receives two grades, retain both call records and apply the evaluation rule for whether the final grade is valid.
OpenAI's evaluation guide describes defining data and testing criteria, then running the evaluation and inspecting results. Keep the cost dimensions mapped to those same design choices. If a release adds a second model-based grader, compare grader spend separately so the change does not look like a more expensive candidate. Treat deterministic assertions and human review as distinct sources of evidence. Human review can have operational cost even if it produces no provider charge. OpenAI evals guide
Calculate cost at the level of a useful result
Imagine an internal procurement assistant evaluated on 200 cases. The candidate model costs $12 across all attempts. Graders cost $8 including retries. Of the 200 cases, 185 meet the run's criteria for a valid grade. This count excludes cases that could not be assessed, even if those cases incurred charges. It includes both passing and failing candidate answers with a valid grade.
| Measure | Example value |
|---|---|
| Candidate costs | $12 |
| Grader costs | $8 |
| Cost per attempted case | $0.10 |
| Cost per valid grade | About $0.108 |
| Cases without a valid grade | 15 |
Investigate cases that account for disproportionate spend. A long prompt repeated for each rubric can raise grader cost. A case that fails because the grader response is invalid can be expensive in several attempts and still provide no decision. Identify whether the defect is in candidate output, evaluator configuration or a provider failure before trimming the dataset. For any proposed reduction in cases, retain coverage for the release requirements and compare which conclusions would change.
Reconcile eval costs with the provider
Use a project or equivalent billing dimension dedicated to the evaluation where practical. Keep run-level tags in your own ledger. Provider billing data may group costs by project or line item without representing your dataset or grader role. The OpenAI Costs API documents aggregated monetary amounts and grouping dimensions. Match that report to the evaluation time window and project, then retain any difference until you can explain it. OpenAI Costs API reference
A scheduled run can cross day boundaries if an asynchronous grader takes longer than the candidate. Keep an operational run total plus a billing-period view. Publish recent run totals as provisional while jobs are still in flight. Confirm that manual reruns and a scheduled rerun cannot both claim to cover the same case cohort in a comparison.
Estimate the impact before increasing run frequency. If the existing suite costs $20 per run and runs on five working days, the recurring spend is $100 a week at that rate. Running all cases against two candidates would also repeat grading when each output needs a grade. Separate inexpensive gate checks from broader comparisons, then inspect whether the cheaper schedule still finds regressions soon enough.
Use Alectura spend policies for request-level controls and the internal AI cost showback guide for team reporting. Keep evaluation outcomes, grader roles and the convention for charging shared datasets in the evaluation system.
Source documents (2)
- OpenAI evals guideChecked
- OpenAI Costs API referenceChecked
Trace a request through Alectura.
Bring a sample prompt and a customer policy. See what reaches the model and which decisions appear in the request record.