How to Evaluate the Mathematical Reasoning of Large Language Models: Methods and Practices

    This article explains why a single question like "which model is stronger" is hard to answer, and proposes a practical framework for evaluating the mathematical reasoning of large language models. It breaks evaluation into four layers, defines input-side controls for prompts, sampling, and budgets, and describes a dual-track scoring and statistics approach that reports pass-rate distributions, confidence intervals, and failure types. It also outlines common pitfalls and engineering practices for running evaluation as a repeatable pipeline.

    1. Background: Why “Which Model Is Stronger” Is Hard to Answer in One Sentence

    In real selection work, teams often run into the same debate: for one model, some people see excellent performance on competition problems, while others notice frequent errors in long-chain derivations. The root cause of such disagreement is not that one side judged incorrectly, but that evaluation itself lacks a common frame of reference. Mathematical ability can be split into at least four dimensions that are not equivalent to one another:

    • Computational accuracy: whether arithmetic and symbolic manipulation are reliable.
    • Reasoning chain length and consistency: whether premises stay unchanged across multi-step derivations.
    • Problem modeling: whether a natural-language description can be turned into a correct formal expression.
    • Open-ended exploration: whether the model can construct its own path when no standard solution exists.

    Without separating these dimensions first, evaluation conclusions degrade into personal preference. A more rigorous approach is to rewrite “model ranking” as “relative performance under a specific task distribution, a specific sampling budget, and a specific scoring criterion.” This is the starting point for all the methodology that follows.

    2. Building a Layered Evaluation System

    Split evaluation into four layers, narrowing the problem space step by step.

    Layer 1 is the deterministic computation layer. Problems have a unique answer that can be checked automatically, such as algebraic simplification, equation solving, and numerical probability calculation. This layer verifies basic reliability and can use a relatively large sample size.

    Layer 2 is the standard-solution layer. Problems have a widely accepted solution but involve many steps, so the model must plan intermediate steps itself. The focus here is whether the reasoning chain shows “switching problems midway” or “premise drift.”

    Layer 3 is the open-ended exploration layer. Problems have no single standard path and require constructing auxiliary structures, introducing extra variables, or running a small-scale enumeration to find patterns. A single accuracy metric is not suitable here; human grading is a better fit.

    Layer 4 is the engineering-constraint layer. Under given latency, context length, and call budgets, it examines whether the model still produces stable output. Many apparent “capability differences” actually come from resource constraints rather than the model itself.

    After layering, any comparison must state which layer it refers to, so results from different layers are not mixed into one ranking.

    3. Input-Side Rules: Prompts, Sampling, and Budget Control

    Reproducibility depends first on whether the input is controlled. Fix the prompt template and state output format requirements explicitly, for example asking for key steps first and the final result second, and using a uniform marker for the final answer to make automatic extraction easier.

    Sampling parameters need to be fixed as well. Once temperature, maximum generation length, or retry count changes, results are no longer comparable. For long-chain problems, set a minimum reasoning budget and also record the “budget exhaustion rate”; otherwise truncation gets misread as insufficient capability.

    An illustrative evaluation request structure is shown below (it only conveys the meaning of the fields and does not point to any specific implementation):

    1. {
    2. "task_id": "math_open_017",
    3. "prompt_template": "step_then_answer_v2",
    4. "sampling": {"temperature": 0.2, "max_tokens": 4096},
    5. "retry": 1,
    6. "answer_marker": "<final>"
    7. }

    In addition, decontaminate the problem set: remove original problems that may appear frequently in training corpora, and replace them with equivalent variants or parameter-randomized versions to reduce inflated scores caused by memorization.

    4. Scoring and Statistics: Moving from “Feeling” to Comparability

    Scoring should avoid two extremes: fully automatic matching, which kills legitimate equivalent solutions, and fully manual grading, which is not reproducible. A workable approach is a dual track: automatic checking handles problems with unique answers, human grading handles open-ended ones, and the human grading follows an explicit rubric, for example scoring four items separately: correct modeling, self-consistent steps, correct conclusion, and clear presentation.

    Statistically, do not report only a single accuracy number. Report the pass-rate distribution across multiple samples, confidence intervals, and the distribution of failure types. Failure types can be grouped into calculation errors, modeling errors, logical jumps, format violations, and budget truncation. Only by seeing the failure structure can you tell where a model’s weakness actually lies.

    A simplified statistics output example:

    1. layer=standard pass_rate=0.71 ci95=[0.66,0.76]
    2. failure: calc 38% | modeling 27% | skip 21% | format 14%

    5. Common Pitfalls

    First, drawing global conclusions from a small number of problems. Too small a sample makes rankings fluctuate randomly. Second, comparing only final answers without checking process consistency, so “right answer, wrong reasoning” gets counted as capability. Third, ignoring prompt sensitivity and misreading template differences as model differences. Fourth, equating long chains of thought with strong ability, when overly long chains often come with a higher risk of inconsistency. Fifth, ignoring cost and latency, which makes evaluation results impossible to translate into production decisions.

    6. Engineering Recommendations

    In production, build evaluation as a pipeline: problem version management, parameter snapshots, result archiving, and feeding failure samples back. For high-value scenarios, combine “cross-checking with two models plus rule-based checking,” using deterministic rules as a fallback and models for the open-ended parts. For cloud deployment, container platforms can host evaluation tasks, object storage can hold samples and results, message queues can distribute tasks, and logging services with monitoring and alerting can track stability. These are general capability categories, which makes them easy to port across environments.

    Ultimately, teams should treat evaluation as continuous engineering rather than a one-off activity. Only when the scoring criteria, data versions, and statistical methods are all fixed will the discussion of “how good a model’s mathematical ability is” turn from subjective impression into verifiable, reusable technical conclusions.