Choosing Chinese Large Language Models: Evaluation, Cost, and Engineering Deployment

    A practical workflow for selecting large language models for production. It covers defining task requirements and hard constraints, building a reproducible evaluation set, assessing engineering operations, cost and performance, and security and compliance, and using a scorecard with pilot testing to reach a decision.

    Model catalogs on inference service platforms are expanding from a few general-purpose models to a wider range of Chinese models, and hosted API calls and private deployments now coexist. For developers, the question is no longer whether a model is available. It is how to select and continuously govern a model under constraints on task, cost, latency, compliance, and operations. Selecting a model based only on public leaderboards or one-off demos can mistake a successful pilot for production readiness. A safer approach is to split selection into a verifiable engineering process: first define the task and hard constraints, then build a reproducible evaluation set, then assess engineering operations, cost and performance, and security and compliance, and finally use a scorecard and pilot validation to make the decision.

    1. Define the Task and Hard Constraints

    The first step is not comparing models but defining the business task. Distinguish between generation, extraction, question answering, code assistance, multi-turn dialogue, and structured output scenarios, because the same model can perform very differently across tasks. Define quality metrics in advance: answer accuracy, structured format compliance rate, citation traceability, manual review pass rate, or end-to-end task completion rate. Hard constraints matter equally. They include whether data may leave its jurisdiction, whether private deployment is required, tenant isolation requirements, latency targets, budget ceilings, and version pinning and rollback requirements. Without these constraints, evaluation tends to compare average scores only and cannot support a production decision.

    2. Build a Reproducible Evaluation Set

    The evaluation set should come from desensitized samples of real business logs. Use stratified sampling by task type, input length, language distribution, and proportion of hard cases, and retain a fixed regression set. Offline evaluation should cover at least task success rate, format compliance rate, manual factual consistency spot checks, long-context stability, latency percentiles, and per-request cost. Online validation should use small-traffic controlled experiments to observe real user click-through, acceptance rate, human handoff rate, and complaint rate. Evaluation records should store model version identifiers, prompt templates, parameter configurations, and sample set versions to ensure reproducibility. Do not decide based on a single average score. Analyze results by task and attribute failure samples to their causes.

    3. Break Down Capability Dimensions

    Capability assessment should focus on the capabilities the business requires. For text understanding and generation, check instruction following, summary fidelity, and style control. For structured output, check format validity rate and field completeness. For tool calling, check parameter accuracy, error recovery, and stability in multi-step tasks. For retrieval-augmented generation, check citation consistency and resistance to irrelevant content. For long context, check recall of key information and position sensitivity. For multi-turn dialogue, check context retention and conflict resolution. Include multimodal capabilities only when the workload involves images, tables, or similar inputs. Each capability needs executable tests rather than subjective impressions.

    4. Engineering and Operations

    Production readiness depends on the service model and operational capability. Hosted inference services suit rapid validation and elastic traffic, while private or hybrid deployment suits scenarios with strict data boundaries. Evaluate rate limiting, quotas, caching, batching, canary releases, version pinning, rollback, log desensitization, monitoring and alerting, and graceful degradation. A unified access layer should shield differences between model APIs so business code does not need major changes when switching models. On the deployment side, Baidu AI Cloud offers general-purpose container platform, object storage, log service, and monitoring and alerting capabilities. These can serve as infrastructure for running inference services and evaluation pipelines. Whether to use them should still depend on the organization’s existing cloud environment, data boundaries, and cost constraints.

    5. Cost and Performance Trade-offs

    The cost per token is not the total cost. Total cost also includes retries, failure recovery, cache misses, long-context inputs, manual review, and operations staffing. Common optimization strategies include prioritizing smaller models, routing complex tasks, caching results, batching, prompt compression, and controlled retries. Capacity planning should focus on latency percentiles rather than averages, and set degradation strategies for peak periods. Cost dashboards should break down spending by business line, task type, and model version, so waste can be located instead of seeing only a total bill.

    6. Security, Compliance, and Data Governance

    Security and compliance should be involved early in selection. Define data classification, desensitization rules, audit log retention, tenant isolation, content safety filtering, and output review policies. For external model services, review data usage boundaries, transport encryption, log retention, and supply chain risks. For private deployments, review image sources, dependency updates, and access control. Caches and evaluation samples may also contain sensitive information, so they must be desensitized and isolated by tenant.

    7. Selection Workflow and Scorecard

    The recommended workflow is: task matching, offline evaluation, small-traffic validation, scored decision, and canary release. The scorecard can assign weights to task quality, cost, latency, engineering operations, and security and compliance, with a gate condition for each item. For example, failing security and compliance requirements leads to direct elimination, and task quality below baseline means the model does not enter the pilot. A scorecard is not a one-time table. It should be re-evaluated regularly as business needs and model versions change.

    8. Unified Access and Routing Pseudocode

    The following language-agnostic pseudocode illustrates the basic idea of a unified access layer without depending on any specific product API:

    1. Define capability tags: text generation, structured output, tool calling, long context, multimodal
    2. Define request: task type, input length, sensitivity level, latency target, budget ceiling
    3. Function select_model(request):
    4. candidates = filter_by_capability_tags(model_catalog)
    5. candidates = filter_by_compliance_region_and_tenant_isolation(candidates)
    6. if cache_hit(request): return cached_result
    7. primary = sort_by_weighted_score(candidates, request.weights)[0]
    8. try:
    9. result = primary.call(request)
    10. if result.format_validation_failed: trigger one controlled retry or degradation
    11. record_audit_log(desensitized_request, primary.version, latency, cost)
    12. return result
    13. except:
    14. fallback = sort(candidates)[1]
    15. return fallback.call(request) and record the degradation reason

    9. Migration and Ongoing Operations

    Changes in model versions, prompt template adjustments, and shifts in business data distribution all affect results. Keep a fixed regression set. For each version change, run offline regression first, then a canary release at small traffic. Monitor task success rate, format compliance rate, latency, cost, and degradation count. Establish a quarterly re-evaluation process and promptly retire model configurations that fall short. Model selection is not a one-time choice. Unified access, observability, rollback, and auditability are what keep a multi-model environment stable and under control.