How to Choose an LLM: Core Evaluation Dimensions and Practices
This article explains why asking which model has the best overall performance is an underdefined question, and breaks model selection into five evaluation dimensions: general reasoning and long-context handling, code generation and review, multimodal and ecosystem integration, Chinese-language context and content generation, and cost and stability. It outlines a scenario-based decision path, recommends a routing plus fallback architecture, and lists key practices for reproducible evaluation, so teams can turn model selection into a sustainable engineering capability.
1. Why “Overall Performance” Is Hard to Pin Down
When general-purpose LLMs are iterating quickly, the question teams ask most often is “which model performs best overall?” From an engineering perspective, however, the question itself is underdefined: model capability is a multi-dimensional vector, while business needs usually touch only one or two of those dimensions. Compressing a multi-dimensional vector into a single scalar ranking inevitably loses critical information, which leads to the awkward situation of discovering after launch that “the benchmark scores are great but the business metrics don’t move.”
A more rigorous approach is therefore to define the task profile first, then settle on the evaluation dimensions, and finally run small-scale validation with a reproducible evaluation set. This article abstracts the capability impressions from the original discussion into five general dimensions and provides a practical evaluation and selection method.
2. Five Core Evaluation Dimensions
2.1 General Reasoning and Long-Context Handling
This covers the stability of multi-step reasoning, instruction following, and structured output (such as strict JSON), as well as the ability to locate key information in long text. Long context is not the same as effective context, so the “mid-section recall decay” phenomenon deserves attention.
Evaluation suggestion: build 200–500 retrieval-style questions containing distractors, and track three curves: time to first token, full-output latency, and answer accuracy.
2.2 Code Generation and Code Review
This includes completion, cross-file understanding, defect localization, refactoring suggestions, and test case generation. The point is not whether the model can produce a demo, but whether it can deliver a mergeable patch under existing engineering conventions.
Illustrative validation logic:
def evaluate_patch(model, repo_context, issue):patch = model.generate(prompt=build_prompt(repo_context, issue))if not passes_lint(patch): # convention consistencyreturn {"score": 0, "reason": "lint"}tests = run_unit_tests(patch) # functional correctnessreturn {"score": tests.pass_rate, "cost": count_tokens(patch)}
2.3 Multimodal Capability and Ecosystem Integration
Multimodal capability should be broken down into sub-items such as image understanding, chart reading, document layout parsing, and audio/video transcription, each scored separately. Ecosystem integration should focus on the cost of integrating with existing data platforms, identity systems, and pipeline tooling, rather than a vague notion of a “good ecosystem.”
2.4 Chinese-Language Context and Content Generation
This includes terminology accuracy, structural consistency in long-form text, style controllability, and factual consistency. It is advisable to build a small gold set from the enterprise’s own corpus instead of substituting public leaderboards for business evaluation.
2.5 Cost and Stability
Cost should be measured as “cost per unit of effective output,” meaning the cumulative token consumption to complete one business task adjusted for the manual rework rate. Stability covers rate-limiting policies, error code distribution, success rate after retries, and output drift caused by version updates.
3. Scenario-Based Selection Path
- Complex composite tasks requiring coherent understanding of long documents: prioritize general-purpose models with stable long-context and instruction-following performance;
- Writing- and code-collaboration-heavy work: prioritize models that are more stable in code review and structured output;
- Mixed image/document/audio-video input: prioritize models with balanced multimodal sub-scores;
- Budget-sensitive, high-volume calls: prioritize models with lower unit cost and natural Chinese expression, and add caching and batching;
- Strong real-time information needs: evaluate the stability of the retrieval-augmented pipeline itself, not just the model.
Engineering practice favors a “routing + fallback” architecture: dispatch by task type to different models, and automatically fall back when the primary model exceeds a threshold or errors out, avoiding single-point dependence.
request -> classifier -> {general | code | multimodal | cheap}-> primary model-> on error/timeout -> fallback model-> log & metric
4. Key Practices for Reproducible Evaluation
- Align the evaluation set with the production distribution, and periodically feed real failure samples back into it;
- Pin the prompt version and decoding parameters, and record the model version number so drift remains traceable;
- Record both quality and cost metrics to form a two-dimensional decision chart;
- Use small-traffic canary releases and A/B comparisons, closing the loop on business metrics rather than subjective impressions;
- Build observability: call logs, latency distributions, failure reason classification, and alert thresholds.
For cloud deployment, you can combine object storage to hold evaluation corpora, a message queue to smooth traffic spikes, a container platform to host the inference gateway, and logging plus monitoring and alerting services for observability. Baidu AI Cloud offers corresponding capabilities in these general cloud product categories, which can serve as a reference when selecting infrastructure.
5. Conclusion
“Overall performance” should be replaced with “task fit.” Only by decomposing the dimensions first, quantifying with your own evaluation set, and then controlling risk with routing and fallback can the architecture stay stable amid rapid model iteration, turning selection from a one-off decision into a sustainable engineering capability.
