Evaluating Large Language Models: Balancing Accuracy, Latency, and Cost
Evaluating Large Language Models (LLMs) goes beyond looking at a single composite score; it requires balancing accuracy, response time, token consumption, and actual costs based on specific business needs. This article introduces a four-dimensional evaluation framework, emphasizes the importance of analyzing sub-capabilities and ensuring reproducibility, and advocates shifting the focus from cost per call to cost per successful task. By adopting a constraint-first approach and strategic engineering designs, organizations can identify the optimal LLM capability combination that aligns with their business requirements and risk tolerances.
1. Defining Business Problems First
The technical value of a Large Language Model (LLM) cannot be determined by a single composite score alone. For developers and enterprise users, the real questions to answer are: Can the model consistently produce correct results for target tasks? Can it meet user wait time requirements? And how many resources and costs are required to complete these tasks?
These goals do not always improve simultaneously. Higher accuracy might be accompanied by longer generation processes, and reduced resource consumption might come at the expense of answer completeness. Especially in complex reasoning, professional knowledge Q&A, and automated tasks, the boundaries of model capabilities often exhibit significant differences.
Therefore, professional evaluation should shift from “who ranks higher” to “which combination of capabilities is better suited for the current business.” The data referenced in this article serves as a case study for discussing evaluation methods, rather than a recommendation for a specific product. The relevant values can only explain phenomena under specific testing conditions and cannot directly represent performance in actual production environments.
2. Establishing a Four-Dimensional Metric System
2.1 Accuracy: Focusing on Correctness and the Cost of Errors
Accuracy is generally expressed as:
Accuracy = Number of correctly judged samples ÷ Number of valid evaluation samples.
The reference data includes a Chinese task evaluation with about 15,000 questions, where the comprehensive accuracy of two test groups was 68.1% and 71.5%, respectively. This change should be expressed as an increase of 3.4 percentage points, rather than simply “increased by 3.4%.”
If calculated using relative increase, the result is approximately:
Relative increase = (71.5% - 68.1%) ÷ 68.1% ≈ 5.0%.
However, the business significance of accuracy depends on the task type. An error in knowledge retrieval might lead to a user asking again; an error in financial data interpretation might affect decision-making; an error in automated task execution might cause actual operational losses. Therefore, in addition to the average accuracy rate, it is necessary to record error types, error severity, and whether they can be caught by subsequent validation.
For high-risk tasks, metrics such as “critical error rate,” “evidence consistency,” and “manual review pass rate” can be added. For tasks that allow refusals to answer, answer coverage should also be examined to prevent the model from achieving a seemingly low error rate through massive refusals.
2.2 Response Time: Looking Beyond Averages to the Tail
In the reference data, the average call durations for the two test groups were 59 seconds and 96 seconds, with the latter increasing by about 62.7%.
This indicates a significant rise in time cost during testing, but average values alone are insufficient to judge the interactive experience. The actual wait time felt by users is also affected by request queuing, input length, output length, and network transmission.
Engineering evaluations should at least distinguish:
- Time to first token: How long before the user sees the first part of the result;
- Complete response time: The time from initiating the request to the end of the output;
- Median latency: The response performance of typical requests;
- High-percentile latency: The tail experience caused by a few slow requests;
- Timeout rate: The proportion of requests not completed within the business deadline.
Interactive Q&A businesses typically focus more on first feedback and tail latency; asynchronous document analysis businesses can accept longer waits but need to monitor batch throughput and task completion rates.
2.3 Token Consumption: Measuring Resources, Not Reasoning Quality
Tokens are the basic unit of measurement for model text processing. Their quantity relates to the text content and tokenization method, and cannot be simply equated to the number of characters or words.
In the reference data, the average token consumption increased from 2,851 to 3,922, an increase of about 37.6%. This phenomenon can indicate that the amount of text processed or generated per call has increased, but it does not directly prove that the model adopted a more complex internal reasoning mechanism.
The increase in tokens might come from longer answers, different prompts, changes in input context, changes in statistical scope, or additional text processing during the call. To explain the reasons, it is necessary to separately record input, output, and other billing items in the service bill, rather than just comparing totals.
For enterprise applications, resource consumption should also be linked to result quality. For example, if both outputs are a report, whether the longer answer added effective information, reduced manual supplementation work, or merely repeated expressions needs further analysis.
2.4 Actual Cost: Based on Full Billing Scope
The reference data gives the cost per 1,000 calls as 37.6 units and 52.5 units, respectively, an increase of about 39.6%. This metric helps compare expenditures during the testing period but does not automatically equate to full business costs.
Actual costs might include input processing, output generation, retries, external tool execution, data storage, and manual review. If different tests do not use a consistent statistical scope, the cost figures cannot be directly compared horizontally.
It is also worth noting that the reference data provides inconsistent statements for the output unit price, showing 1 unit and 14 units per million tokens, respectively. Therefore, one cannot assume a specific unit price is correct, nor can the average total token count be used to directly calculate costs. In formal evaluations, price effective dates, billing details, input-output splits, and discount conditions should be verified.
3. Checking Sub-capabilities Despite Overall Score Improvements
Comprehensive accuracy is an aggregated result of multiple task types. It helps quickly observe overall changes but easily masks local regressions.
In the reference case, scores for tasks such as reasoning and math, education, healthcare and mental health, finance, and language understanding and instruction following improved; at the same time, performance in tool-calling related tasks declined. This shows that capability changes do not occur uniformly, and “overall stronger” cannot replace item-by-item verification.
A more reasonable approach is to establish a business task matrix.
| Task Type | Key Inspection Points | Common Risks |
|---|---|---|
| Knowledge Q&A | Factual correctness, evidence support, information timeliness | Fabricating facts, distorted citations |
| Math & Logical Reasoning | Derivation process, calculation results, condition coverage | Steps seem reasonable but conclusion is wrong |
| Document Processing | Information extraction, cross-paragraph consistency, structural integrity | Missing key content, confusing entities |
| Professional Assistance | Terminology accuracy, applicable conditions, risk warnings | Overconfidence, crossing professional boundaries |
| Tool Calling | Tool selection, parameter correctness, execution order | Incorrect operations, repeated execution |
| Instruction Following | Format constraints, task boundaries, conflict resolution | Output does not meet downstream requirements |
If a business primarily relies on automated operations, a decline in tool-calling capability might be more critical than an increase in knowledge Q&A scores. Conversely, if the business is offline knowledge consolidation, completeness and accuracy might carry higher weights.
For professional scenarios like healthcare and finance, higher test scores do not prove that the model can independently bear professional responsibilities. Practical applications still require clear usage boundaries, retained manual review, and risk warnings.
4. Making Evaluation Results Comparable and Reproducible
4.1 Fixed Samples and Running Conditions
When comparing different model configurations or versions, try to use the same question set, same prompt templates, same output requirements, and same scoring rules.
Simultaneously record input length, output limits, concurrency, timeout thresholds, retry strategies, and testing time. For configurable sampling parameters, they should also be fixed and documented.
If one test allows longer outputs while another imposes strict limits, differences in accuracy, token consumption, and latency might stem from test configurations rather than the capabilities themselves.
4.2 Using Stratified Sampling to Avoid Dataset Bias
The test set should cover the main types of real requests, including high-frequency simple tasks, low-frequency complex tasks, long-text tasks, and edge cases prone to failure.
You cannot only collect questions the model is good at answering, nor can you only focus on difficult questions and ignore daily requests. A more secure approach is to build a baseline test set according to business traffic proportions, and then separately establish a high-risk test set.
Both results should be reported separately: the former estimates the overall experience, the latter assesses go-live risks. Do not hide high-risk failures within an average score.
4.3 Paired Analysis on the Same Questions
When two configurations use the same question set, changes for each question should be recorded, not just the final total score.
For example, you can count:
- Samples both groups answered correctly;
- Samples that changed from wrong to correct;
- Samples that changed from correct to wrong;
- Samples both groups answered incorrectly.
This analysis can discover which tasks the capability improvement concentrated on, and can locate whether regressions share common characteristics. For key differences, manual review should also be performed; when necessary, paired statistical methods are used to determine if the difference exceeds random fluctuation.
5. Shifting from Cost Per Call to Cost Per Successful Task
What enterprises really buy is not the number of calls, but task completion capability. Therefore, a more business-meaningful metric than “cost per 1,000 calls” is the cost per successful task.
Under the simplified assumption that each call corresponds to one task, temporarily ignoring retries and manual processing:
Cost per successful task = Total call cost ÷ Number of successful tasks.
Using the reference case for calculation:
The first group’s cost per 1,000 calls is 37.6 units. With an estimated success rate of 68.1%, it completes about 681 successful tasks, making the cost per successful task about 0.055 units.
The second group’s cost per 1,000 calls is 52.5 units. With an estimated success rate of 71.5%, it completes about 715 successful tasks, making the cost per successful task about 0.073 units.
This result shows: higher accuracy does not necessarily mean lower cost per successful task.
However, this is just a simplified estimate based on question accuracy rates. Task success in real business might involve multi-turn conversations, tool execution, and manual confirmation. If higher accuracy significantly reduces rework, the final total cost might still decrease.
Therefore, the full cost model should include:
Total business cost = Model call cost + Retry cost + External execution cost + Manual review cost + Failure handling cost.
For scenarios where the cost of different errors varies greatly, risk-weighted costs should also be considered, rather than assuming all failures incur the same loss.
6. Balancing Quality, Latency, and Budget via Engineering Design
6.1 Routing by Task Complexity
Not all requests need to use the same processing path. Format conversion, short text classification, and simple information extraction can use a low-latency path; complex reasoning, cross-document analysis, and high-risk explanations enter a stricter processing flow.
The routing strategy itself also needs evaluation, especially checking the proportion of complex tasks incorrectly assigned to the simple path. Saving call resources cannot come at the cost of missing critical risks.
6.2 Controlling Invalid Information in Input and Output
On the input side, reduce repeated context, prioritize providing materials relevant to the current task, and retain necessary conditions and evidence. On the output side, explicitly request conclusions, basis, and uncertainties to avoid meaningless long铺垫.
But compressing context cannot destroy the information chain required for the task. For tasks like contract analysis and policy interpretation, excessive deletion might be more dangerous than increased resource consumption.
6.3 Separating Generation Results from Execution Actions
Tool calling tasks should not rely solely on the model’s generation accuracy to ensure operational safety. The system needs to independently verify parameter types, value ranges, permissions, execution preconditions, and whether the operation is repeatable.
For high-risk actions, human confirmation, audit logs, and failure rollback mechanisms should be set. Read-only queries and write operations should also employ different control intensities.
6.4 Setting Acceptable Fallback Paths
When the model responds too slowly, exceeds budget limits, or fails result validation, it can switch to asynchronous processing, manual review, or a limited-scope answering mode.
Fallback plans need to be defined in advance, not decided temporarily after a production failure occurs. For tasks that cannot be reliably completed, clearly stating limitations is usually safer than outputting unverified conclusions.
7. Adopting a Constraint-First Approach for Go-Live Decisions
Actual selection can start by setting hard thresholds, such as critical task accuracy, timeout rate, permission security requirements, and budget limits. Only solutions meeting these conditions proceed to further comparison.
Subsequently, small-scale business validation is used to evaluate user experience, manual correction rate, retry count, and final task completion cost. Post-launch monitoring continues, retaining the ability to roll back, because request distribution, input length, and operational load may all change.
Ultimately, the goal of LLM evaluation is not to find an answer that leads in all metrics, but to find a combination of capabilities that fits business constraints, controls risk, and explains costs. Accuracy, response time, resource consumption, and actual fees only become reliable technical decision bases when placed within the same reproducible methodology.
