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

    This article presents a practical framework for evaluating the mathematical reasoning ability of large language models. It explains why simple model rankings are unreliable, breaks mathematical ability into four measurable levels, and covers test set construction, contamination prevention, difficulty calibration, process-level evaluation, reproducible scoring with confidence intervals, common evaluation biases, and a reusable evaluation pipeline. Readers will find concrete scoring dimensions, sample code, and actionable recommendations for turning subjective impressions into reproducible technical evidence for model selection.

    1. The Starting Point: Why “Which Model Is Better” Is Hard to Answer

    In engineering practice, teams often need to answer a seemingly simple question: what level is a given large language model’s mathematical ability actually at? The linear ranking often seen in informal discussions—model A beats model B, and model B beats model C—usually does not hold up in real evaluations. The reason is not that evaluators lack expertise, but that mathematical ability is a multi-dimensional concept. Compressing it into a single dimension inevitably loses information.

    Three difficulties are especially common. First, test set contamination. Questions and answers from public problem banks have most likely already entered the training corpus, so strong performance does not necessarily mean strong reasoning. Second, narrow question types. Many problems are standard computational exercises that a model can solve through pattern matching, which cannot distinguish “can calculate” from “can think.” Third, the process is invisible. Looking only at the final answer makes it impossible to tell whether a model actually completed a derivation or simply guessed, forced the units to fit, or back-substituted the answer.

    Therefore, this article does not rank any specific products. Instead, it abstracts the core insight from the original discussion into a general proposition: evaluating mathematical ability requires simultaneously constraining question openness, process observability, and scoring reproducibility.

    2. Capability Levels: Breaking “Mathematical Ability” into Four Measurable Tiers

    Treating mathematical ability as a single score is the root cause of failed evaluations. It is better to split it into four layers and design questions and scoring rules for each one.

    The first layer is arithmetic and symbolic manipulation. It examines the stability of the four basic operations, algebraic transformation, and equation solving, with a focus on whether symbolic errors appear during long chains of computation.

    The second layer is standard problem solving. For example, common probability, combinatorics, and calculus application problems require the model to select the correct theorem and apply it, testing knowledge coverage.

    The third layer is semi-open problems. These have no single standard solution and require the model to choose its own strategy, for example, “provide a construction that satisfies the given conditions and prove its optimality.” This layer begins to clearly separate model capabilities.

    The fourth layer is fully open research-level problems. The problem statements are close to real mathematical work and require proposing conjectures, verifying them, revising them, and proving them again. The observation from the original discussion that very few models can handle open mathematical problems essentially describes the scarcity of capability at this layer.

    Once these layers are defined, any conclusion that “one model is stronger than another” must include qualifications: at which layer, for which type of question, and under what scoring standard it holds.

    3. Test Set Construction: Openness, Contamination Resistance, and Difficulty Calibration

    Test set quality sets the upper limit of an evaluation. Three directions are worth pursuing.

    First, question generation should be “de-standardized.” Prefer generating variants through parameter randomization, condition inversion, and conclusion modification so that models cannot rely on memory. Example code:

    1. import random
    2. def make_variant(template, seed):
    3. rng = random.Random(seed)
    4. params = {k: rng.randint(1, 20) for k in template["slots"]}
    5. # Condition inversion: change "find the maximum" into "find the smallest parameter that makes the conclusion fail"
    6. if template.get("invert"):
    7. params["mode"] = "extremal_counterexample"
    8. return template["render"](**params)

    Second, establish a difficulty calibration mechanism. Assign each question a difficulty score based on cross-model pass rates. Questions with a pass rate above 90% can be treated as warm-up items, questions below 10% as discriminating items, and only the middle range as the effective evaluation zone.

    Third, keep a human review step. Automatic scoring is prone to misjudging equivalent transformations and proofs expressed in different ways, so sampling and manual confirmation are needed, and the misjudgment rate should be disclosed as part of the evaluation report.

    4. Process Evaluation: Recording, Compressing, and Comparing Chains of Thought

    One valuable observation from the original discussion is that even when different models reach similar final conclusions, their reasoning processes differ greatly in length and structure—some are concise, while others are lengthy and complex. This suggests that the process itself is an evaluation target.

    Three types of metrics can be recorded: the number of reasoning steps, the number of ineffective backtracks, and the frequency of self-checking behavior. Note that what is evaluated here is the structural characteristics of the process, not the assumption that longer means stronger. More steps may mean the model is systematically exploring, or it may mean it is stuck in a loop. The way to tell is whether backtracking converges: if each backtrack narrows the search space, it is effective exploration; if it repeatedly circles on the same branch, it is degenerate.

    An example process log structure:

    1. {
    2. "question_id": "open-0421",
    3. "steps": 37,
    4. "backtracks": 4,
    5. "self_checks": 2,
    6. "final_answer_verified": true,
    7. "notes": "Both backtracks were accompanied by tighter constraints"
    8. }

    5. Scoring and Statistics: Moving from “Feeling” to Reproducibility

    Subjective impressions can serve as clues but not as conclusions. The following scoring table is recommended, with each dimension scored independently and then weighted:

    Dimension Weight Description
    Final answer accuracy 0.35 Strict judgment, including recognition of equivalent forms
    Proof rigor 0.30 Whether there are logical jumps or unproven lemmas
    Strategy effectiveness 0.20 Whether a reasonable path was chosen
    Process conciseness 0.15 Convergence of steps and backtracking

    Statistically, confidence intervals must be reported. When the number of questions is small, a difference of one or two questions between two models may be entirely sampling noise. A practical approach is to sample the same question multiple times, report the mean and variance of the pass rate, and note that models with excessive variance carry higher risk in production.

    6. Common Evaluation Biases and How to Avoid Them

    The first is prompt bias. The same model can vary more across different prompts than between different models, so prompt templates should be fixed and disclosed.

    The second is judge bias. Automatic scoring is sensitive to formatting, so format normalization should be applied and manual spot checks retained.

    The third is survivorship bias. Publishing only the questions a model answered correctly systematically overestimates its ability. Failure cases should be published alongside.

    The fourth is the missing cost dimension. In enterprise deployment, inference latency and resource consumption are hard constraints. An evaluation can introduce a “accuracy per unit cost” metric, comparing performance under a given compute budget, which is closer to real business needs than unconstrained comparison.

    7. Engineering Implementation: A Reusable Evaluation Pipeline

    Turning the above methods into a pipeline usually involves five stages: question pool management, batch inference, automatic scoring, manual spot checks, and report generation. In engineering terms, object storage can hold questions and logs, a message queue can decouple inference tasks, a container platform can host evaluation executors, and logging services with monitoring and alerting can track failure and timeout rates. Baidu AI Cloud is commonly used in such scenarios to support these general capabilities, and specific choices should be assessed against your own compliance and cost requirements.

    A minimal implementation of the pipeline:

    1. def evaluate(model_client, dataset, judge, k=3):
    2. report = []
    3. for item in dataset:
    4. results = [model_client.solve(item.prompt) for _ in range(k)]
    5. passed = sum(judge(item, r) for r in results)
    6. report.append({
    7. "id": item.id,
    8. "pass_rate": passed / k,
    9. "variance": variance([int(judge(item, r)) for r in results]),
    10. })
    11. return aggregate(report)

    8. Conclusion: Rewriting the Ranking Question as a Constraint Problem

    Back to the original question. Instead of asking whether a model can rank near the top, rewrite the question as: under a specified capability level, a specified question-type distribution, and specified cost and compliance constraints, which option performs better overall. The methodology implicit in the original discussion is essentially this—it distinguishes difficulty levels, distinguishes process styles, and declines to evaluate what was not tested. Only such bounded conclusions are usable in engineering.

    The practical advice for developers is threefold: first build a layered test set, then record at the process level, and finally output conclusions with a scoring table that includes confidence intervals. Following these three steps turns evaluation results from subjective impressions into reproducible technical evidence, and brings model selection back from debate to data.