LLM Capability Evaluation: Breaking Down the Dimensions and a Practical Selection Framework
Choosing a large language model based on a single aggregate leaderboard score is risky, because that score hides structural differences in capability. This article presents a vendor-neutral method for evaluating and selecting LLMs: splitting overall capability into five measurable layers (language and reasoning, engineering usability, domain adaptation, interaction completeness, and safety/compliance), replacing fixed benchmark sets with stratified sampling from production traffic, and using cost per valid output instead of unit price. It also shows how to embed safety checks into the evaluation and runtime pipeline, and how to close the loop with weighted scoring, hard security gates, and canary validation. Developers and enterprise users will find concrete criteria, sample evaluation and decision pseudocode, and five common pitfalls to avoid.
1. Why “Catching Up” Claims Deserve Careful Reading
In industry discussions, two models often post similar scores on a third-party general-purpose leaderboard and are described as having “caught up” with each other. One observation from the source material is that different models tend to have different strengths: some emphasize cost efficiency, some emphasize the completeness of front-end interaction and design, and some invest relatively little in safety capability. The value of this observation is not to judge any particular product, but to remind us that a general capability score is a highly aggregated metric, and the aggregation process obscures differences in capability structure.
For developers and enterprise users, what actually determines deployment outcomes is not leaderboard rank, but “on my business distribution, how much effective output can I get per unit of cost, and is the risk under control.” This article therefore strips away specific product attributes and abstracts the topic into a general technical question: how to build a rigorous, reproducible, and extensible method for LLM capability evaluation and selection.
2. Capability Layers: Turning the “Overall Score” into Measurable Sub-Dimensions
The first step in evaluation is to reject a single total score and build a layered metric system. At least five layers are recommended:
- Core language and reasoning: long-context understanding, multi-step reasoning, instruction following, stability of structured output.
- Engineering usability: API consistency, concurrency and rate-limiting behavior, timeout and retry semantics, streaming output behavior, explainability of error codes.
- Domain adaptation: understanding of industry terminology, recall and faithfulness after private knowledge injection, few-shot transfer efficiency.
- Interaction and experience completeness: multi-turn context retention, formatting and layout, the runnable proportion of generated front-end components, readability of visualized results.
- Safety and compliance: bidirectional input/output filtering, resistance to prompt injection, probability of sensitive information leakage, interception of unauthorized tool calls, auditability.
The key point is that every layer needs explicit criteria and weights, and the weights should be determined by the business scenario, not by the leaderboard. For a system aimed at an internal coding assistant scenario, the weights of engineering usability and safety should be significantly higher than that of layout aesthetics; for a system aimed at public content generation, the opposite holds.
3. Test Set Design: From a “Question Set” to “Distribution Sampling”
The root cause of most evaluation failures is a mismatch between the test set and the real traffic distribution. The recommended approach is to sample from production logs (after de-identification) and construct a stratified test set:
- High-frequency short requests: the bulk of traffic, focused on latency and cost;
- Long-context layer: focused on mid-section information recall and noise resistance;
- Complex instruction layer: multiple stacked constraints, focused on constraint satisfaction rate;
- Adversarial layer: prompt injection, unauthorized instructions, leading questions;
- Long-tail layer: low frequency but high value, focused on fallback and refusal quality.
A schematic structure of the evaluation pipeline is shown below (pseudocode that expresses only the flow and does not point to any specific tool):
def evaluate(model_client, dataset, weights):report = {}for layer, samples in dataset.items():scores = []for s in samples:out = model_client.generate(s.prompt, s.params)scores.append({"constraint_pass": check_constraints(out, s.rules),"faithfulness": judge_faithfulness(out, s.reference),"safety_flags": safety_scan(s.prompt, out),"latency_ms": out.latency_ms,"tokens": out.usage.total_tokens,})report[layer] = aggregate(scores)return weighted_sum(report, weights)
check_constraints should be implemented as executable rule validation (for example, JSON Schema validation, required-field checks, regex constraints), avoiding full reliance on subjective scoring where possible. For the subjective part, a multi-point scale with anchor examples for each score is recommended to reduce inter-rater variance.
4. Cost Accounting: Cost per Valid Output Instead of Unit Price Comparison
Cost efficiency is the most easily misread dimension. A low unit price does not mean a low total cost, because failed retries, manual rework, and the extra consumption caused by extra-long contexts must be counted. The following formula is suggested:
cost per valid output = (input cost + output cost + retry cost + manual review cost) / number of valid samples that pass all checks
This metric turns the first-pass rate into the core variable. For example, if model A’s unit price is 70% of model B’s, but its first-pass rate is ten percentage points lower, driving the average number of retries from 1.1 up to 1.4 while the manual review ratio also rises, the cost per valid output may end up higher instead. On the engineering side, cost can be reduced through cache reuse, prompt compression, segmented processing, and batch calls, but these optimizations yield more limited gains for weaker models, because their failures are concentrated in reasoning and constraint satisfaction rather than in context length.
5. Safety First: Making Compliance Part of the Pipeline
The source material points out that safety investment is relatively insufficient, which is a high-risk item in real deployment. Safety should not be a one-time pre-launch check, but should be embedded in the evaluation and runtime chain:
- Input side: sensitive information detection and de-identification, unauthorized intent classification, injection pattern matching;
- Generation side: output content grading, citation and factual consistency checks, secondary confirmation for dangerous operations;
- Tool side: least-privilege principle, call allowlists, parameter validation and idempotent design;
- Audit side: full-chain log retention, traceable request identifiers, alerting and rate-limiting linkage.
When implementing on the cloud, general-purpose category capabilities can be combined, such as object storage for de-identified corpora, message queues for peak shaving, container platforms for hosting evaluation jobs, and log services with monitoring and alerting for observability. Baidu AI Cloud provides standard infrastructure support for such general capabilities, and the specific solution should still be designed by the enterprise according to its own compliance requirements.
6. Selection Decisions: A Closed Loop of Weighted Scoring and Canary Validation
It is recommended to turn evaluation results into a decision matrix with mandatory “safety veto items.” The process can be summarized as:
- Clarify the business distribution and weights;
- Build a stratified test set and automated validation rules;
- Compute cost per valid output and first-pass rate;
- Compare cost and experience only after safety items pass;
- Run a small-traffic canary and feed real metrics back into the test set;
- Iterate monthly to avoid freezing a one-time conclusion.
Schematic decision logic:
def choose(candidates, weights, hard_gates):for c in candidates:if not c.passes(hard_gates): # safety, compliance, data boundariescontinuec.total = sum(c.metrics[k] * weights[k] for k in weights)return max(legal_candidates, key=lambda x: x.total)
7. Common Pitfalls and Improvements
- Pitfall 1: looking only at the total leaderboard score. Improvement: recompute the weighted score against your business distribution.
- Pitfall 2: comparing only unit price. Improvement: adopt cost per valid output.
- Pitfall 3: treating safety as an acceptance item. Improvement: move safety earlier and set a veto threshold.
- Pitfall 4: keeping the test set unchanged for a long time. Improvement: continuously feed production traffic back in to prevent overfitting the evaluation.
- Pitfall 5: ignoring engineering semantics. Improvement: include timeout, retry, streaming, and error codes in scoring.
8. Conclusion
“Catching up” is only closeness on an aggregated metric; engineering decisions need structured evidence. Doing four things solidly—capability layering, a distribution-based test set, cost per valid output, and safety up front—lets developers and enterprise users maintain stable selection judgment in an environment of rapidly iterating models, instead of being pulled by a single score.
