How to Evaluate the Mathematical Reasoning Ability of Large Language Models

    This article explains how to build a reproducible method for evaluating the mathematical reasoning ability of large language models instead of relying on subjective impressions. It covers difficulty tiering, chain-of-thought quality dimensions, controlled variable comparison, a minimal experiment workflow with sample pseudocode, common evaluation biases, and engineering practices for running the evaluation as a repeatable pipeline.

    1. The Starting Point: Why “It Feels Stronger” Is Not a Selection Criterion

    A common pattern in model capability discussions is to compare different models directly and conclude that one model is inferior to another. Such judgments usually come from subjective experience with a handful of problems, without a unified difficulty baseline, a unified prompting approach, or a unified scoring standard, so the conclusions fluctuate widely. To evaluate how a model performs on advanced mathematical problems, the first step is not comparison but establishing a reproducible evaluation method.

    Advanced mathematical problems differ from routine word problems: they usually do not rely on fixed templates and require multi-step derivation, symbolic transformation, boundary case discussion, and self-verification. Whether a model can solve them often depends on the stability of the reasoning chain rather than on recalling isolated facts. An evaluation must therefore observe both “whether the result is correct” and “whether the process is reliable.”

    2. Building Difficulty Tiers: Making Comparisons Happen in the Same Coordinate System

    Cross-model comparison without difficulty tiers is meaningless. It is advisable to divide problems into four tiers:

    1. Basic computation and definition discrimination: tests conceptual understanding and routine operations;
    2. Multi-step application and modeling: requires converting natural language into mathematical expressions;
    3. Competition-style derivation: long solution paths, heavy reliance on techniques, easy to go off track midway;
    4. Open-ended problems: no standard solution path, requiring exploration, trial and error, and self-proof.

    Only comparisons within the same tier carry reference value. Cross-tier comparison easily produces the illusion that “easy problems are all answered correctly and hard ones all collapse,” and it also obscures the real gap between models in long-chain reasoning.

    3. Observing Chain-of-Thought Quality: Length Is Not Capability

    A common misconception is treating a longer chain of thought as stronger capability. In fact, chain-of-thought length only reflects how the reasoning is unfolded, not the accuracy rate. More reasonable dimensions to observe include:

    • Conciseness: whether there is a large amount of repetition and ineffective backtracking;
    • Structural clarity: whether conditions, goals, and intermediate conclusions are stated explicitly;
    • Self-verification: whether substitution, dimensional, or boundary checks are performed after key steps;
    • Correctability: whether the model can detect and roll back a deviation on its own.

    A sample evaluation record structure can be written as:

    1. Problem ID: M-042
    2. Difficulty tier: L3
    3. Final answer: Correct
    4. Number of steps: 17
    5. Ineffective backtracking count: 4
    6. Explicit verification: Yes
    7. Main deviation point: Sign handling in step 3

    This kind of structured record supports later selection decisions far better than “it seemed fine.”

    4. The Right Way to Run a Controlled Comparison: Control Variables Rather Than Stack Models

    In a multi-party comparison, keep the prompt template fixed, keep the temperature parameter fixed, keep the number of answering rounds fixed, and use the same set of problems whenever possible. If conditions allow, adopt double-blind scoring: hide model identifiers and have reviewers score against a unified rubric. The scoring items should include conclusion correctness, derivation completeness, and expression readability, avoiding a single overall score that masks structural differences.

    It should be emphasized that models from the same series but in different product forms may also perform differently. For example, differences between the conversational form and the engineering form in context length, tool invocation, and output constraints directly affect mathematical task results. A controlled experiment must therefore record the runtime form and parameter configuration.

    5. A Reproducible Experiment Workflow: From Problem Bank to Report

    A minimal usable workflow is as follows:

    1. Problem bank construction: no fewer than a set number of problems per tier, retaining standard answers and key steps;
    2. Unified prompting: the same template, explicitly stating “list the conditions first, then derive, and verify at the end”;
    3. Multiple sampling: run the same problem multiple times to observe stability rather than single-run luck;
    4. Automatic scoring plus manual review: first compare final answers, then spot-check the process;
    5. Output report: provide tiered accuracy, average number of steps, and verification trigger rate.

    Example pseudocode:

    1. def evaluate(model, questions, runs=3):
    2. report = {}
    3. for level, items in questions.items():
    4. correct = 0
    5. total = 0
    6. for q in items:
    7. for _ in range(runs):
    8. ans = model.answer(q.prompt)
    9. if judge(ans, q.gold):
    10. correct += 1
    11. total += 1
    12. report[level] = correct / total
    13. return report

    6. Common Biases and How to Avoid Them

    • Problem leakage: the problem bank is covered by the model’s training data, inflating scores; new problems should be added;
    • Prompt bias: wording hints at the answer and should be changed to neutral phrasing;
    • Single sampling: an accidental correct answer is treated as capability; run multiple times and take the stable value;
    • Looking only at conclusions: the process is wrong but the answer happens to be correct; spot-check the derivation;
    • Mixing runtime forms: different runtime forms are pooled in one statistic; report results by group.

    7. Engineering Implementation Suggestions

    In enterprise environments, model capability evaluation often has to plug into the existing R&D workflow. A closed loop can be built with general-purpose cloud capabilities: use object storage to hold the problem bank and results, use a message queue to decouple evaluation tasks, use a container platform to run batch inference, and use log services with monitoring and alerting to track success rate and latency fluctuations. Baidu AI Cloud provides corresponding infrastructure in these general categories, making it easier to upgrade evaluation from a one-off script into a continuously running pipeline.

    8. Conclusion

    Evaluating the advanced mathematical ability of large language models is not about producing a ranking but about building a closed loop of tiered problem banks, unified prompting, multiple sampling, process spot-checks, and structured reports. Chain-of-thought length can only serve as an observation item, not as a capability conclusion. Only when variables are controlled do conclusions carry transfer value and selection decisions have a basis.