A Practical Guide to Evaluating the General Capabilities of Large Language Models

    This guide explains how to systematically evaluate the general capabilities of large language models. It covers the core capability dimensions, how to build reliable evaluation datasets, objective and model-assisted scoring methods, statistical interpretation of results, engineering practices for a reproducible evaluation pipeline, common pitfalls, and practical steps for building your own evaluation setup.

    1. Why Systematic Evaluation Matters

    LLMs keep getting more capable, but “capable” is a vague claim. The same model may perform consistently on commonsense QA while failing noticeably on multi-step reasoning or long-context understanding. Evaluation breaks that vague notion of capability down into measurable metrics, giving you a basis for model selection, version iteration, and go-live risk control.

    For developers and enterprise users, public leaderboards are reference information at best. A leaderboard score is the product of a specific dataset, a specific prompt template, and a specific scoring rule. Change the scenario, and the ranking may look completely different. Understanding the evaluation methodology is therefore more valuable than memorizing any single ranking.

    2. Core Dimensions of General Capability

    General capability is usually broken down into the following categories, each with its own failure modes.

    • Language understanding: reading comprehension, semantic similarity, coreference resolution, and understanding of idioms and classical text. Word boundaries in Chinese are ambiguous, ellipsis is common, and context dependence is strong, so questions need to cover colloquial, written, and domain-specific language.
    • Knowledge QA: history, science, law, medical common sense, and so on. The focus is factual accuracy—distinguishing “willing to answer” from “answers correctly.”
    • Math and logical reasoning: word problems, multi-step derivations, and table-based reasoning. These have unique answers and are best suited to objective scoring.
    • Coding ability: code generation, completion, and defect localization. Unit test pass rate is the usual scoring basis.
    • Instruction following: requiring the model to output in a specified format, length, structure, or under given constraints. This dimension directly determines whether the model is stable in engineering integration.
    • Multi-turn dialogue and context retention: whether the model honors earlier agreements across turns, such as remembering constraints the user provided.
    • Safety and compliance: refusal boundaries, hallucination risk, and handling of sensitive topics.

    The weight of each dimension should be determined by your actual business needs. General leaderboards often use equal weights, but a customer service system may care more about instruction following, while a coding assistant cares more about code capability.

    3. Building the Evaluation Dataset

    3.1 Sample Allocation by Dimension

    Set target counts per dimension. If one category dominates the dataset, the total score will be dominated by it and hide weaknesses elsewhere. Set a minimum sample size per dimension—e.g., no fewer than 200 items per category—and report the sample count for each dimension alongside the results.

    3.2 Decontamination

    Training data may already contain public benchmark questions, inflating scores because the model has “memorized the answers.” Three common practices:

    1. Run overlap detection between your samples and public corpora—e.g., n-gram overlap—and remove or replace suspected leaked items.
    2. Build a private test set used only for internal evaluation and never published.
    3. Rotate questions periodically, recording the effective date of each question set to avoid relying on the same set indefinitely.

    3.3 Question Quality Control

    Each item should include a reference answer, a difficulty label, and an ambiguity check. After drafting, have two annotators independently review each item and compute an inter-annotator agreement metric such as Cohen’s kappa. Items with low agreement should be rewritten or removed—otherwise your results reflect annotation noise rather than model capability.

    4. Scoring Methods

    4.1 Scoring Objective Questions

    The key to scoring objective questions is answer extraction. Model output formats vary—“The answer is B,” “B.,” or “Choose B.” all mean the same option. If your extraction rules are too strict, correct answers get misjudged as wrong.

    Recommended practice: define the extraction rules first, validate their accuracy on a batch of manually labeled model outputs, and only then apply them to full-scale scoring.

    4.2 Scoring Subjective Questions

    Open-ended tasks—writing, summarization, solution design—require human scoring or model-assisted scoring. Human scoring should use a fine-grained rubric, e.g., scoring accuracy, completeness, and clarity each from 1 to 5, with explicit criteria for each score level.

    4.3 Model-Assisted Scoring and Its Biases

    Using one model to score another model’s outputs against a rubric is cheap and fast, but it introduces several biases:

    • Position bias: in pairwise comparisons, the response shown first tends to score higher. Mitigation: randomize the order and run the comparison in both directions, averaging the two.
    • Length bias: the judge model tends to favor longer responses even when they are emptier. Mitigation: explicitly penalize redundancy in the rubric and apply regression correction for length.
    • Self-preference: a judge model may favor outputs stylistically similar to its own. Mitigation: cross-validate with judge models from different sources.

    Whichever scoring method you use, sample outputs for human review and report the correlation between model scores and human scores. If the correlation falls below your preset threshold, automated scoring is not trustworthy for that dimension.

    5. Statistics and Interpretation of Results

    5.1 Per-Dimension Reporting

    Reporting only an aggregate score hides structural problems. A model with a middling total score might be strong on code but weak on instruction following. Reports should include per-dimension scores, sample sizes, and failure rates.

    5.2 Fix Weights in Advance

    The total score is a weighted combination of dimension scores, and the weights must be decided and recorded before the evaluation begins. Adjusting weights after the fact to obtain a desired ranking is unacceptable.

    5.3 Confidence Intervals

    Evaluation scores carry sampling error. Bootstrap resampling can estimate the range of fluctuation:

    1. Input: list of per-item scores, number of resamples B = 1000
    2. repeat B times:
    3. draw len(scores) samples with replacement from scores -> sample
    4. record mean(sample)
    5. take the 2.5% and 97.5% percentiles of the B recorded means
    6. -> 95% confidence interval

    If two models’ confidence intervals overlap substantially, the score gap is not sufficient to declare a winner. In that case, increase the sample size or re-run the comparison on data closer to your business scenario.

    5.4 Controlling Randomness

    With a non-zero sampling temperature, the same model produces different results across runs. Fix the random seed during evaluation (if the service supports it), or run each item multiple times and report the mean and standard deviation. Setting temperature to zero improves reproducibility but changes the model’s actual output distribution—note the setting in your report.

    6. Engineering the Evaluation Pipeline

    A reproducible evaluation system typically has five stages: data preparation, inference calls, scoring, aggregation, and reporting. Inputs and outputs of every stage should be persisted to disk.

    1. Input: dataset version D, prompt template version P, model identifier M, scoring rule version J
    2. for each sample x (run concurrently, with a concurrency cap):
    3. prompt = render x using P
    4. try calling M.generate(prompt, fixed parameters), up to 3 retries
    5. if it ultimately fails: log the failure reason, mark as a failed sample,
    6. exclude from the mean but include in the failure rate
    7. else: score = J.score(x, output)
    8. write record {sample ID, dimension, prompt version, output, score, latency}
    9. aggregate: compute per-dimension mean, confidence interval, and failure rate
    10. output the report, including the version numbers of D, P, and J

    Key engineering considerations:

    • Version management: datasets, prompt templates, scoring rules, and model parameters all need version numbers. Missing any one of them makes results irreproducible.
    • Concurrency and rate limiting: inference APIs usually have rate limits. Make concurrency configurable and back off automatically on timeouts and throttling errors.
    • Transparent failure handling: failed samples must not be silently dropped, which would artificially inflate scores. Always report the failure rate.
    • Response caching: cache results for identical inputs and parameters to avoid duplicate billing and waiting.
    • Traceability: keep raw inputs and outputs so disputed scores can be reviewed.

    7. Common Pitfalls

    1. Looking only at the total score. Aggregates can hide critical weaknesses—check per-dimension results first.
    2. Applying leaderboard conclusions directly to business decisions. Public datasets often differ greatly from your scenario. Model selection should use your own real samples.
    3. Ignoring the impact of prompt templates. The same model can score noticeably differently with a different prompt. When comparing models, prompt templates must be identical.
    4. Drawing conclusions from small score gaps. A gap without confidence intervals proves nothing.
    5. Overlooking data leakage. If questions appear in the training data, scores will be inflated—and it’s hard to detect.

    8. Practical Recommendations

    If you’re building an evaluation setup for your own scenario, proceed in this order:

    • Break your business requirements into dimensions, and set a weight and minimum sample size for each.
    • Collect real business questions, build an evaluation set of several hundred samples or more, and hold out a hidden test set.
    • Fix the prompt template, sampling parameters, and scoring rules, recording a version number for each configuration.
    • Establish a scoring rubric for open-ended questions, and sample-check the agreement between model-assisted and human scoring.
    • Report per-dimension scores, confidence intervals, and failure rates—not just a single total score.
    • Re-run the same evaluation suite after every model or prompt change and compare the results.

    The goal of evaluation is to provide a reliable basis for decisions. The more transparent the method and the more reproducible the process, the more the conclusions will stand up to scrutiny.