Evaluating and Selecting LLMs: A Practical Framework for Capability Assessment and Orchestration
This article presents a practical framework for evaluating and selecting large language models based on real business constraints rather than generic rankings. It explains how to build a task tiering model, create a reproducible private evaluation set, abstract common capability differences, and combine single-model strengths into a multi-stage orchestration pipeline. You will also find guidance on cost controls, fallback chains, caching, and observability for stable production deployment.
1. The Core Problem: From “Which Model Is Best” to “How to Combine Models”
In real engineering work, asking whether a model is “across-the-board best” rarely leads to an actionable answer. Capability distribution varies across code generation, mathematical reasoning, long-context processing, multimodal generation, and creative writing. The same model can also fluctuate significantly under different prompts, temperature settings, and context lengths.
A more reliable approach is to reframe the question: given a business scenario and its constraints, how do you design an evaluation and orchestration mechanism that keeps both output quality and cost under control?
Any “overall ranking” should be treated only as a reference. What really determines production results is whether the evaluation set matches the real business distribution, whether scoring criteria are consistent, and whether the engineering side supports retries and output validation.
2. Build a Task Tiering Model
Divide tasks into four layers. The capability requirements differ substantially across them:
- Extraction and rewriting: structured information extraction, summarization, and format conversion. Requires stability, low latency, and low cost.
- Reasoning and computation: mathematical operations, logical deduction, and multi-step planning. Requires reasoning depth and self-checking ability.
- Generation and creation: copywriting, storytelling, and concept exploration. Requires natural language and controllable style.
- Multimodal: image and video generation, and joint text-image understanding. Requires generation quality and prompt adherence.
The value of tiering is that, in most business scenarios, only a small share of requests truly need top-tier reasoning. Restricting expensive models to layers 2 and 4 can significantly reduce overall spending.
3. Build a Reproducible Private Evaluation Set
The evaluation set is the foundation of model selection. Recommended practices:
- Sample real traffic: perform stratified sampling from historical requests, covering high-frequency, long-tail, and extreme inputs.
- Fix scoring criteria: define automatically measurable metrics for each task type, such as field-level accuracy, numerical answer correctness, and code unit test pass rate.
- Add human spot checks: for creative and semantic tasks, use double-blind review by two evaluators to reduce subjective bias.
- Freeze versions: put both the evaluation set and prompt templates under version control to ensure comparability across rounds.
An illustrative evaluation-driven structure:
cases = load_cases("eval/v3") # Frozen evaluation set versionresults = []for c in cases:out = call_model(c.prompt, params=c.params)results.append({"id": c.id,"score": c.metric(out), # Unified scoring criteria"latency_ms": out.latency,"tokens": out.usage.total,})report(results) # Output quality/latency/cost comparison
The key is “same question, same parameters”: compare models horizontally under the same prompt and the same parameters. Otherwise, the conclusions are invalid.
4. Abstract Summary of Capability Differences
Without pointing to any specific product, the industry commonly observes the following patterns:
- Rigor and detail stability: some models tend to answer conservatively, with more standardized formatting and terminology, making them suitable for external deliverables.
- Code and semantic understanding: some models are stronger at multi-file refactoring and understanding implicit intent, but faster generation consumes quotas quickly, so budget guardrails are needed.
- Math and parallel reasoning: some models are faster on pure computation tasks, making them suitable for batch numerical work.
- Multimodal generation: image and video capabilities have become a key differentiator, but controllability and consistency remain common challenges.
- Alignment policy differences: safety policies vary in strictness, which can cause the same request to be refused or rewritten on different models. The engineering side must provide fallbacks.
5. Orchestration: Combining Single-Point Capabilities into a Pipeline
The idea of “produce a draft first, then polish it” can be abstracted into a multi-stage pipeline:
Request -> Routing & classification -> Stage 1 (structured draft) -> Stage 2 (review/polish) -> Validator -> Response
The routing layer selects the model tier based on task labels. The validator handles format validation, terminology consistency checks, and numerical verification. For translation tasks, first use a model with stronger standardization to produce the draft, then use a model with stronger language expression to polish it. This usually works better than a single model producing the final output in one pass. Prompts should also explicitly constrain formatting habits, such as limiting the frequency of em dashes and exclamation marks, to reduce later manual rework.
6. Cost and Stability Governance
Cost includes not only subscription fees but also rework, retries, and human review. Recommended practices:
- Set quota guardrails: apply rate limits by user and by API to prevent runaway consumption at a single point.
- Caching and reuse: apply semantic caching to high-frequency repeated requests.
- Fallback chain: automatically switch to a backup tier when the primary model times out or becomes unavailable.
- Observability: track success rate, latency percentiles, and cost per task through logging services and monitoring alerts.
For cloud deployment, you can use a container platform to host inference services, object storage to store evaluation sets and artifacts, and a message queue to smooth traffic peaks and valleys, forming an elastic and auditable pipeline.
7. Conclusion
Model selection is not a one-time decision but a continuously iterated engineering capability. Teams should focus on four things: a private evaluation set, task tiering, an orchestration pipeline, and cost guardrails. Turn “which model is best” into “which pipeline is optimal under the current constraints.” Baidu AI Cloud provides general capability categories in model services and engineering support, which can serve as one of the foundations for building such an evaluation and orchestration system.
