How to Evaluate and Select a Chinese LLM: A Practical Framework

    A practical framework for evaluating and selecting Chinese large language models. This guide covers how to define requirements, compare models across five key dimensions, build your own evaluation set, and apply engineering best practices for integration—helping you move beyond leaderboard scores to make deployment decisions that hold up in production.

    How to Evaluate and Select a Chinese LLM: A Practical Framework

    Why Model Selection Is Getting Harder

    The number of Chinese large language models keeps growing, release cycles are fast, and the capability gaps between them shift constantly. Developers typically run into three problems. First, a model scores highly on public benchmarks but performs inconsistently in real business scenarios. Second, the same model can vary widely across different tasks, so no single overall score captures its suitability. Third, constraints like cost, latency, and data compliance often surface late in a project, forcing rework.

    That’s why selection shouldn’t start with “which model is the strongest,” but with “what capabilities does my task require, and under what constraints will it run?”

    Define Your Requirements First

    Before comparing models, write down a requirements checklist covering at least the following.

    1. Task Type

    Common tasks include text generation, multi-turn dialogue, code generation and repair, document Q&A, information extraction, and summarization or rewriting. Different tasks stress different capabilities. For example, structured extraction depends heavily on stable output formatting, while open-ended writing depends more on language quality and style control.

    2. Input and Output Size

    Estimate the average and maximum input length per request, plus the expected output length. Long-document Q&A demands a large context window, while short-text classification barely needs one. Note that longer contexts generally mean higher inference costs and response times.

    3. Latency and Concurrency

    For user-facing interactive scenarios, first-token latency and overall response time directly affect the experience. Offline batch processing, by contrast, is more about throughput and total cost. These two scenarios have different optimization targets and shouldn’t be judged by the same criteria.

    4. Data and Compliance

    If your business involves personal information, internal documents, or regulated data, you need to confirm whether data will be used for training, whether deployment is on public cloud or in a private environment, and whether the setup meets industry audit requirements. This step often narrows the candidate list significantly.

    Key Evaluation Dimensions

    Once requirements are clear, compare candidates across five dimensions.

    1. Task Performance

    This is the core metric and must be measured against your own business samples—not just general benchmarks. Break evaluation into sub-dimensions such as factual accuracy, instruction following, output format compliance, and language quality, and record each separately.

    2. Context and Tool-Calling Capability

    If your business relies on long documents or external data, verify how well the model locates information within long contexts and how reliably it calls external functions and returns structured results per spec. Test these with real use cases, not just spec sheets.

    3. Inference Cost and Latency

    Cost is determined by input/output pricing, request volume, and caching strategy. Multiply per-request cost by projected call volume to get a monthly estimate, then compare against budget. Measure latency under your target concurrency, and watch tail latency—not just averages.

    4. Integration and Deployment Options

    Common options include calling a vendor’s cloud API, deploying open-source weights in a private environment, or going through a third-party inference service. API compatibility, SDK maturity, rate-limiting policies, and failure recovery all affect long-term maintenance costs.

    5. Ecosystem and Stability

    Examine documentation quality, release frequency, service availability history, and community support. For production systems, whether you can pin a model version—and how much notice you get before old versions are deprecated—is equally important.

    Build Your Own Evaluation Set

    Public benchmarks are useful for initial screening, but final decisions should come from your own evaluation set. A workable evaluation set typically involves these steps.

    Step 1: Collect samples. Pull real requests from business logs, covering common scenarios and typical edge cases. You don’t need a huge sample set at first, but the categories should be complete.

    Step 2: Define criteria. Write clear scoring rules for each task type. For example, extraction tasks might require exact field matching, Q&A tasks might require citations from the source text, and code tasks might require passing unit tests.

    Step 3: Combine automated evaluation with manual sampling. Let programs handle anything rule-based, and use human reviewers for hard-to-quantify qualities like tone and readability—while tracking inter-reviewer agreement.

    Here’s a simplified evaluation script that tracks accuracy and average latency per task category. The call_model function is a wrapper around the candidate model’s API—adjust it to match your actual integration.

    1. import time
    2. from collections import defaultdict
    3. from dataclasses import dataclass
    4. @dataclass
    5. class EvalCase:
    6. prompt: str
    7. expected: str
    8. category: str
    9. def run_eval(call_model, cases):
    10. results = []
    11. for case in cases:
    12. start = time.perf_counter()
    13. output = call_model(case.prompt)
    14. latency = time.perf_counter() - start
    15. results.append({
    16. "category": case.category,
    17. # Simplified check, only suitable for tasks with a single correct answer
    18. "correct": case.expected in output,
    19. "latency": latency,
    20. })
    21. return results
    22. def summarize(results):
    23. stats = defaultdict(lambda: {"total": 0, "correct": 0, "latency": 0.0})
    24. for r in results:
    25. s = stats[r["category"]]
    26. s["total"] += 1
    27. s["correct"] += int(r["correct"])
    28. s["latency"] += r["latency"]
    29. for category, s in stats.items():
    30. accuracy = s["correct"] / s["total"]
    31. avg_latency = s["latency"] / s["total"]
    32. print(f"{category}: accuracy {accuracy:.2%}, avg latency {avg_latency:.2f}s")

    Keep in mind that substring matching only works for simple, deterministic tasks. For open-ended outputs, switch to a judge model, rule combinations, or human review, and keep the raw outputs for later inspection.

    Engineering Practices for the Integration Layer

    Once a model is chosen, the integration layer determines whether the system runs reliably. These practices apply to most LLM applications.

    1. Wrap model calls behind a unified interface. Business code depends only on an internal abstraction, with the underlying model switched via configuration. Swapping models then only touches the adapter layer.
    2. Set timeouts, retries, and backoff. Use exponential backoff for network and rate-limit errors; fail fast on business errors so invalid retries don’t amplify load.
    3. Plan for fallbacks. When the primary model is unavailable, switch to a backup model or return a predefined fallback response, and log the degradation event.
    4. Externalize credentials and configuration. Inject access keys via environment variables or a secrets management service—never hard-code them or write them to logs.
    5. Log observability data. Record the model version, input/output lengths, latency, and error codes for every call, to support cost accounting and quality tracking.

    Common Pitfalls

    Relying on a single metric. A model with a high overall score may underperform on your critical sub-tasks. Evaluate separately, weighted by business priorities.

    Making a one-time decision. Model versions get updated and service conditions change. Selection conclusions need periodic re-testing.

    Ignoring migration costs. Prompts, output parsing rules, and evaluation sets may all need adjustment when switching models. Factor this work into total cost.

    Over-trusting leaderboards. Benchmarks reflect performance on specific test sets. Fit to your actual business must be verified independently.

    Recommendations for Rollout

    Take a phased approach. In phase one, use your own evaluation set to narrow the field to two or three candidates, and set explicit ceilings for cost and latency. In phase two, run a small-scale canary deployment and check whether live metrics match your offline evaluation results. In phase three, design a multi-model routing strategy based on task type—for example, routing simple tasks to cheaper models and complex tasks to more capable ones.

    In the long run, treat model selection as an ongoing process. Maintaining an evaluation set, standardizing the evaluation workflow, and recording the impact of every change let your team quickly judge whether a new model is worth switching to—instead of starting the discussion from scratch each time.