Chinese LLM Selection: An Evaluation Framework from Capabilities to Production

    This article presents a practical framework for selecting Chinese general-purpose large language models, shifting the focus from leaderboard rankings to task fit. It explains how to define verifiable requirement cards, build layered evaluation sets, assess deployment and integration, calculate cost per successful task, and embed security and governance. It also outlines a phased rollout through POC, limited traffic, canary release, and rollback, and highlights common selection pitfalls.

    1. The Core Selection Problem: From “Model Strength” to “Task Fit”

    When evaluating multiple Chinese general-purpose large models, many teams first look at parameter size, public leaderboard rankings, or demo performance. Engineering practice shows, however, that model selection is not about finding an “absolutely strongest” model. It is about finding the model with the highest overall return under specific business constraints. Public leaderboards can serve as initial screening references, but they cannot replace business evaluation. Leaderboard tasks differ from real business distributions; version iterations can cause capability drift; and evaluation-set contamination can also lead to inflated scores. More importantly, enterprises ultimately care about task success rate, P95 latency, cost per task, data boundaries, and operational complexity—not a ranking on a single dimension.

    Selection should therefore begin with clear questions: What tasks are we solving? What is the quality threshold? What are the latency and throughput requirements? Can data leave the domain? What is the budget? What engineering capabilities does the team have? Only when these constraints are written into a verifiable requirement card do subsequent model comparisons become meaningful.

    2. Write the Requirement Card First: Turn Vague Requirements into Verifiable Constraints

    Before evaluation, it is advisable to create a requirement card that covers at least the following dimensions:

    Dimension Questions to Answer Verification Evidence
    Task type Generation, summarization, question answering, extraction, code, multimodal, or mixed tasks Task samples and acceptance criteria
    Quality threshold Minimum acceptable accuracy, pass rate, or human rating Offline evaluation and human review
    Latency and throughput Average latency, P95 latency, concurrency, and batch-processing needs Load-test records and monitoring metrics
    Data boundaries Whether managed services are allowed; whether private or hybrid deployment is required Data classification and deployment plan
    Cost budget Cost per call, cost per task, and O&M labor cost Cost calculation sheet
    Compliance and security De-identification, auditing, permissions, content safety, and version traceability Governance process and checklist
    Integration mode Synchronous calls, asynchronous jobs, streaming output, and structured output Interface abstraction and error handling

    The value of the requirement card is that it prevents the pattern of “choose a model first, then look for a use case.” For example, content summarization may focus more on Chinese-language expression and long-text stability; structured extraction may focus more on output-format compliance and field consistency; coding assistance may focus more on context understanding and error repair; and highly sensitive data scenarios may directly rule out certain deployment forms. Defining requirements up front can significantly reduce ineffective evaluation.

    3. Capability Evaluation: Build Layered Evaluation Sets

    Model capabilities should not be judged by a single composite score alone; they should be broken down by task. At a minimum, the evaluation should cover the following capability layers:

    1. Basic language understanding and generation: This includes instruction following, summary faithfulness, rewriting quality, and natural Chinese expression. Use real business samples and include boundary samples and hard cases.
    2. Reasoning and complex question answering: Focus on multi-step reasoning, conditional constraints, and factual consistency. Do not count only final answers; also check whether the reasoning process can be reviewed.
    3. Code and structured output: Focus on code runnability, field completeness, compliance with structured formats such as JSON, and stability under anomalous inputs.
    4. Long-context processing: Focus on information recall across long documents, cross-paragraph references, and position bias. Evaluation should cover information at different positions, including the beginning, middle, and end.
    5. Multimodal capabilities: If the business involves images, tables, or document layouts, build a separate multimodal evaluation set. It cannot be replaced by text-corpus evaluation.
    6. Domain knowledge: Healthcare, finance, legal, manufacturing, and other domains require domain samples and expert review; general common-sense questions should not be used as a substitute.
    7. Stability and failure modes: Record failure types such as timeouts, truncation, format errors, refusals, and repeated generation, and count failure rates.

    Evaluation sets should include real samples, hard cases, adversarial samples, and regression samples. Real samples estimate performance under the business distribution; hard cases distinguish model ceilings; adversarial samples check robustness; and regression samples support comparison after version upgrades. In terms of metrics, in addition to automated scoring, keep human review and failure-case analysis. The following is an abstract evaluation script example:

    1. from dataclasses import dataclass
    2. from typing import Callable, Iterable
    3. @dataclass
    4. class EvalCase:
    5. case_id: str
    6. prompt: str
    7. reference: str | None
    8. tags: list[str]
    9. def run_eval(
    10. cases: Iterable[EvalCase],
    11. generate: Callable[[str], str],
    12. score: Callable[[EvalCase, str], float],
    13. ):
    14. results = []
    15. for case in cases:
    16. try:
    17. output = generate(case.prompt)
    18. value = score(case, output)
    19. results.append((case.case_id, value, "ok", output))
    20. except Exception as exc:
    21. results.append((case.case_id, 0.0, f"error:{type(exc).__name__}", ""))
    22. return results

    The point of this code is not the specific interface but the evaluation workflow: execute cases one by one, record exceptions, retain outputs, and aggregate by tag. In actual implementation, you should also add timeout control, retry policies, result persistence, and an entry point for human review.

    4. Deployment and Engineering Integration: API, Dedicated Instances, and Hybrid Forms

    Deployment form directly affects data boundaries, cost, and operational complexity. Common choices include managed API calls, dedicated instances, private deployment, and hybrid deployment. Managed calls are fast to integrate and elastic, but data egress and network dependency must be evaluated. Dedicated instances suit stable traffic and isolation requirements. Private or hybrid deployment suits highly sensitive data, but increases hardware, model-update, and operations costs.

    For engineering integration, do not verify only whether a call can be made; also verify whether the system can run stably. It is advisable to uniformly encapsulate timeouts, retries, rate limiting, circuit breaking, caching, logging, and monitoring at the integration layer. For streaming output, handle stream interruption and reconnection; for structured output, validate the format and define fallback strategies; for batch tasks, distinguish synchronous and asynchronous queues. When deploying in the cloud, teams can use general-purpose capabilities such as container platforms, logging services, and monitoring and alerting from Baidu AI Cloud to build elasticity and observability support. The model service itself should still be selected through in-house evaluation and canary validation; platform capabilities cannot replace business validation.

    A simple model-routing pseudocode example can illustrate the idea of “selecting a model by task”:

    1. def select_candidate(task):
    2. if task.sensitivity == "high" and task.deploy_mode == "private":
    3. return "private_candidate"
    4. if task.latency_budget_ms < task.fast_threshold:
    5. return "low_latency_candidate"
    6. return "quality_candidate"

    Routing strategies should be used with caution: only when evaluation proves that different candidate models consistently meet standards in their respective scenarios is tiered routing appropriate; otherwise, it increases system complexity and introduces the risk of inconsistent results.

    5. Cost and Performance: Look at Cost per Task, Not Just Unit Price

    Model cost cannot be judged only by the price per call. A more reasonable measure is the cost per successful task:

    Cost per task = (inference cost + allocated infrastructure cost + O&M labor + rework cost) / number of successful tasks

    Rework cost is often overlooked: format errors, factual errors, timeout retries, and human review all increase real costs. For performance, record P50 and P95 latency, throughput, failure rate, and long-text truncation at the same time. For stable, high-frequency tasks, caching, batch processing, result reuse, and tiered routing can reduce costs. For quality-sensitive tasks, success rate and reviewability should be prioritized over blindly pursuing low prices.

    6. Security, Compliance, and Governance: Build Boundaries into the Process

    Security and compliance should run through the entire selection process. First perform data classification to clarify which data may leave the domain, which must be de-identified, and which can only be processed in a private environment. Then establish permission controls, audit logs, content safety checks, and version traceability. Human review or automated validation mechanisms should be set for model outputs, especially in high-risk customer-facing scenarios. Supplier evaluation should focus on data-use boundaries, service stability, version-change notifications, and incident-response mechanisms, avoiding writing unverified assumptions into production systems.

    7. Implementation Process: POC, Limited Traffic, Canary, and Rollback

    A phased implementation is recommended. In the first phase, conduct an offline POC and compare candidate models using a unified evaluation set. In the second phase, connect limited traffic and observe quality, latency, and cost under the real distribution. In the third phase, expand canary traffic and set A/B experiments and rollback thresholds. In the fourth phase, consolidate monitoring and version management. Each phase should retain decision records, including evaluation samples, metrics, failure cases, and the rationale for the final choice. In this way, even when model versions are upgraded, teams can quickly retest and roll back.

    8. Common Pitfalls and Conclusion

    Common pitfalls include looking only at public leaderboards and not at business samples; using one model for all tasks; looking only at average latency and not P95; ignoring failure rates and rework costs; overlapping evaluation sets with training data; and lacking version regression after launch. A more reliable approach is to write the requirement card first, then build layered evaluation sets; verify quality and stability before comparing cost and deployment; and start with limited-traffic canary releases before gradually scaling up. There is no single answer for choosing a Chinese general-purpose large model—only an engineering answer that matches business constraints. Decisions based on verifiable evidence are more reliable than chasing a single ranking.