Choosing Chinese LLMs: A Practical Model Selection Framework

    Learn how to evaluate Chinese large language models against real business requirements. This guide covers task-specific metrics, context reliability, latency, cost, compliance, deployment options, and a reusable evaluation workflow for making and maintaining a production-ready choice.

    1. There Is No Universal Best Model

    Developers often start model selection by asking, “Which model is best?” Leaderboard scores, community discussions, and personal experience provide useful references, but they generally reflect aggregate performance. The more useful question is: Which model best fits your specific tasks, budget, and compliance requirements?

    Model selection should therefore begin with clearly defined requirements—not a comparison of models.

    2. Step One: Break Tasks into Testable Units

    Business requirements often involve several different tasks. Separate them by type before evaluating models:

    • Text classification and information extraction: Outputs have a fixed structure and can be measured using accuracy and field recall.
    • Code generation and modification: Performance can be measured by unit test pass rates.
    • Question answering over long documents: Evaluate whether the model locates the relevant information after retrieval and cites it correctly.
    • Multi-turn customer support: Assess response consistency, refusal boundaries, and handling of user emotions.
    • Tool calling and agent workflows: Measure parameter format correctness and workflow completion rates.

    Each task needs explicit acceptance criteria. Without them, you cannot determine whether a model is suitable or compare candidates meaningfully.

    3. Step Two: Evaluate Six Core Dimensions

    3.1 Task Performance

    Task performance is the primary consideration, but it should be broken down into specific metrics.

    For information extraction, for example, measure field recall, field precision, and output format validity separately. A low format-validity rate can cause downstream software to fail. Even a semantically correct response may be unusable if it does not follow the required format.

    3.2 Context Length and Reliability

    An advertised context window tells you how much input a model can accept, not how reliably it uses that input.

    Test whether the model can use information at different positions in a long document. Place the same key fact at the beginning, middle, and end, then ask the same question for each version and compare accuracy.

    If accuracy drops noticeably when the fact appears near the end, the model’s reliability for long-document tasks needs closer evaluation.

    3.3 Latency and Throughput

    Latency has two main components: time to first token and total generation time.

    Conversational applications place greater emphasis on time to first token because the initial wait directly affects the user experience. Batch processing tasks place greater emphasis on throughput.

    Use an input-length distribution representative of production traffic. Record percentiles such as P50 and P95, since averages can hide slow requests in the long tail.

    3.4 Cost Structure

    API costs depend on input tokens, output tokens, and the number of calls.

    Two models with the same token pricing may still have different total costs. A model that generates more verbose responses can cost more in practice.

    Estimate costs using realistic traffic rather than the quoted price of a single request.

    3.5 Deployment and Data Compliance

    Whether data can be sent to an external service directly determines which options are available.

    Personal information, trade secrets, and regulated data may require private deployment or access within a designated compliant environment. Deployment choices also affect staffing and hardware costs, so assess these requirements during project planning.

    3.6 API and Engineering Compatibility

    If your application already uses a common chat completions API format, choosing a compatible model can significantly reduce switching costs.

    Also verify that streaming, function calling, and structured output meet your requirements. Review rate limits and error-code definitions to ensure they support practical retry handling.

    4. Step Three: Build Your Own Evaluation Dataset

    Public benchmark data often differs substantially from business data. Build an evaluation dataset that reflects your actual workload.

    A practical process is:

    1. Collect 100–300 samples from real business logs, covering both common scenarios and edge cases.
    2. Write reference answers or scoring rules for each sample.
    3. Evaluate candidate models using the same prompt templates and parameter settings to keep comparison conditions consistent.
    4. Combine automated scoring with manual spot checks. Focus manual review on qualities that automated rules cannot reliably assess, such as tone, factual completeness, and logical coherence.
    5. Report scores separately by task type. A single overall score can hide a serious weakness in one category.

    The following example provides a basic evaluation framework. Implement the model-calling function to match your own integration.

    1. from dataclasses import dataclass
    2. from statistics import mean
    3. import time
    4. @dataclass
    5. class Sample:
    6. prompt: str
    7. expected: str
    8. def exact_match(pred: str, expected: str) -> bool:
    9. return pred.strip() == expected.strip()
    10. def evaluate(call_model, model_name: str, samples: list[Sample]) -> dict:
    11. scores, latencies = [], []
    12. for s in samples:
    13. start = time.perf_counter()
    14. pred = call_model(model_name, s.prompt) # Implement this calling function
    15. latencies.append(time.perf_counter() - start)
    16. scores.append(1.0 if exact_match(pred, s.expected) else 0.0)
    17. return {
    18. "model": model_name,
    19. "accuracy": round(mean(scores), 4),
    20. "avg_latency_s": round(mean(latencies), 3),
    21. "count": len(samples),
    22. }

    In production projects, replace exact_match with a task-appropriate scoring function. Structured outputs can be compared field by field, generated code can be evaluated by running test cases, and open-ended text can be assessed using semantic similarity alongside human scoring.

    Version-control the evaluation scripts as well, so regression tests use consistent samples and scoring logic.

    5. Estimate Costs from Actual Usage

    Monthly API costs can be estimated with the following formula:

    1. Monthly cost = Average daily requests × 30 ×
    2. (Average input tokens × Price per input token
    3. + Average output tokens × Price per output token)

    Use the provider’s published billing rates, expressed in units consistent with the formula.

    Keep the following factors in mind:

    • Input tokens include system prompts and conversation history. In multi-turn conversations, this input can grow with each turn.
    • Retries and failed requests may also incur charges and should be included in the estimate.
    • If peak traffic differs substantially from average traffic, plan capacity around peaks rather than relying only on an average-usage budget.

    6. Compare Deployment Options

    Three deployment patterns are common:

    • Public API service: Fast to integrate and requires no infrastructure maintenance. This is suitable for early validation and workloads with highly variable traffic.
    • Private deployment: Keeps data within the designated environment and offers greater control, but requires GPU resources and operational expertise.
    • Hybrid deployment: Routes non-sensitive requests to a public API and sensitive requests to a local model through a unified routing layer.

    Define data boundaries before discussing cost. Those boundaries will eliminate some options; the remaining options can then be compared on cost and performance.

    7. Follow a Structured Selection Process

    1. Define task types and acceptance metrics.
    2. Identify permissible deployment options based on data compliance requirements.
    3. Evaluate three to five candidate models using your own dataset.
    4. Measure cost and latency for models that meet performance requirements.
    5. Make a weighted decision across performance, cost, and latency, and retain a second candidate as a fallback.
    6. Roll out to a small portion of traffic, review production metrics, and expand only after validating the results.

    8. Common Selection Mistakes

    Relying only on public leaderboards. Benchmark tasks may differ significantly from your workload. A high leaderboard score does not guarantee strong performance on your business tasks.

    Comparing only unit prices. A cheaper model may produce longer responses or require more retries, resulting in a higher total cost.

    Having no fallback strategy. Model services can be rate-limited or temporarily unavailable. Design a fallback path, such as switching to a backup model or returning cached results where acceptable.

    Stopping evaluation after launch. Model version updates and changes in business data can affect performance. Run regular regression tests to detect degradation.

    9. Engineering Recommendations

    • Wrap model calls in a unified service layer. Avoid coupling business code directly to specific model names, making it easier to switch models and compare results.
    • Version-control prompts, parameters, and evaluation results so performance changes can be traced to their causes.
    • Record input length, output length, elapsed time, and status codes for each call to support cost analysis and performance optimization.
    • Mask sensitive fields in logs to avoid storing user information in logging systems.

    Effective model selection turns the vague question “Which is better?” into a set of measurable criteria. Clear task definitions, reusable evaluation datasets, and early consideration of cost and compliance are what make a selection decision hold up in real business use.