How to Evaluate Large Language Models: From Core Capabilities to Real-World Tasks

    This article explains how to evaluate large language models in a structured, reproducible way. It covers defining the goal of an evaluation, building test dimensions across logical reasoning, math, coding, and common sense, controlling variables for reproducibility, designing scoring rubrics, avoiding common pitfalls, and moving from general benchmarks to task-specific business validation. Readers will learn how to turn a vague "how does it feel" impression into checkable questions about what to test, how to judge results, and under what conditions.

    1. Start by Defining the Question the Evaluation Must Answer

    Before evaluating a large language model, clarify the goal: are you comparing how models perform on general question answering, or verifying whether a model can complete a specific type of work? Different goals call for different test sets, metrics, and boundaries on what the conclusions mean. Drawing a conclusion that “model X is stronger” from a handful of brain teasers or a single coding problem is unreliable, because the result is easily swayed by the choice of questions, the prompting style, and random variation in the output.

    For developers and enterprise users, the value of an evaluation is not to assign an absolute, context-free ranking. It is to decide whether a model is suitable for a particular task. Code completion cares about whether the generated result passes tests; math question answering cares about whether the reasoning process and the computed result agree; business text processing needs to check format compliance, factual grounding, and handling of malformed input.

    So before testing begins, write down three questions:

    1. What task is being evaluated? Break “answering questions” into concrete work such as classification, extraction, generation, reasoning, or code execution.
    2. How is success defined? Decide in advance on accuracy, format-compliance rate, a human scoring standard, or an execution pass rate.
    3. How will the results be used? For technology selection, version regression, risk assessment, or finding weak spots in prompts and workflows.

    2. Build Test Dimensions with Reasonable Coverage

    General-capability testing can sample from several dimensions. Each dimension should include varying difficulty and phrasing so that a model cannot score well merely by recognizing a familiar question type.

    2.1 Logical Reasoning

    Logic questions can cover conditional deduction, true/false judgment, constraint ordering, and multi-step reasoning. When testing, separate “the conclusion is correct” from “the argument is sound”: a model may reach the right answer while relying on an invalid derivation, or it may reason in a reasonable direction but drop a condition at some step.

    Questions should state all premises explicitly and include enough contrasting examples. For instance, the same logical relationship can be posed in different phrasings to check whether the model understands the conditions rather than recalling a fixed template. When scoring, record the final conclusion, the key reasoning steps, and whether the model introduced assumptions not provided in the question.

    2.2 Math and Quantitative Calculation

    Math tests should go beyond simple arithmetic and cover ratios, unit conversion, probability, boundary conditions, and multi-step word problems. For computed results, check that units, precision, and intermediate steps are consistent. If the task demands strict numerical precision, define the allowed error margin; if the focus is problem-solving ability, evaluate whether the method chosen and the conditions used are correct.

    Also watch for ambiguity in how questions are phrased. A problem with incomplete conditions may have several reasonable answers, and a model should not be marked wrong simply for not adopting the expected assumption. The evaluation set should consist of questions with clear intent, and any ambiguous items should be flagged separately.

    2.3 Coding and Code Understanding

    Coding ability includes at least code generation, code explanation, defect localization, and modification suggestions. Judging only whether code “looks correct” is unreliable; ideally, run it in an isolated environment and verify behavior with prepared test cases.

    Test cases should cover normal input, boundary input, and malformed input. For example, a sorting function needs checks for empty collections, duplicate elements, and extreme sizes; a parsing function needs validation for missing fields, invalid formats, and encoding boundaries. Beyond execution results, check whether the code meets the specified language, interface constraints, and complexity requirements. If no runtime is available, explicitly limit the conclusion to static review, and do not present speculative correctness as a verified result.

    2.4 Common Sense and Human-Intuition Judgment

    Common-sense questions often depend on real-world context, default conventions, or conversational context, and the answer cannot always be derived uniquely by formal logic. When evaluating, separate “is the knowledge correct” from “does it understand the user’s intent”: a model may know the facts but misread the question, or it may give a fluent answer that has no reliable factual basis.

    Prepare examples with implicit conditions, referential relationships, and incomplete information, and observe whether the model asks clarifying questions when necessary rather than rashly filling in missing facts. For time-sensitive or specialized-knowledge questions, also annotate the knowledge scope and verification method, so that a common-sense test is not dressed up as an authoritative assessment of a cutting-edge field.

    3. Control Test Variables to Keep Results Reproducible

    When comparing different models or different versions of the same model, test conditions must be as consistent as possible. At minimum, keep the question text, system instructions, context information, generation parameters, and output-length limits the same. If some conditions cannot be unified, such as differing available context lengths, state this clearly in the report.

    For each evaluation run, save the following:

    • Test date and the model or service version identifier;
    • The complete prompt and input data;
    • Generation parameters and other runtime conditions;
    • Raw outputs, error logs, and human scores;
    • For coding tasks, the runtime environment, dependency versions, and test results.

    The same question can yield different answers under different runtime conditions, so a single sample is not enough to represent stable performance. For tasks with random output, run them repeatedly and compute the result distribution. Alongside average performance, show the variance, and pay particular attention to whether key business tasks suffer occasional failures.

    4. Design Scoring Rules Instead of Scoring by Impression

    Setting scoring criteria before the evaluation reduces the bias of adjusting the yardstick after seeing the answers. Objective questions are suited to automatic scoring; open-ended tasks can use a per-item rubric that separately assesses factual correctness, completeness, instruction following, clarity of expression, and risk control.

    Human review should use consistent guidelines, and where possible, multiple reviewers should score independently. When disagreements arise, record the reason rather than simply averaging them away and hiding the problem. For verifiable tasks such as coding and math, prioritize verification by execution results or reference answers to reduce the influence of language fluency on scoring.

    You can also weight items by task importance, but the weights must come from actual business needs. For example, in an automated data-processing pipeline, correct formatting and complete fields may matter more than writing style; in a user-facing question-answering scenario, clear expression and timely clarification may be more critical. Present the aggregate score together with the per-item results, so that a single total does not mask an obvious weakness.

    5. Recognize Common Evaluation Pitfalls

    Too Few Samples

    A few questions are only good for a preliminary look and cannot support a general conclusion. Small samples are easily swayed by question difficulty, wording, and random output. Use examples that cover multiple task types, and after finding errors, add similar but non-duplicate tests to judge whether the problem is an occasional slip or a stable weakness.

    Test Questions Disconnected from Real Use

    Public question banks or carefully designed puzzles do not necessarily represent actual work. Enterprise evaluation should include desensitized real inputs that cover common requests, edge cases, and bad data, while avoiding submitting confidential information directly to services that are not approved.

    Equating Fluent Expression with Correctness

    Large language models can produce coherent text, but sounding confident does not mean the facts are reliable. For high-stakes conclusions, require verifiable evidence, or verify through independent data sources, business rules, and human review. The evaluation report should also record cases where information could not be confirmed, refusals were inappropriate, or content was fabricated.

    Ignoring Cost and Latency

    Quality is not the only metric. Real deployment also requires considering response time, call stability, cost per task, concurrency needs, and how the system recovers from failures. Different tasks tolerate these factors differently, so set thresholds according to the business scenario rather than comparing a single capability score.

    6. Move from General Testing to Business Validation

    General-capability evaluation is good for revealing a model’s broad strengths and weaknesses, but it cannot directly replace pre-launch validation. Before going live, build a dedicated test set from target business data, focusing on input distribution, field constraints, permission boundaries, and exception handling. If the model is only one part of a workflow, also assess how retrieval, rule validation, and human review affect the overall result.

    A practical process is: first build a baseline test set and record results by task dimension; then select failed examples and classify them into insufficient knowledge, misunderstanding of instructions, reasoning errors, formatting errors, and environment issues; finally, adjust prompts, data, or the workflow to address the root cause, and re-validate with the original test set plus new regression cases. This evaluation loop guides engineering decisions far better than a one-off model ranking.

    Conclusion

    Evaluating large language models means turning “how does it feel” into checkable questions: what to test, how to judge, under what conditions to test, and whether the results can be reproduced. Logic, math, coding, and common-sense judgment can form a baseline capability check, but they provide only limited evidence. Only by combining clear scoring rules, stable test conditions, real task examples, and risk review can you more reliably decide whether a model is suitable and continuously identify the parts of the system that need improvement.