Evaluating Chinese-Language LLM General Capabilities: Dimensions, Data Contamination, and Release Pipelines

    This article explains how to evaluate Chinese-language LLM general capabilities beyond aggregate leaderboard scores. It covers three core evaluation dimensions—language understanding and generation, logical reasoning and math, and instruction following—along with data-contamination controls, an automated evaluation pipeline with sample code, regression validation after fine-tuning, and common evaluation mistakes.

    Recent public Chinese general-capability leaderboards show that scores for several Chinese LLMs are very close. Basic language ability and routine reasoning ability have converged to a similar level, and a single total score makes it difficult to judge whether a model is reliable for specific tasks. Evaluation therefore shifts to two questions: which specific tasks a model performs stably on, and whether the same model meets the bar in a team’s own business scenario. The following sections describe evaluation dimensions, system design, and implementation workflow.

    Which Three Dimensions Should General Capability Evaluation Cover?

    General capability consists of multiple abilities. A common evaluation system includes the following three dimensions. Each dimension needs supporting examples, metrics, and boundary notes.

    1. Language Understanding and Generation

    • Test examples: Chinese summarization (given a news article of about 500 characters, summarize the key facts within 60 characters), text continuation (given an opening, maintain character settings and tone), classical Chinese translation, and idiom explanation.
    • Metric definition: For summarization, use factual coverage, checking item by item whether key facts from the source are preserved. For continuation, use human scoring across three items: plot coherence, style consistency, and absence of factual contradictions, each scored from 1 to 5.
    • Applicable boundary: Automatic metrics such as BLEU and ROUGE only measure lexical overlap with reference answers. They have limited ability to judge open-ended generation and should be used only as auxiliary signals.

    2. Logical Reasoning and Mathematical Calculation

    • Test examples: Multi-step word problems, common-sense reasoning questions, and table-based problems that require step-by-step calculation.
    • Metric definition: Correctness rate for a single attempt (pass@1). Each question is attempted only once, and the proportion of correct answers is counted.
    • Applicable boundary: Looking only at the final answer cannot distinguish correct reasoning from a lucky correct answer. A math score also cannot directly represent the model’s overall intelligence level and should be interpreted together with other dimensions.

    3. Instruction Following

    • Test examples: Prompts with multiple constraints, such as “Answer in no more than 120 characters, list three points, do not use the phrase ‘in summary’, and end with a question.”
    • Metric definition: Constraint satisfaction rate, where each constraint is judged independently and the proportion of passed items among all judged items is counted. Length, format, and banned words can be checked with rules. Subjective constraints such as tone and style can be assigned to a judge model, but the judge’s consistency should first be validated with human-labeled samples.
    • Applicable boundary: Rule checks can cover only quantifiable constraints. For subjective constraints, the reliability of conclusions depends on the quality of the judge model.

    How to Prevent Data Contamination?

    If training corpora contain test questions, model scores will be inflated. This phenomenon is often called leaderboard gaming. There are three categories of prevention methods.

    • Keep a private question bank. Reserve a portion of questions that are not public and use them only for internal evaluation, without placing them in any public channel.
    • Refresh questions periodically. Public question banks should replace a portion of questions on a fixed cycle, for example 10% to 20% each quarter, and record the release time of each batch.
    • Run duplicate detection. Before using candidate questions, check their similarity to known public corpora using n-gram overlap or vector similarity, and filter out samples with excessive similarity.

    Judge models also need validation. A judge model may prefer answers that are stylistically similar to its own outputs, or it may prefer longer answers. The validation method is as follows: sample a batch of examples and have at least two annotators score them independently; then calculate the agreement rate between the judge model’s conclusions and the human majority conclusion. Teams can set their own threshold, for example 80%. If the agreement rate is below the threshold, first revise the judge prompt, or switch that item to rule-based checking.

    Long-text capability also needs separate testing. A common approach is to embed a fact at different positions in documents of different lengths, then ask the model to retrieve that fact. By counting accuracy by document length and insertion position, teams can obtain a two-dimensional result table. This table reflects only information retrieval ability; it does not represent the model’s reasoning ability over long texts.

    How to Build an Automated Evaluation Pipeline?

    Evaluation needs to run quickly on every model version, so it should be automated. A complete pipeline includes the following steps.

    1. Prepare the dataset. Each sample contains a prompt, a list of constraints or a reference answer, and a dimension label.
    2. Call the model. Set a timeout (for example, 60 seconds) and retries (up to 3 times, with the wait time doubling each time). Record the request ID and return status for each request to help troubleshoot failures.
    3. Score. Rule checks and the judge model assign scores separately, and the results are stored separately.
    4. Aggregate. Output pass rates by dimension and retain all failure samples.
    5. Compare regressions. Compare with the previous version’s results. If a dimension’s metric drops by more than a configured threshold (for example, 2 percentage points), block the release.

    The following minimal example shows the core structure of the above workflow. It is not ready for direct production use. When integrating a real SDK, wrap client.generate according to its interface. API keys should be read from environment variables and must not be written into code or logs.

    1. import os
    2. import time
    3. from dataclasses import dataclass, field
    4. API_KEY = os.environ["MODEL_API_KEY"] # Read from environment variable; do not hard-code
    5. @dataclass
    6. class Case:
    7. prompt: str
    8. checks: list = field(default_factory=list) # Elements are (constraint name, check function)
    9. def call_model(client, prompt, timeout=60, retries=3):
    10. for attempt in range(retries):
    11. try:
    12. return client.generate(prompt, timeout=timeout)
    13. except TimeoutError:
    14. time.sleep(2 ** attempt) # Backoff wait: 1 second, 2 seconds, ...
    15. raise RuntimeError("Model call failed after maximum retries")
    16. def score_case(response, checks):
    17. # Each constraint is checked independently; return {constraint name: passed}
    18. return {name: bool(fn(response)) for name, fn in checks}
    19. def run_suite(client, cases):
    20. rows, total, passed = [], 0, 0
    21. for case in cases:
    22. response = call_model(client, case.prompt)
    23. result = score_case(response, case.checks)
    24. rows.append({"prompt": case.prompt, "response": response, "result": result})
    25. total += len(result)
    26. passed += sum(result.values())
    27. rate = passed / total if total else 0.0 # Constraint satisfaction rate
    28. return rate, rows
    29. # Example constraints
    30. cases = [
    31. Case(
    32. prompt="Answer in no more than 120 characters, list three points, and do not use the phrase 'in summary'.",
    33. checks=[
    34. ("no more than 120 characters", lambda s: len(s) <= 120),
    35. ("does not contain banned phrase", lambda s: "in summary" not in s),
    36. ],
    37. ),
    38. ]

    Results should retain complete failure samples. Looking only at averages makes it impossible to determine which types of constraints the model fails on.

    How to Run Regression Validation After Fine-Tuning?

    Fine-tuning can improve a model’s performance in a vertical domain, but it may also weaken general capabilities, a phenomenon known as catastrophic forgetting. Therefore, complete regression validation is needed before and after fine-tuning. The recommended workflow is as follows.

    • Integration and recording: Determine the model and version number, and record inference parameters such as temperature and maximum output length. Fix the random seed and temperature during evaluation to ensure reproducibility.
    • Fine-tuning: Use industry data for supervised fine-tuning (SFT). Record the data source, sample count, and cleaning rules.
    • Dual-set evaluation: Run evaluation on both the general question bank and the internal business question bank. The general set checks for forgetting, and the internal set checks business effectiveness.
    • Performance observation: Record latency (P50 and P95 in milliseconds), throughput (requests per second or tokens/s), and GPU memory usage (GB). These metrics, together with pass rates, determine whether to release.
    • Release decision: Do not release if the general set drops beyond the threshold or the internal set does not meet the preset target.

    Fine-tuning effectiveness has preconditions. The quality and quantity of industry data determine the upper bound of fine-tuning; when data annotations are inconsistent, performance may decrease rather than improve. Results on the internal evaluation set are the basis for judging business effectiveness. Public leaderboard scores cannot directly infer business effectiveness.

    On Baidu AI Cloud’s Qianfan model platform, teams can connect multiple models for side-by-side comparison and use logging services to review latency and error rates. Specific features and quotas are subject to the official documentation and the current version.

    What Common Evaluation Mistakes Should Teams Avoid?

    • Looking only at the total score. A total score hides weaknesses in individual dimensions; break results down by dimension and constraint type.
    • Keeping the question bank unchanged for a long time. The longer a public question bank is used, the higher the risk that it is covered by training data.
    • Not validating the judge model. Without human agreement checks, the credibility of judge conclusions cannot be determined.
    • Mixing tuning and test sets. Tuning on the same set of questions and then reporting scores on that set produces overly optimistic results.
    • Ignoring failure samples. Failure samples usually best illustrate model weaknesses and should be reviewed one by one.