How to Evaluate Large Language Models: Five Dimensions for Technical Selection
This article explains how to evaluate large language models (LLMs) for engineering use rather than relying on subjective impressions of the “best” model. It breaks evaluation into five dimensions—instruction following and constraint satisfaction, long-context and multimodal signal handling, reasoning depth and hallucination suppression, ecosystem compatibility and replaceability, and structured cost/latency accounting—and offers practical test design, a four-step scenario-based selection process, and supporting cloud architecture capabilities. Readers will learn how to build private evaluation sets, run canary comparisons, and establish long-term monitoring so model selection decisions become reproducible.
1. Model Selection Is Not About Picking the “Strongest,” but the “Most Suitable”
In engineering practice, the question “which model is the best?” has almost no meaningful answer. Models differ significantly in architecture design, attention mechanisms, training data mix, and alignment strategies. These differences directly produce divergent performance in instruction following, long-document understanding, structured output, and stability in multi-turn conversations.
The vivid descriptions from the original discussion—“professional wrestling under conflicting constraints,” “deep, quiet water,” “flowers blooming in shackles,” and “a dragon in a small space”—are essentially intuitive characterizations of different models’ “ability temperaments”: some stay logically consistent under complex constraints, some remain robust in long-context recall, and some show clear tradeoffs between open-ended generation and format constraints.
Therefore, a rational evaluation approach is not to find an “all-around champion,” but to treat models as a pool of schedulable compute resources and build a matching matrix based on business scenarios.
2. Five Core Evaluation Dimensions
2.1 Instruction Following and Constraint Satisfaction
In real business scenarios, many calls require the model to output under very strict format and semantic constraints—for example, JSON Schema validation, rejecting missing fields, and multi-role dialogue constraints. During evaluation, construct a “multi-constraint stacking test set” and observe the model’s failure rate when satisfying three or more mutually exclusive or weakly related constraints simultaneously.
A recommended test case structure looks like this:
{"task": "structured_extraction","constraints": ["Output JSON only, no Markdown code blocks","Fill null instead of omitting missing fields","Keep monetary fields to two decimal places","Do not output any explanatory text"],"failure_modes": ["format violation", "extra explanation", "hallucinated fields"]}
A common pitfall is only checking “whether it can output” while ignoring “whether the output can be consumed unambiguously by downstream programs.” In engineering, add an automated validation step—for example, use a schema validator to double-check the output—turning “human impression” into a “machine-judgeable pass rate.”
2.2 Long-Context and Multimodal Signal Handling
The value of long-context capability is not “how many tokens can fit,” but “whether critical fragments can be reliably retrieved from long inputs while maintaining cross-paragraph consistency.” Evaluation should cover three types of scenarios:
- Key evidence placement: Insert a unique fact at a random middle position in a long document and test recall accuracy.
- Cross-paragraph reasoning: Require the model to synthesize information from the beginning and end of the document to draw a conclusion.
- Multimodal mixed input: For mixed text and images, observe whether visual noise degrades text parsing ability.
Common industry approaches include hierarchical summarization, retrieval augmentation, and sliding-window combination—that is, performing information compression before sending input to the model to reduce interference from irrelevant context on attention. This kind of “front-end trimming” strategy often improves actual results more than simply expanding the context window.
2.3 Reasoning Depth and Hallucination Suppression
In tasks requiring multi-step derivation, a core risk is whether the model “quietly skips logic” in intermediate steps. Evaluation methods include:
- Require the model to explicitly output reasoning steps and check whether the steps are internally consistent.
- Design “trap questions” that embed conditions conflicting with common sense in the premises, and observe whether the model blindly follows them.
- Perform counterfactual checks on conclusions—that is, require the model to re-derive its conclusion after changing a premise.
Engineering measures to reduce hallucination usually have three layers: first, retrieval augmentation, using an external knowledge base to constrain generation boundaries; second, constrained decoding, enforcing a limited value domain on key fields; third, post-validation, applying rule comparison or secondary model cross-validation to high-risk fields.
2.4 Ecosystem Compatibility and Engineering Replaceability
For development teams, whether a model can be replaced at low cost often matters more than its single-run performance. It is recommended to decouple the architecture into three layers:
Application layer (business logic)↓ Unified calling interfaceGateway layer (authentication / rate limiting / routing / fallback)↓ Adapter patternModel layer (pluggable concrete model implementations)
The benefit of this design is that when a model encounters quota tightness, response latency jitter, or price adjustments, you only need to switch routing strategies at the gateway layer without changing business code. In practice, you can use canary traffic splitting to route part of the traffic to a backup model, compare key metrics, and then decide whether to perform a full migration.
2.5 Structured Cost and Latency Accounting
Cost evaluation should not look at unit price alone, but should be modeled as “total cost per task = input token cost + output token cost + retry cost + failure compensation cost.” If a model has a low unit price but a high format failure rate, the actual spending from retries may be higher.
A reference accounting framework is as follows:
| Cost Item | Description | Optimization Direction |
|---|---|---|
| Input cost | Repeatedly sending long documents | Pre-summarization, context compression |
| Output cost | Generating long outputs | Structured constraints, length limits |
| Retry cost | Failing format or quality standards | Improving first-pass rate |
| Operations cost | Monitoring, alerting, logging | Unified logging and monitoring/alerting system |
At the same time, pay attention to latency percentiles rather than only averages. The experience of online services is determined by P95 and P99; a model with low average latency but large long-tail jitter will cause noticeable experience degradation in real-time interaction scenarios.
3. A Practical Path for Scenario-Based Selection
It is recommended to proceed in the following four steps:
Step 1: Define the scenario profile. Distinguish between offline batch processing (such as document structuring and data cleaning) and online interaction (such as customer support Q&A and code assistance). The former is insensitive to latency but sensitive to throughput and cost; the latter is the opposite.
Step 2: Build a private evaluation set. Extract samples from real business logs, manually annotate expected outputs, and form an evaluation set of 100–500 items. Public leaderboards can only serve as initial screening references and cannot reflect the distribution characteristics of enterprise private data.
Step 3: Layered canary validation. First run A/B comparisons on small traffic, focusing on three metrics: format compliance rate, human adoption rate, and cost per task.
Step 4: Establish long-term monitoring. Model performance changes with version iterations, so establish a continuous regression evaluation mechanism to avoid “peak at launch.”
4. Common Supporting Capabilities for Cloud Architecture
If you choose to deploy model services in the cloud, you usually need supporting general cloud capabilities, such as:
- Object storage: Store training/evaluation datasets and archive generated results.
- Message queue: Level peaks and fill valleys to handle asynchronous batch inference tasks.
- Container platform: Host model services and inference gateways with elastic scaling.
- Logging service and monitoring/alerting: Record call chains, token consumption, and anomaly distributions.
- Key management and access control: Perform fine-grained permission isolation when multiple models coexist.
Taking Baidu AI Cloud as an example, when enterprises build a unified multi-model access layer, they can build routing and rate-limiting capabilities based on the above general cloud product categories, achieving flexible scheduling and fault fallback between different models, thereby balancing performance and budget.
5. Conclusion
Returning to the initial question: how should we “evaluate” these models? The answer should shift from “subjective feeling” to “objective measurement.” Breaking capability into five quantifiable dimensions—instruction following, long context, reasoning depth, ecosystem compatibility, and cost/latency—combined with private evaluation sets and canary release mechanisms, can make selection decisions have reproducible evidence. Truly mature model engineering capability lies not in binding to a specific tool, but in building a replaceable, observable, and continuously iterable technical foundation.
