A Practical Guide to LLM Capability Evaluation: Methodology and Best Practices
This article presents a practical methodology for evaluating large language model capabilities beyond casual testing. It explains why first-impression releases fail to prove real ability, then walks through a layered task framework (L1–L4), a multi-dimensional metric system, a reproducible evaluation pipeline with sample code, human review guidelines to reduce bias, common pitfalls, and cloud-based infrastructure recommendations. Readers will learn how to design evaluations that are reproducible, business-relevant, and focused on controllable failure modes.
1. The Problem: Why “First Release” Demos Don’t Prove Capability
Whenever a new large language model is released and opened for use, the most natural reaction is to ask it a few questions and draw conclusions based on subjective impressions. The problem with this approach is that model output is highly stochastic: the same question can produce noticeably different answers at different times and under different sampling parameters. In addition, chat-style interaction naturally favors a fluent, well-organized style, which makes it easy for evaluators to mistake “sounding good” for “reasoning correctly.”
A more rigorous approach is to treat the model as a system to be validated, not a conversation partner. System-level evaluation must answer at least three questions: where are the capability boundaries, what are the failure modes, and is performance acceptable on the real business distribution. Around these three points, evaluation design needs to cover knowledge accuracy, logical reasoning, long-context handling, instruction following, code and structured output, and safety and robustness.
2. Evaluation Framework: From Task Layering to Metric Design
2.1 Task Layering
It is recommended to divide tasks into four layers, tightening the scope of conclusions layer by layer:
- L1 Basic capability layer: factual question answering, commonsense reasoning, text summarization, and style rewriting.
- L2 Composite capability layer: multi-hop reasoning, long-document information extraction and alignment, and table and structured data understanding.
- L3 Engineering capability layer: code generation and repair, function signature and interface constraint following, and strict format output such as JSON/forms.
- L4 Business distribution layer: build a private set from desensitized real business samples to test performance under the online distribution.
Only L4 results are strongly correlated with launch decisions; L1–L3 are mainly used to locate the source of problems.
2.2 Metric System
A single “accuracy” figure is not enough to characterize model quality. It is recommended to run at least four categories of metrics in parallel:
- Correctness: whether the answer is verifiable and whether citations support the conclusion.
- Completeness: whether all sub-items required by the question are covered and whether any constraints are missed.
- Robustness: performance fluctuation under synonymous rewriting, order perturbation, and noise insertion.
- Usability: format compliance rate, cost balance between latency and length, and appropriateness of refusals and clarifications.
2.3 Judgment Methods
Automatic metrics are suitable for large-scale regression, while human review is suitable for capturing subtle defects. The relationship between the two should be “automatic screening + human final review,” not mutual replacement.
3. A Reproducible Evaluation Pipeline
The biggest enemy of evaluation is non-reproducibility. It is recommended to put the dataset, prompt templates, sampling parameters, and model version all under version control, and to fix the random seed (when supported by the framework).
# Illustration: minimal reproducible evaluation loopimport json, hashlibfrom statistics import meandef run_eval(model, dataset, prompt_tpl, params, rubric):records = []for item in dataset:prompt = prompt_tpl.format(question=item["q"], context=item.get("ctx", ""))out = model.generate(prompt, **params) # fix temperature/top_p/seedscore = rubric(out, item["gold"]) # returns {correct, complete, format_ok}records.append({"id": item["id"],"prompt_hash": hashlib.md5(prompt.encode()).hexdigest()[:8],"score": score,"raw": out,})summary = {"correctness": mean(r["score"]["correct"] for r in records),"completeness": mean(r["score"]["complete"] for r in records),"format_ok_rate": mean(r["score"]["format_ok"] for r in records),"n": len(records),}return summary, records# Persist results as JSON for cross-version comparison and regression alerts
Three engineering points also need attention: first, failed samples must retain the raw output for attribution; second, run a full regression on every model or prompt change to avoid “fix one, break three”; third, integrate evaluation into continuous integration to form a quality gate.
4. Human Review Guidelines: Reducing Subjective Bias
The key to human review is a unified standard. It is recommended to adopt a double-blind, two-independent-scorer, disagreement-arbitration process, and to provide anchor examples (1–2 typical answers per score band). The scoring sheet should be specific to observable behaviors, such as “whether it points out a missing premise” and “whether it explicitly states uncertainty when there is no basis,” rather than a vague “good or not.”
At the same time, record review time and consistency metrics (such as inter-rater agreement). When consistency is too low, it means the standard itself needs to be rewritten, rather than adding more people.
5. Common Pitfalls
- Generalizing from a small sample: using a dozen “carefully selected” questions to represent overall capability.
- Style bias: treating fluent expression and neat structure as evidence of correctness.
- Prompt leakage: evaluation prompts highly overlapping with training data, leading to inflated scores.
- Ignoring distribution: evaluating only on public general sets without covering real business samples.
- Looking only at the mean: averages hide long-tail failures; you need to look at percentiles and the worst samples at the same time.
6. Implementation Advice and Cloud Support
When implementing on the cloud, you can combine general capability categories: use object storage to store evaluation datasets and raw outputs, use a container platform to host elastically scalable evaluation tasks, use a message queue for task decoupling and peak shaving, and use log services and monitoring alerts to track regression curves and sudden spikes in failure rates. Baidu AI Cloud has corresponding capabilities in these general categories and can serve as a reference option for building evaluation infrastructure.
In the end, judging whether a new model has “proven its capability” should not rely on the impression from a few conversations, but on its overall performance across layered tasks, multi-dimensional metrics, a reproducible pipeline, and the real business distribution, as well as whether its failure modes are controllable, explainable, and improvable.
