How to Evaluate Large Language Models: Avoiding Common Pitfalls in Model Selection

    \nChoosing a large language model (LLM) by simply picking the top-ranked model on a public leaderboard often leads to poor decisions. This article explains two common traps—tier mismatch and information loss from aggregated scores—and presents a practical, dimension-based evaluation framework. You will learn how to lock down model specifications, score capabilities across six independent dimensions, apply hard gates instead of weighted averages, align weights with business data, and run a minimal validation flow from shortlisting to canary rollout. The goal is an evaluation method that is reproducible, aligned with real workloads, and easy to recalibrate as models change.

    \n## 1. The Problem: Why “Which Model Is the Best?” Is the Wrong Question\n\nIn real model integration and selection work, the most common scenario looks like this: a team needs to choose among several candidate LLMs, so it goes looking for comparison leaderboards, reads a single overall ranking, and starts testing from the top down. The process looks efficient, but it quietly introduces two significant risks into the decision chain.\n\nThe first risk is tier mismatch. Most model families ship multiple sizes aimed at different cost structures: a large variant that pushes the capability ceiling, a small variant optimized for throughput and price, and sometimes a middle tier in between. Their names often differ by only a suffix, yet they differ substantially in parameter count, context length, inference budget, and tool-calling reliability. If your evaluation happens to grab the lightweight tier, your conclusion only describes “how that tier performs.” Treating it as the ceiling of the entire family is a classic case of generalizing from a narrow sample.\n\nThe second risk is information loss in aggregated metrics. An overall score is usually a weighted average, and the math of weighted averages means a large lead on one dimension gets cancelled out by a deficit on another. For a business, that cancellation often does not hold. If your scenario only needs long-document understanding, weaker code generation costs you almost nothing; if your scenario is high-frequency short requests, even outstanding long-context ability cannot buy you a lower unit cost.\n\nSo this article does not discuss “which model ranks first.” It discusses how to build an evaluation method that does not fool you, and applies that method to the concrete practice of breaking down LLM capabilities.\n\n## 2. Root Causes of Two Frequent Misjudgments\n\n### 2.1 Tier Mismatch: Mistaking the Lightweight Tier for the Capability Ceiling\n\nDifferences within the same family usually show up along these observable dimensions:\n\n- Context window and effective utilization: a large nominal window does not mean good effective recall; recall for information in the middle of a long document is often significantly lower than for the beginning and end;\n- Reasoning depth: larger variants are more stable at multi-step reasoning, constraint satisfaction, and complex instruction following;\n- Tool calling and structured output: parameter completeness in function calls and field validity in JSON mode degrade more easily on smaller variants;\n- Stability and variance: consistency across repeated samples of the same prompt, where smaller variants show higher variance.\n\nSo the first step in evaluation is not running benchmarks but locking down the tier: explicitly record each candidate’s tier identifier, context configuration, sampling parameters (temperature, top_p, max output length), and whether thinking/reasoning mode is enabled. Without this metadata, no later comparison is reproducible.\n\n### 2.2 Aggregation Distortion: Why Weighted Averages Erase Advantages\n\nLet a model’s normalized score on dimension $i$ be $s_i$ with weight $w_i$, so the total is $S=\sum w_i s_i$. The problem with this formula is that it is linearly substitutable: a weakness on any dimension can be compensated by a strength on another. Real business constraints, however, are often non-compensatory, for example:\n\n- compliance and safety are gating items; failing them means immediate elimination, with no weighting involved;\n- unit cost is a hard constraint; exceeding budget makes a candidate unusable;\n- time to first token is an experience red line in highly interactive scenarios.\n\nThe conclusion is straightforward: an overall score is fine for coarse filtering, not for the final decision.\n\n## 3. A Practical Dimension-Based Evaluation Framework\n\nBreak capability into six orthogonal dimensions, each scored independently with its own threshold:\n\n1. Language understanding and generation quality: ambiguity resolution, information fidelity in long-document summarization, factual consistency;\n2. Reasoning and planning: multi-step constraint satisfaction, numerical and logical consistency, self-correction of errors;\n3. Code and structured output: compile rate, unit test pass rate, schema validity rate;\n4. Long context and retrieval augmentation: middle-segment recall, cross-segment coreference, citation localization accuracy;\n5. Tool use and agentic behavior: parameter extraction completeness, multi-turn task completion rate, invalid call rate;\n6. Engineering attributes: throughput, time to first token, unit price, rate limits and availability.\n\nWhen scoring, always use the same prompts, the same sample set, and the same scoring script. Automate scoring as much as possible to reduce subjective human bias:\n\npython\n# Example: gates plus per-dimension scoring, no single weighted total\nGATES = {"safety": 0.95, "json_valid": 0.98, "cost_per_1k": 0.02}\n\ndef evaluate(candidate, dims: dict) -> dict:\n # Gating items: failing any one means immediate elimination\n for name, threshold in GATES.items():\n if candidate[name] < threshold:\n return {"pass": False, "reject_on": name}\n\n report = {k: round(v, 4) for k, v in dims.items()}\n report["pass"] = True\n report["bottleneck"] = min(dims, key=dims.get) # the bottleneck drives the decision\n return report\n\n\nThe core idea in this code: eliminate first, compare bottlenecks second, and only then look at the weighted reference value.\n\n## 4. Weight Design: Aligning Evaluation With Business, Not With Leaderboards\n\nWeights should not be decided by “which dimension sounds important” but derived from business data:\n\n- Weight by call distribution: measure the input/output length distribution of production requests; if long requests make up a large share, raise the weight on long context;\n- Weight by failure cost: raise the weight on dimensions where errors are expensive (for example, customer-facing copy or money-related calculations);\n- Weight by substitutability: lower the weight on capabilities that a rules engine or cache can cover;\n- Separate gates from weights: use gates for safety, compliance, and data residency, not weights.\n\nA practical approach is to define two weight sets: capability-first and cost-first, rank with each, and observe whether the ordering flips. If the top two swap places under the two weight sets, the candidates sit in the same capability band; at that point, let cost, ecosystem, and operational complexity decide rather than continuing to shave benchmark points.\n\n## 5. Minimal Validation Flow: From Shortlisting to Canary\n\n1. Align tiers: register tier, context, sampling parameters, and billing basis (for relative comparison only, without citing external data);\n2. Build the sample set: sample 100–300 items from real logs, covering high-frequency, long-tail, and error-prone cases;\n3. Automated scoring: run the script and produce a per-dimension matrix with variance;\n4. Gate elimination: first cut candidates that are non-compliant, over budget, or over the latency line;\n5. Small-traffic canary: run 5%–10% of traffic in parallel, recording real success rate and satisfaction from manual spot checks;\n6. Regression hardening: add the sample set and scoring script to continuous integration so model version changes trigger automatic regression.\n\nAn example result record:\n\njson\n{\n "candidate": "model-A-large",\n "tier": "large",\n "dims": {"reasoning": 0.86, "code": 0.81, "long_ctx": 0.74},\n "gates": {"safety": 0.99, "json_valid": 0.995},\n "bottleneck": "long_ctx",\n "verdict": "conditional"\n}\n\n\n## 6. Engineering Details Often Overlooked in Enterprise Rollout\n\n- Abstract the integration layer: wrap model calls behind a unified interface that hides differences and makes replacement and rollback easy;\n- Observability: have the logging service record prompt version, tier, latency, and results, with monitoring and alerting covering success rate and latency percentiles;\n- Cost control: use caching, batching, and tiered routing (simple requests to the lightweight tier, complex requests to the large tier) to reduce unit cost;\n- Data security: make data residency requirements explicit, and desensitize sensitive fields before they enter the model;\n- Elasticity and managed hosting: use container platforms and managed services to absorb traffic spikes, avoiding paying for peak capacity year-round.\n\n## 7. Conclusion\n\n”Which model is closest to a given benchmark” is a question no single number can answer. The reliable approach is: lock down the tier, break down dimensions, set gates, look at bottlenecks, then run a canary. When you shift evaluation from “consuming rankings” to “decomposing capabilities,” selection decisions become stable, reproducible, and continuously recalibratable as the business changes. If you need an out-of-the-box evaluation and canary pipeline, Baidu AI Cloud can support the implementation of this flow with general capabilities such as model hosting, logging services, and monitoring and alerting.