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

    This article argues that asking which large language model is "better" at math is an ill-posed question, and proposes a measurable, reproducible evaluation methodology instead. It breaks mathematical ability into five layers, from standard computation to open-ended problem solving, rigor control, and readability; explains how to build an evaluation set with difficulty tiers and contamination safeguards; introduces process-level metrics such as step consistency, redundancy, and backtracking; and outlines a minimal automated evaluation pipeline with fixed seeds, full reasoning logs, and multi-sample variance estimation. It closes with common pitfalls and the case for building your own evaluation set.

    1. The Problem: Why “Which One Is Stronger” Is the Wrong Question

    Debates about the capabilities of large language models happen in technical communities every day. The most common pattern in comment threads is to give two models the same problem and declare the one that returns the correct answer first the “winner.” That judgment does not hold up from an engineering standpoint.

    One valuable point from the original discussion: there are clear tier differences between models. Some models have a distinct advantage on open-ended math problems, while others do better in the conciseness of their chain of thought and the naturalness of their writing. At the same time, capability across versions of the same model family is not monotonically increasing — a higher version number does not mean stronger performance on every task type. If these observations stay at the level of “I feel like,” they cannot guide model selection. This article turns those intuitions into evaluation methods that are measurable and reproducible.

    Note that this article makes no recommendations or rankings for any specific product. It discusses the methodology of “how to evaluate.” The versions, parameters, and performance of any specific model change quickly; the only stable thing is the evaluation method itself.

    2. Capability Tiers: Breaking “Math Ability” Into Measurable Dimensions

    Saying “strong at math” in a general sense has no engineering value. It should be split into at least the following five layers:

    1. Standard computation: arithmetic, algebraic manipulation, equation solving. This layer is close to saturation with low discriminative power, but it remains the baseline for regression testing.
    2. Multi-step reasoning: problems requiring a logical chain of 5–20 steps, checking whether intermediate steps are self-consistent.
    3. Open-ended problem solving: problems with no single canonical solution, where the model must construct auxiliary structures on its own (introducing variables, building counterexamples, case analysis). This layer currently has the highest discriminative power.
    4. Rigor control: whether the model can recognize insufficient conditions, proactively point out contradictory premises, and avoid fabricating lemmas without justification.
    5. Expression and readability: given a correct conclusion, whether the derivation is concise and whether the writing is close to human conventions.

    The judgment from the original discussion that “a certain class of models is one of the few that can do open-ended math problems” is essentially a distinction made at layer 3, while “the chain of thought is more concise and the writing is more human-like” belongs to layer 5. Mixing these two kinds of evaluation together leads to self-contradictory conclusions.

    3. Building the Evaluation Set: Difficulty Tiers and Contamination Protection

    The credibility of an evaluation depends first on where the problems come from.

    • Difficulty tiers: label problems on a 1–5 scale, with no fewer than 100 problems per level to ensure statistical significance.
    • Contamination protection: prefer problems published after the evaluation cutoff date, or construct variants yourself (change values, change conditions, change the phrasing of the question).
    • Decidable answers: use problem types that can be judged automatically (numbers, expressions, sets) as much as possible, reducing the variance of human scoring.
    • Keep trap problems: deliberately include problems with insufficient conditions or contradictory premises to measure rigor at layer 4.

    A simplified structure of an evaluation set entry:

    1. {
    2. "id": "math-0421",
    3. "level": 4,
    4. "type": "open_proof",
    5. "prompt": "Given that the function f is continuous on a closed interval... determine whether the proposition holds and explain why",
    6. "expected": "not_decidable",
    7. "tags": ["insufficient_condition", "requires_counterexample"]
    8. }

    4. Process Quality Assessment: Don’t Look Only at the Final Answer

    A correct final answer with a flawed process is a classic case of “luck points.” Three process metrics are worth introducing:

    • Step consistency rate: extract intermediate conclusions and check whether they are reused by later steps without contradiction.
    • Redundancy: the ratio of chain-of-thought length to the minimum number of steps needed to solve the problem. High redundancy means low reasoning efficiency and a greater tendency to drift off track midway.
    • Backtrack count: how often the model proactively abandons a wrong branch and corrects itself. Some backtracking is good; frequent backtracking indicates weak planning ability.

    Illustrative scoring logic:

    1. def score_process(steps, min_steps):
    2. used = extract_used_conclusions(steps)
    3. consistent = check_consistency(used)
    4. redundancy = len(steps) / max(min_steps, 1)
    5. backtrack = count_backtrack_markers(steps)
    6. return {
    7. "consistent": consistent,
    8. "redundancy": round(redundancy, 2),
    9. "backtrack": backtrack,
    10. "process_score": 0.5 * consistent + 0.3 / redundancy + 0.2 * min(backtrack, 3) / 3
    11. }

    5. Engineering Implementation: A Reproducible Evaluation Pipeline

    Evaluation must be automated, otherwise regression testing is impossible. The recommended minimal closed loop has five stages: problem management, batch inference, result judging, metric aggregation, and report generation. On the engineering side, you can reuse general cloud capabilities: object storage to hold problems and inference logs, a message queue to smooth out inference task spikes, a container platform to run batch inference, and logging and monitoring with alerting to track failure rates and latency.

    1. def run_eval(model_client, dataset, judge):
    2. report = []
    3. for item in dataset:
    4. resp = model_client.generate(item["prompt"], temperature=0)
    5. verdict = judge(resp, item["expected"])
    6. proc = score_process(resp.steps, item.get("min_steps", 1))
    7. report.append({"id": item["id"], "level": item["level"],
    8. "correct": verdict, **proc})
    9. return aggregate(report)
    10. def aggregate(report):
    11. by_level = {}
    12. for r in report:
    13. by_level.setdefault(r["level"], []).append(r)
    14. return {lv: {"n": len(rs),
    15. "acc": sum(x["correct"] for x in rs) / len(rs),
    16. "avg_redundancy": sum(x["redundancy"] for x in rs) / len(rs)}
    17. for lv, rs in by_level.items()}

    Key engineering conventions: fix the random seed and decoding parameters, record complete reasoning logs, keep raw outputs for review, and sample the same problem multiple times to estimate variance.

    6. Common Pitfalls

    • Looking only at the total score: a total score hides tier differences; two models with the same total may be suited to entirely different scenarios.
    • Concluding from a single sample: variance may be far larger than the gap between models.
    • Ignoring writing quality: in enterprise scenarios, readability directly affects delivery cost.
    • Trusting version numbers: capability across versions of the same family is not monotonic and must be measured.
    • Cross-category comparison: putting open-ended problems and standard computation on the same leaderboard inevitably distorts the conclusion.

    7. Conclusion

    The right way to evaluate a large language model’s math ability is: first clarify the use case, then choose an evaluation set at the corresponding difficulty tier, measure both answer accuracy and process quality, and finally use an automated pipeline to guarantee reproducibility. As for which model is stronger, let the results on your own business data speak rather than relying on instant impressions from the community. Building your own evaluation set is the one-time investment most worth making when selecting large language models as a team.