A Practical Framework for Evaluating and Selecting Chinese LLMs
Selecting a large language model should be treated as an engineering problem rather than a popularity contest. This article presents a general evaluation framework for choosing among Chinese LLMs: define scenarios and constraints first, build a multidimensional assessment matrix with quantified gates, create reproducible evaluation sets, design a unified gateway architecture with observability and fallback, plan cost and capacity around per-task economics, and roll out in staged phases. It also covers common pitfalls such as relying solely on public benchmarks and ignoring prompt versioning.
A Practical Framework for Evaluating and Selecting Chinese LLMs
1. The Real Question: From “Reading Leaderboards” to “Building Standards”
As model hosting services mature, more candidate models can be onboarded quickly through unified inference APIs. This lowers the barrier to experimentation, but it also makes selection prone to two common traps: relying only on public leaderboard rankings, or making subjective judgments based on a handful of examples. Leaderboards have reference value, but sample distributions, version updates, prompt differences, and business context all affect conclusions. A single hands-on session cannot cover long-tail inputs, concurrency pressure, or edge cases.
Therefore, choosing an LLM should not remain a debate about “which one is stronger.” It should be reframed as an engineering problem: after clarifying business goals, quality thresholds, cost budgets, and compliance constraints, build an evaluation system that is reproducible, comparable, and regression-testable. Model selection is not a one-time purchase—it is the starting point of ongoing governance.
2. Define Scenarios and Constraints Before Comparing Capabilities
2.1 Task Type Determines Evaluation Focus
Different tasks demand very different capabilities. Q&A and knowledge retrieval prioritize factual consistency and citation reliability; summarization and writing emphasize structural completeness and language quality; code generation focuses on executability, boundary conditions, and safety; multi-turn dialogue depends on context retention and instruction following. Before selection, break business tasks into subtasks and define success criteria for each.
2.2 Quality Thresholds Must Be Quantifiable
“Good results” is not an acceptance criterion. Teams should define measurable metrics such as task pass rate, human adoption rate, key-field extraction accuracy, citation hit rate, and correct refusal rate. For high-risk scenarios, prioritize error types—for example, factual errors may be far less acceptable than formatting errors.
2.3 Performance and Capacity Constraints Come First
Latency, throughput, and concurrency directly affect user experience and cost. Define targets for average latency, P95/P99 latency, peak concurrency, and input/output length distributions. If the workload involves long documents, also evaluate context window size, truncation strategy, and chunking approaches.
2.4 Compliance and Deployment Form Cannot Be Ignored
Confirm early whether data leaves your environment, whether sensitive information is involved, whether private or dedicated instances are required, and what log retention and content safety policies apply. Deployment form affects integration complexity and operational cost: managed APIs suit rapid validation, while dedicated instances or private deployment better fit scenarios with strict data isolation and stability requirements.
3. Build a Multidimensional Evaluation Matrix
Construct an evaluation matrix across the following dimensions, assigning weights and gate values to each:
- Task quality: pass rate on business samples, human scores, factual consistency, instruction following, format stability.
- Inference performance: time to first token, end-to-end latency, throughput, timeout rate, long-context behavior.
- Stability and availability: error rate, rate-limiting behavior, retry success rate, impact of version changes.
- Cost: per-task cost, peak cost, overhead from retries and caching.
- Controllability: output format constraints, system prompt adherence, refusal policy, observability.
- Security and compliance: sensitive data handling, content safety, audit logs, data isolation.
- Engineering integration: API compatibility, batch calls, async tasks, monitoring and alerting, canary capability.
Weights should reflect business risk rather than being distributed evenly. For an internal knowledge assistant, factual consistency and data isolation carry more weight; for marketing copy generation, language quality and unit cost may matter more.
4. Build Reproducible Evaluation Sets and Metric Gates
The evaluation set should come from real business distributions and cover typical samples, boundary samples, and adversarial samples. At minimum, include three layers: high-frequency typical tasks, low-frequency long-tail tasks, and high-risk exceptional tasks. Fix prompt templates, parameter configurations, and scoring rules during evaluation—avoid the situation where “changing a prompt changes the conclusion.”
A schematic evaluation script:
samples = load_business_eval_set() # stratified business samplescandidates = list_candidate_models() # candidate model listreport = {}for model in candidates:for sample in samples:output = call_model(model,sample.prompt,timeout_ms=...,max_output_length=...)quality = score_quality(sample, output)record(model, quality, latency, error, cost)for model in candidates:report[model] = aggregate(quality_pass_rate,p95_latency,error_rate,cost_per_task)qualified = filter(report,quality_pass_rate >= quality_gate,p95_latency <= latency_gate,cost_per_task <= cost_gate)
Add blind testing and cross-review to reduce subjective bias. Record version numbers for prompt templates; rerun the regression set whenever the model or parameters change. Only candidates that pass all gates advance to the next stage.
5. Integration Architecture: Unified Entry, Observability, and Fallback
In production, business systems should not bind directly to a single model endpoint. A more robust approach is a unified model gateway that exposes a stable interface upward while managing candidate models, parameter templates, rate limits, and fallback logic downward. The gateway layer can handle authentication, quotas, caching, retries, circuit breaking, log redaction, and call tracing.
For evaluation and canary environments, general cloud capabilities can be combined. For example, on Baidu AI Cloud, model inference services, object storage, log services, and monitoring/alerting can be used to build an isolated evaluation environment and canary pipeline; refer to the official product documentation for specifications and pricing. The key is not any single capability, but closing the loop among evaluation data, call logs, and metric dashboards.
Focus on the following during integration:
- Versioning prompts and parameters: templates, temperature, and max output length should be managed as configuration.
- Caching and deduplication: cache repeated questions or stable summarization tasks to cut cost and latency.
- Rate limiting and circuit breaking: prevent peak traffic from overwhelming upstream services, and design degradation strategies for failed requests.
- Observability: record call volume, latency, error rate, cost, and quality sampling results.
- Fallback mechanism: when the primary model fails or quality drops, switch to a backup model or a manual workflow.
6. Cost and Capacity Planning: Calculate “Cost per Successful Task”
Cost evaluation should go beyond per-call pricing to include retries, context length, cache hit rate, human review, and operational effort. Use “cost per successful task” as the core metric—the total cost of completing one task that passes the quality gate. Capacity planning should be based on load testing, distinguishing average from peak concurrency and reserving headroom for bursts.
For deployment form, managed APIs suit rapid validation and elastic traffic; dedicated instances suit stable loads and isolation needs; private deployment suits data-residency and deep customization scenarios. Evolve gradually with the business stage rather than starting with the heaviest option.
7. Rollout Path: POC, Small Traffic, Canary, Full Release
Adopt a phased approach:
- POC phase: validate quality gates and basic performance with real samples; eliminate clearly unsuitable candidates.
- Small-traffic phase: connect to real business with a limited traffic share; observe stability, cost, and user feedback.
- Canary phase: scale gradually by user, scenario, or region; validate extreme inputs and peak pressure.
- Full release: establish continuous regression, version upgrade, and exit mechanisms to avoid vendor lock-in.
Set explicit gate metrics and rollback conditions for each phase. If sampled quality drops, error rates rise, or cost exceeds budget, automatically degrade or pause the rollout.
8. Common Pitfalls and Conclusion
Common pitfalls include: trusting leaderboards instead of business samples; measuring only average latency while ignoring tail latency; neglecting prompt versioning and making conclusions irreproducible; lacking a unified gateway and creating tight coupling; missing logs and quality sampling, which delays problem detection. The goal of selection is not to find a model that is “always the best,” but the option that delivers the highest overall benefit under current constraints, with controllable risk and room to evolve.
In short, LLM selection should follow the principles of “scenario first, quantified metrics, reproducible evaluation, reversible integration, and sustainable governance.” Turning selection into an engineering process keeps you in control as models iterate rapidly.
