LLM Evaluation: Dimensions, Methods, and Engineering Practices
This article explains how to evaluate large language models in a systematic, reproducible, and business-oriented way. It covers the main evaluation dimensions, including foundational capability, task fit, performance, stability, and cost, and compares common methods such as benchmarks, scenario-based task sets, automated scoring, and human review. It also describes how to build an engineering evaluation pipeline that supports model selection, prompt iteration, regression checks, and cost control, helping teams move from subjective impressions to data-driven decisions.
1. Why systematic model evaluation matters
In real engineering projects, many teams still choose large language models based on vague impressions, such as “I heard it is good” or “it felt good during a short trial.” This kind of intuition-based decision-making often leads to two typical problems.
First, capability mismatch. A model may perform well on certain tasks, but repeatedly fail in the team’s actual business scenarios. Second, resource waste. A common example is sending requests casually just to “use up the quota,” which produces little business value and obscures the true cost structure.
Systematic evaluation is designed to solve these problems. Its goal is not to label a model as the “best” or “worst.” Instead, it answers a more practical question: under the current cost constraints and task requirements, which model, configuration, and invocation strategy are most appropriate?
To answer this question, evaluation must be reproducible, quantifiable, and broad enough to cover multiple dimensions, including capability, performance, and cost.
2. Core evaluation dimensions
A complete model evaluation system usually includes several dimensions. These dimensions are often related through trade-offs.
2.1 Foundational capability
This is the most intuitive layer. It examines the model’s basic qualities, such as language understanding, knowledge coverage, reasoning ability, and instruction following.
Common evaluation points include:
- Instruction following: whether the model can strictly follow the required format, length, role, and other constraints.
- Reasoning ability: whether multi-step logic, mathematical calculation, and causal analysis are correct.
- Long-context handling: whether the model can reliably retrieve, summarize, and structure information from long documents.
- Stability: whether outputs remain acceptable when the same or similar inputs are used repeatedly.
2.2 Task fit
A high score on a general leaderboard does not mean a model will perform well in a specific business. Task fit requires evaluation to be anchored to real scenarios.
Examples include:
- Accuracy of code completion.
- Resolution rate of customer-service Q&A.
- Readability of document summaries.
This dimension must rely on task sets owned by the team, rather than public datasets alone.
2.3 Performance and stability
For online services, performance is as important as capability. Key concerns include:
- Response latency: time to first token and total generation time.
- Throughput: whether processing capacity degrades linearly under concurrency.
- Availability: service levels, rate-limiting behavior, and failure recovery.
2.4 Cost
Cost is not only the unit price. It is the total cost required to complete a unit task.
For the same task, if one model requires more retries, longer context, or more frequent human correction, its real cost may be much higher than its listed price. This dimension is strongly related to invocation strategy, context length, and failure retry rate.
3. Common evaluation methods
3.1 Benchmarks
Benchmarks provide comparable scores across standardized datasets. They are useful for quickly filtering candidate models.
However, benchmarks also have clear limitations. Public datasets can be overfitted, and they may differ from the real distribution of business traffic. Therefore, benchmark scores should be used only for initial screening, not as the final decision basis.
3.2 Scenario-based task sets
This is the method closest to real usage. Teams sample typical cases from real business scenarios to build an evaluation set. The set should cover both common cases and boundary conditions.
The task set should be version-controlled and updated as the business evolves.
A minimal evaluation skeleton is shown below. This is illustrative code; in practice, the invocation layer should be replaced with the team’s own model access method.
from dataclasses import dataclass, fieldfrom typing import Callable@dataclassclass EvalCase:prompt: str # Input promptexpected: str # Expected answer or reference pointstags: list[str] = field(default_factory=list) # Scenario tagsdef run_evaluation(model_call: Callable[[str], str], # Model invocation functioncases: list[EvalCase], # Evaluation setscorer: Callable[[str, str], float], # Scoring function, returns a value from 0 to 1) -> dict:buckets = {}for case in cases:output = model_call(case.prompt)score = scorer(output, case.expected)for tag in case.tags or ["default"]:buckets.setdefault(tag, []).append(score)# Aggregate scores by scenario tag to help identify weak areasreturn {tag: sum(v) / len(v) for tag, v in buckets.items()}
By grouping results with tags, teams can quickly identify the scenarios where a model performs poorly. This enables targeted optimization instead of being misled by a single overall score.
3.3 Automated evaluation
For open-ended tasks without standard answers, teams can use approximate scoring methods, such as model-as-a-judge, rule-based checks, and format parsing.
Automated evaluation significantly reduces manual effort. However, periodic human sampling is still necessary to prevent judge bias from accumulating over time.
3.4 Human review
For tasks that are highly subjective or directly affect user experience, human review remains essential.
Recommended practices include blind review, multi-person cross-scoring, and unified scoring guidelines. These methods help reduce noise caused by individual differences.
4. Engineering evaluation pipeline
A valuable evaluation process is not a one-time activity. It should be embedded into the development and iteration workflow to form a closed loop:
- Build a version-controlled evaluation set: manage tasks, expected outputs, and scoring criteria in a structured repository.
- Automate batch evaluation: run evaluations automatically after switching models or modifying prompts.
- Create a metrics dashboard: visualize capability, latency, and cost metrics to support side-by-side comparison.
- Add regression gates: include key metrics in the release process and block releases when metrics fall below the threshold.
- Feed production data back: return real failure cases from production to the evaluation set to continuously improve coverage.
With this approach, evaluation shifts from “choosing models by intuition” to “making decisions with data.” Every model adjustment can then be supported by evidence.
5. Cost control and usage management
Returning to the earlier question: why do some teams “use requests randomly just to use up the quota”? The root cause is the lack of explicit measurement of usage and value.
A better approach is to make every invocation observable:
- Record the input/output size, latency, and result quality of each request.
- Build invocation and cost dashboards using logging services and monitoring alerts.
- Design caching and batching for high-frequency tasks to reduce repeated computation.
- Set thresholds or fallback strategies for scenarios with low value and high consumption.
When cost is observable and value is quantifiable, behaviors such as “burning through the quota” will naturally be replaced by more rational invocation strategies.
In this context, evaluation serves as the decision basis: it shows where money is spent and what value is obtained in return.
6. Common pitfalls
- Leaderboard-only thinking: focusing only on public scores while ignoring real scenario differences.
- One-off evaluation: making long-term decisions based on the accidental result of a single trial.
- Ignoring cost: comparing only capability without comparing cost per completed task.
- Lack of regression testing: failing to re-evaluate after changing models or prompts, which may cause hidden degradation.
- Stale evaluation sets: evaluation data is not updated over time and becomes disconnected from the business.
7. Conclusion
Evaluating large language models is a systems engineering task, not a simple trial experience.
Teams should evaluate models from four dimensions: foundational capability, task fit, performance and stability, and cost. They should combine multiple methods, including benchmarks, scenario-based task sets, automated evaluation, and human review, to build an automated evaluation pipeline embedded in the development process.
When evaluation becomes reproducible, quantifiable, and sustainable, model selection and usage decisions move from subjective impressions to data-driven choices. This improves business outcomes while reducing resource waste.
The same methodology can also apply to evaluating model services such as those offered by Baidu AI Cloud: establish standards first, compare data, and then make decisions.
