LLM Evaluation: How to Compare Accuracy, Latency, and Cost
Choosing a large language model requires more than comparing benchmark scores or API prices. This article explains how to design fair evaluations, measure task accuracy and production latency, verify token usage and billing, and calculate cost per successful task. It also outlines a staged validation process for selecting models that meet business quality, reliability, and risk requirements.
1. Define What You Are Comparing
“Which large language model is better?” sounds like a straightforward question, but it can refer to several different goals: accurate knowledge-based answers, reliable complex reasoning, natural Chinese-language expression, stable service performance, or affordable task completion.
These goals do not always improve together. A model may score higher on complex reasoning while taking longer to generate a response. Another may have lower API fees but require frequent retries or human review because it makes more mistakes. For businesses, the meaningful comparison is not an isolated benchmark score, but the ability to complete tasks under the same operational constraints.
Model evaluation should therefore move beyond rankings and focus on three verifiable questions:
- Can the model meet quality requirements for the target tasks?
- Can it meet response-time and reliability requirements under realistic load?
- Is the total cost acceptable after including retries, retrieval, review, and operations?
Evaluation data becomes useful for model selection only after these questions are defined.
2. What the Reported Benchmark Data Can—and Cannot—Show
The source material describes a Chinese-language capability evaluation involving approximately 15,000 questions. It records accuracy, average request duration, average token usage, and cost per 1,000 calls. This multidimensional approach is more useful than a single overall score, but the measurement definitions still need scrutiny.
For example, two sets of results show accuracy increasing from 60.6% to 71.5%. The correct description is an increase of 10.9 percentage points, not 10.9%. The relative increase over the original result is approximately 18.0%. These calculations answer different questions and should not be used interchangeably.
The other reported changes are:
- Average request duration: from 40 seconds to 72 seconds, an increase of 80%.
- Average recorded token count: from 2,586 to 2,731, an increase of approximately 5.6%.
- Cost per 1,000 calls: from CNY 43.2 to CNY 53.5, an increase of approximately 23.8%.
These figures illustrate evaluation methods, but they do not establish a purchasing recommendation. The material does not adequately document prompts, generation settings, concurrency, failure handling, billing channels, or whether both measurements used exactly the same question set. Without this information, it is difficult to separate model differences from differences in the execution environment.
The material also contains inconsistent pricing definitions. Cost figures therefore need to be checked against actual invoices and usage records rather than inferred from a quoted unit price.
The useful conclusion is not that a particular model led a ranking. It is that capability, latency, and cost can change together and must be validated under consistent conditions.
3. Build a Fair Evaluation Under Shared Constraints
Keep Input Conditions Consistent
For comparisons across models, align the following as closely as possible:
- Test questions, context materials, and prompts.
- Output format and length requirements.
- Permission to use retrieval, external computation, or tools.
- Request concurrency, timeouts, and retry policies.
- Answer-scoring criteria and exception handling.
If one model can retrieve information while another must rely on its existing knowledge, the evaluation compares two systems rather than model capability alone. System-level comparisons are also valuable, but the evaluation target must be explicit.
Generation settings can affect both answer quality and latency. When settings have different meanings across models, using identical numerical values is not necessarily fair. Instead, align the intended behavior as closely as possible and document the configurations used.
Separate Fixed-Condition and Optimized Evaluations
A fixed prompt helps reveal how models perform on identical inputs. It does not necessarily represent the best business results each model can achieve after reasonable adaptation.
A two-round evaluation can address this distinction:
- Controlled evaluation: Use a shared task description and control variables to compare baseline capability.
- Optimized evaluation: Allow prompt and workflow adjustments within the same optimization budget to compare deployment performance.
Report the two rounds separately. Otherwise, gains from prompt optimization may be mistaken for an advantage in the model’s underlying capability.
Record Success Rates and Error Types
Calculating accuracy only for requests that return normally can hide timeouts, rate limits, and formatting failures. At a minimum, report:
- The proportion of all requests that produce a usable response.
- Task accuracy among normally returned responses.
- The final task success rate across all requests.
Also classify errors, such as factual mistakes, calculation errors, missed constraints, invalid output formats, refusals, and request failures. Each category may require a different remedy; they should not all be attributed to insufficient model intelligence.
4. Break Down Accuracy by Business Domain
Overall accuracy depends on the distribution of questions. The more heavily a domain is represented, the more its results influence the total score. A model that leads on a broad benchmark may therefore be unsuitable for a specific vertical application.
In education, evaluation should examine explanations of concepts, solution steps, and misleading conclusions. In finance, it should emphasize numerical calculations, assumptions, and risk communication. In healthcare-related applications, factual accuracy, limits of applicability, and the need for professional involvement are essential.
Even a substantial improvement in a domain score does not establish that a model can independently handle high-risk decisions. Answering benchmark questions correctly and operating safely in real-world conditions are different requirements.
A more useful approach is to build a business-specific test set with separate task categories:
- Common foundational tasks: Check coverage of everyday requests.
- Complex combined tasks: Test reasoning across multiple conditions and integration of information.
- Boundary cases: Test responses to insufficient information or conflicting conditions.
- High-risk tasks: Examine critical steps where errors have serious consequences.
- Format-constrained tasks: Verify that downstream systems can use the output directly.
Report results for each category separately. Business-specific weights can be applied where necessary, but they should be established before testing rather than adjusted after seeing the results.
5. Measure More Than Average Response Time
Total response duration reflects how long a task takes to complete, but it does not fully describe user experience. For streaming responses, also measure time to first output. For automated workflows, focus on the time until the final result is usable.
At a minimum, record median latency, higher-percentile latency, and the timeout rate. A small number of extremely slow requests can distort the average, while higher-percentile measurements reveal tail-latency risks.
Longer latency can have several possible causes:
- Longer input context.
- More generated content.
- Request queuing or rate limiting.
- Changes in network conditions.
- External retrieval or tool execution.
- Changes in server-side processing.
These are possible explanations, not verified causes without monitoring data. In particular, slower responses should not automatically be interpreted as deeper reasoning, and assumptions about launch-period traffic should not be presented as established facts.
Production validation should repeat tests at different concurrency levels and track changes in throughput, failure rates, and latency. A system that performs well at low concurrency may fail to meet business requirements during peak traffic.
6. Use Consistent Token and Cost Accounting
Tokens are units used by models to process text. They are not equivalent to Chinese characters, words, or individual characters. Different tokenization methods can produce different token counts for the same text, so token count alone cannot establish which model is more efficient.
Define whether “average token usage” refers to input tokens, output tokens, or their combined total. Record any other billable items separately.
In the simplest input-and-output pricing model:
Cost per request = input token count × input price per token + output token count × output price per token
Business costs usually extend beyond model calls. They can include retries, retrieval, storage, logging, networking, and human review. Caching and batch processing may also change the cost structure. Actual usage rules and invoices should determine the calculation.
Longer answers are not necessarily better. For information extraction and structured output, unnecessary text may increase the likelihood of parsing failures. For complex explanations, excessive compression may remove essential supporting information. Output constraints should reduce unnecessary generation rather than simply minimize token usage.
7. Compare Cost per Successful Task, Not Just Price per Call
Cost per 1,000 calls is convenient for tracking spending, but it does not account for successful task completion. A low-priced option that needs repeated corrections may ultimately cost more.
A more business-relevant metric is:
Cost per successful task = total cost during the evaluation period ÷ number of tasks meeting business acceptance criteria
Acceptance criteria may require a correct answer, valid formatting, completion within the timeout, and no additional human editing. This metric is closer to actual business outcomes than question-level accuracy alone.
Still, retain separate cost and success-rate measurements. Different options may lead on cost, quality, or latency, and there is rarely an absolute winner for every scenario.
A practical selection process is to apply constraints first, then optimize: eliminate options that fail minimum quality, safety, or latency requirements, then choose among the remaining options based on cost per successful task.
8. Move from Offline Testing to Production Validation
Offline evaluation is a starting point, not the final step. Use a staged validation process.
First, draw de-identified samples from real business tasks and define reference answers or acceptance rules. Reserve an independent test set so that prompt optimization does not repeatedly reuse test answers.
Next, assess comparative results through blind review or rule-based scoring. Open-ended responses are difficult to evaluate entirely through automated scoring, so combine automated methods with human spot checks and record scoring disagreements.
Then run a limited-traffic production trial. Track whether users need follow-up questions, whether people edit the results, whether downstream systems execute successfully, and whether performance deteriorates during peak periods.
Finally, establish continuous regression testing. Changes to model versions, prompts, retrieval materials, or business workflows should trigger retesting of critical samples. A strong evaluation result at one point does not guarantee equivalent performance in later versions.
For complex systems, task-based routing may also be appropriate: routine tasks can follow a lower-cost path, while complex or high-risk tasks enter a more rigorous processing workflow. Whether this architecture is worthwhile should be determined by measured benefits, not by assuming that a multi-model system is inherently better.
9. Conclusion: A Better Model Is One That Fits the Task
Model quality cannot be judged solely by higher accuracy or lower API prices. A reliable comparison must address five dimensions: quality, latency, stability, cost, and risk.
Developers should document test conditions, error categories, and billing definitions. Businesses should connect evaluation results to acceptance criteria and actual operating costs.
The best choice is not necessarily the model with the highest leaderboard score. It is the technical solution that consistently completes the target tasks, stays within acceptable risk boundaries, and delivers verifiable value for the resources invested.
