LLM Evaluation Guide: Comparing Accuracy, Latency, and Cost
Choosing a large language model requires more than comparing benchmark scores or token prices. This guide explains how to evaluate task-specific accuracy, response latency, resource consumption, and cost per successful task. It also outlines a reproducible testing process and shows how to turn evaluation results into deployment strategies that balance quality, speed, cost, and risk.
1. Define “Better” Before Choosing a Model
As large language models improve at knowledge-based question answering, reasoning, calculation, and long-document processing, developers face a question beyond whether a capable model exists: which combination of capabilities best fits the application?
“Better” is not a single metric. A model may perform well on complex reasoning tasks but take longer to generate a response. Another may respond quickly but overlook requirements in tasks with multiple constraints. A lower text-generation price does not necessarily mean a lower cost per business task. Output length, retries, human review, and external tool calls all affect the final bill.
Model selection should therefore focus on technical evaluation rather than product comparisons alone. The key questions are:
- Does the model consistently produce usable results on the target tasks?
- How long do users wait, and how slow are the slowest requests?
- How many computational and API resources are required to complete a task successfully?
- Does performance remain reliable as task difficulty, input length, and concurrency change?
Together, these answers provide a basis for selection. A single overall score cannot replace them.
2. Accuracy: Higher Scores Do Not Benefit Every Application Equally
2.1 Distinguish Correct Answers from Usable Results
For multiple-choice questions, numerical calculations, and rule-based decisions, accuracy can usually be defined as:
Accuracy = Correct samples / Valid evaluation samples
Enterprise applications often require more than a correct answer. A contract summary must cover key obligations, a customer support response must follow business rules, and document extraction must return all required fields. Fluent text may still be unusable if it omits an important condition.
Evaluate results across several dimensions:
- Correctness: Are facts, calculations, and judgments accurate?
- Completeness: Does the result include all required fields, conditions, and conclusions?
- Constraint compliance: Does it meet length, format, and business-rule requirements?
- Verifiability: Can its conclusions be supported by the supplied material?
- Risk control: Does it appropriately decline to answer or request review when evidence is insufficient or the request exceeds its authority?
Do not mechanically average these dimensions. In high-risk applications, strong writing cannot compensate for a critical factual error.
2.2 Interpret Aggregate Scores in the Context of Task Distribution
Suppose an evaluation set contains knowledge questions, education tasks, finance tasks, and reasoning problems. Overall accuracy depends on the proportion of samples in each category:
Overall accuracy = Sum of each task category’s accuracy multiplied by its sample weight
The same capability profile can lead to different conclusions under different business weights. A document-extraction system should not favor a model simply because it excels at mathematics. A system focused on complex rule-based decisions should not rely only on general-knowledge results.
Report two complementary metrics:
- Overall accuracy weighted by actual sample counts, which describes performance on the current test set.
- Accuracy weighted by the expected business task mix, which helps estimate the benefit after deployment.
If a critical category has a substantial weakness, set a separate acceptance threshold. High scores elsewhere should not hide it.
2.3 Describe Improvements Precisely
Evaluation reports should distinguish percentage-point changes from relative improvements:
Percentage-point change = New accuracy − Previous accuracy
Relative improvement = Accuracy change / Previous accuracy
These measures mean different things. Confusing them can exaggerate an improvement.
Alongside the improvement, report sample size, scoring rules, and uncertainty. When comparing two models on the same questions, prioritize paired analysis: identify which samples changed from incorrect to correct and which changed from correct to incorrect, rather than comparing only aggregate percentages.
Even when the overall score improves, check business-critical samples for new severe errors.
3. Latency: The Average Is Only a Starting Point
3.1 Break Down the Delay Users Actually Experience
A request’s elapsed time typically includes transmission, queuing, input processing, output generation, and any retrieval or external tool calls.
For streaming interactions, distinguish:
- Initial response latency: How long until the user sees the first portion of content?
- Full response latency: How long until the complete response is available?
- Task completion latency: How long until the result has been parsed, validated, or otherwise processed and is ready for use?
These metrics are not interchangeable. Streaming can improve the experience of waiting without reducing the time needed to complete the task. If a workflow must wait for every field before proceeding, full response latency is usually more relevant.
3.2 Why Average Latency Can Mislead
An average can be distorted by a small number of extremely slow requests, while still failing to describe tail latency clearly. A system may handle most requests quickly yet deliver an inconsistent experience because some requests take much longer.
At a minimum, report the median, higher latency percentiles, timeout rate, and failure rate. Higher percentiles characterize slower requests; the timeout rate shows whether the system can deliver within the application’s deadline.
Explain how failed requests are handled in the statistics. Measuring only successful requests and excluding all timeouts can make latency results look overly optimistic.
3.3 Longer Latency Does Not Necessarily Mean Lower Efficiency
Complex tasks may require longer outputs, more internal computation, or additional external processing. Higher accuracy may therefore come with longer elapsed time. However, increased latency alone does not establish that a model uses a particular reasoning mechanism.
The business question is whether the quality improvement justifies the additional wait. Offline report generation may prioritize correctness. Real-time question answering may benefit from a concise answer first, followed by further explanation when requested.
This is a workflow design decision. Not every application needs the same model configuration.
4. Token Usage and Cost: Measure Successful Tasks, Not Just Call Prices
4.1 Token Counts Are Not Character Counts
LLMs typically measure input and output in tokens. Tokenizers can split Chinese text, numbers, symbols, and structured content differently, so equal character counts do not necessarily produce equal token usage.
Track resource consumption separately for:
- Input tokens
- Output tokens
- Conversation history or other retained context
- Retry counts
- Cumulative usage across multi-step workflows
- Other usage categories listed separately in the billing model
Average tokens per call describe call size, but cannot explain actual costs on their own.
4.2 Align Cost Calculations with Billing Rules
When input and output have different prices, calculate them separately:
Base API cost = Input usage × Input unit price + Output usage × Output unit price
If prices are quoted per million tokens, convert usage to the same unit. Include batch-processing rates, caching, and other billing items only when they actually apply and have been explicitly recorded.
If average usage appears low but average cost is high, first check the scope of the statistics rather than assuming the pricing or data is wrong. Common explanations include:
- Different definitions of input and output usage
- Retry costs included in the total
- Multiple workflow steps grouped together
- Inconsistent currency or unit conversions
4.3 Cost per Successful Task Better Reflects Business Economics
Businesses need usable outcomes, not merely API calls. Add a task-level metric:
Cost per successful task = Total cost during the test period / Number of tasks meeting acceptance criteria
Costs can be reported in layers:
- Model costs: Model API charges only.
- System costs: Model charges plus retrieval, storage, and tool execution.
- Operational costs: System costs plus human review and rework.
Present these layers separately so directly measured charges are not mixed with estimated costs.
A low-priced model may not be economical if it frequently fails, requires repeated attempts, or needs manual correction. Conversely, a more expensive call may reduce rework enough to deliver a lower cost per successful task.
5. Build a Reproducible Evaluation Process
5.1 Sample Real Tasks
The test set should cover common, complex, and edge-case requests, including long inputs, multiple constraints, missing information, ambiguous wording, and format requirements.
Test not only questions the model should answer, but also requests it should not answer directly. Acknowledging uncertainty when source information is insufficient is part of reliability.
Remove sensitive information from test data. Keep evaluation samples appropriately separate from prompt-tuning samples to avoid overly optimistic results from repeatedly optimizing for a fixed set of questions.
5.2 Control Variables and Preserve Experiment Records
In comparative tests, keep inputs, prompts, output requirements, external materials, and timeout policies as consistent as possible. Record configuration versions, test dates, concurrency levels, and the runtime environment.
Two complementary approaches are useful:
- Controlled evaluation: Keep configurations as consistent as possible to examine capability differences.
- Business-optimized evaluation: Allow separate prompt and workflow optimization, while applying the same quality threshold, budget, or latency target.
The first supports analysis; the second more closely reflects deployment conditions. State which approach was used, and do not mix their results without distinction.
5.3 Combine Automated Checks with Human Review
For structured tasks, automatically validate fields, types, value ranges, and required items. Numerical questions can be checked against reference answers. Summaries and open-ended analysis need explicit scoring rubrics.
Model-generated assessments can help screen results, but should not be the only basis for judgment, especially in high-risk applications. Human review should focus on severe errors, edge cases, and results with substantial disagreement between evaluators.
The final report should include both scores and error categories, such as:
- Factual errors
- Missing conditions
- Format violations
- Insufficient supporting evidence
- Unnecessary refusals
Error classification often provides more actionable guidance for the next improvement cycle than a single overall score.
6. Turn Evaluation Results into Deployment Strategies
6.1 Use Tiered Processing Instead of One Configuration for Every Task
Simple, low-risk tasks with clear rules can use a low-latency path. Complex reasoning, multi-constraint analysis, and high-risk tasks can enter a more rigorous processing and validation workflow.
Route tasks using verifiable information, such as input length, business category, number of rules, and risk level. Do not rely solely on a model’s self-reported confidence.
6.2 Optimize Context and Output Length
Reduce irrelevant conversation history, retain necessary facts, and retrieve supporting material as needed to lower the input burden. For field-extraction tasks, explicitly request the required fields rather than lengthy explanations.
Compression must not remove critical conditions. Re-evaluate after optimization to confirm that lower costs have not introduced important omissions.
6.3 Design Fallback Paths for Failure
Production systems should define which failures can be retried and which require human handling. Temporary network errors and rate limits may justify controlled retries. Repeated factual errors on the same input are not usually fixed reliably through blind retries.
When generated results feed into subsequent business actions, add format validation, permission checks, and human confirmation where necessary. Do not treat generated language as an executable instruction without those controls.
6.4 Continuously Monitor Production Performance
Offline testing provides evidence before launch, not a permanent guarantee. After deployment, track task success rates, tail latency, costs, human correction rates, and user feedback. Run regression tests when configurations or model versions change.
Business data also changes. The best option at launch may not remain the best option over time. Evaluation should be an ongoing engineering process, not a one-time procurement exercise.
7. Conclusion: Choose the Capability Mix That Fits the Business
Determining which LLM is better starts with explicit business objectives: the required quality standard, acceptable waiting time, affordable cost, and controls needed when a task fails.
A reliable selection process follows a clear sequence:
- Define acceptance criteria and build a representative test set.
- Compare individual capabilities and calculate cost per successful task.
- Complete offline validation, then verify real-world performance through a limited rollout.
The right model does not have to lead on every metric. It must consistently complete tasks above the critical quality threshold, with acceptable latency and cost.
Evaluating accuracy, response time, resource consumption, and failure handling together makes it possible to move beyond a model that looks stronger on paper to one that delivers greater value in practice.
