LLM Evaluation Methodology and Scenario-Based Model Selection Practices
This article presents a practical methodology for evaluating large language models beyond public leaderboard rankings. It defines a four-dimension metric system covering accuracy, latency, token consumption, and cost, plus derived cost-efficiency indicators, and shows how to interpret cross-version changes when capability gains and regressions occur unevenly. It also outlines a reproducible five-step evaluation workflow with regression gates, additional test design for AI agent scenarios, and routing and fallback strategies for model selection.
1. Why Leaderboard Rankings Are Not Enough for Model Selection
When teams move from demos to large-scale LLM applications, they often hit an awkward gap: the demo looks great, but in production the model answers the wrong question, fails tool calls, or times out on long task chains. The root cause is usually not that the model is “bad,” but that the evaluation criteria do not match real business criteria.
A typical Chinese-language general capability evaluation covered roughly 15,000 questions across dimensions including education, healthcare and mental health, finance, law and public administration, reasoning and math, language and instruction following, and agents and tool calling. The value of such an evaluation is not a single overall score. It is exposing the capability structure: two models with similar total scores can differ by more than ten percentage points on instruction following and tool calling, and those two dimensions often determine whether agentic applications run reliably.
The evaluation boundary must be explicit. If the test set emphasizes general Chinese knowledge Q&A, then the coding, complex search, and office automation capabilities that vendors highlight may not be reflected at all. Evaluation conclusions must match the target scenario; a ranking detached from the scenario has almost no decision value.
2. Metric System: Four Dimensions and One Derived Metric
1. Accuracy (Effectiveness)
Accuracy is the most intuitive but also the most misread metric. It is affected by question difficulty distribution, scoring method (rule matching, model judging, or human spot checks), and whether multi-turn retries are allowed. For cross-version comparison, the question set, scoring scripts, and temperature parameters must be identical; otherwise a change of a few percentage points may be pure noise.
2. Response Latency (Experience)
Average time per call determines the interaction experience. Averages are pulled up by long-tail requests, so report P50, P90, and P99 alongside the mean. For streaming output, time to first token matters more to user perception than total duration.
3. Token Consumption (Efficiency)
Average tokens per call reflect the information density of the inference chain. At the same accuracy, fewer tokens mean lower cost and shorter queue times. If a model tends to emit long reasoning traces, token usage rises sharply, and this hidden cost is amplified in batch workloads.
4. Cost per Call (Economics)
Cost per thousand calls is the combined result of effectiveness and efficiency, and can be approximated as:
# Generic estimation logic for single-call cost (illustrative, not any vendor's billing rule)cost_per_call = (input_tokens * price_in + output_tokens * price_out) / 1_000_000cost_per_1k = cost_per_call * 1000
5. Derived Metric: Cost Efficiency
Two derived metrics are worth introducing: cost per unit of accuracy and cost per unit of effective task. The first is for coarse screening; the second is for the final decision. The latter must factor in retry rate and failure rate, otherwise the real return of a cheap model is overestimated.
3. Cross-Version Comparison: How to Read the Changes Correctly
In one cross-version evaluation, the new version’s total score rose from 63.6% to 65.7%, moving up 16 places in the ranking; average latency dropped from 111 seconds to 53 seconds, about 52%; average tokens fell from 3525 to 3307, about 6.2%; and cost per thousand calls dropped from 28.1 to 26.3, about 6.4%.
Three rigorous conclusions can be drawn from this data:
- Latency improved far more than cost, indicating the speedup came mainly from the inference chain and scheduling efficiency, not from simply compressing output length.
- Tokens and cost declined slightly in tandem, which is an efficiency improvement rather than a capability cut, because accuracy rose at the same time.
- Structural divergence is clear: healthcare and mental health, law and public administration, and education improved by about 3.2, 2.7, and 2.3 percentage points; agents and tool calling improved by about 10.6 percentage points; while finance dropped about 5.5 percentage points and language and instruction following dropped about 3.5 percentage points.
Divergence is a common result of reinforcement-learning-style optimization: a model is significantly strengthened on specific capability axes while slightly regressing on others. The engineering answer is not to wait for an all-around model, but to build routing and fallback mechanisms.
4. A Reproducible Evaluation Workflow in Five Steps
- Define scenario weights. Weight each dimension by business traffic; for example, a customer service scenario raises the weights on instruction following and tool calling.
- Freeze the evaluation configuration. Fix the question set, scoring scripts, decoding parameters, and system prompts, and put them under version control.
- Use stratified sampling and statistics. Record percentiles and confidence intervals in addition to means to avoid misjudgments from small samples.
- Add regression gates. Set thresholds on key metrics in the CI pipeline and block the release when a metric regresses.
- Validate with canary and real traffic. Confirm offline conclusions with a small traffic share, and monitor failure rate and human takeover rate.
An illustrative gate configuration:
regression_gate:accuracy_min: 0.65p90_latency_ms_max: 90000token_per_call_max: 3500tool_call_success_min: 0.90
5. Additional Design for Agent Scenarios
The success or failure of agentic applications concentrates on tool calling and task decomposition. The evaluation should additionally cover parameter structure validity, error recovery, multi-turn context consistency, and timeout and retry strategies. In engineering, a three-layer structure works well: capability routing plus result validation plus failure fallback. First select a model by task type, then validate output with rules or a lightweight checker, and finally fall back to a backup model or a human process.
On the infrastructure side, the common approach is to run inference services with elastic scaling on a container platform, use a message queue to smooth traffic peaks, archive evaluation datasets and results in object storage, and track latency percentiles and failure rates with logging and monitoring alerts. If multi-model coordination is needed, a unified model gateway can be built on top of general capabilities from Baidu AI Cloud to handle traffic distribution, quota control, and full-chain tracing.
6. Conclusion
The purpose of evaluation is to define decision boundaries, not to crown a champion. Cross-version comparison must look at all four curves at once: effectiveness, latency, tokens, and cost, and must state the capability blind spots the test set does not cover. For dimensions where capability regresses, solve it with routing and fallback rather than waiting for a perfect model. Embedding evaluation into CI and canary processes turns a model upgrade into a controlled engineering change instead of a gamble.
