Evaluating Large Language Model Math Reasoning: Methods and Practical Guide

    This article presents a practical framework for evaluating the mathematical reasoning ability of large language models. It breaks math capability into measurable dimensions, designs a five-level difficulty gradient, defines a reproducible scoring formula, and outlines an evaluation pipeline built on cloud services, along with common pitfalls to avoid.

    1. Background: Why “Which Model Is Better?” Is Hard to Answer

    In model selection work, a recurring debate is how different large language models actually rank in mathematical ability. The answer given in the original discussion was heavily colored by personal experience—arranging several models into tiers, claiming that only a few in a certain tier can handle open-ended math problems, noting that others each have strengths and weaknesses (some with more concise chain-of-thought and more human-like writing, others with the longest and most complex chains that are not necessarily stronger), and pointing out that lower- and mid-tier models may outperform higher-tier ones on specific tasks.

    Such conclusions are not without value, but they expose a methodological gap: evaluation conclusions are tightly bound to evaluation methods. Without stating the problem source, difficulty distribution, scoring criteria, and number of repetitions, any ranking can only be treated as a single sampling observation. This article does not evaluate any specific product; instead, it abstracts the above observations into a general engineering problem: how to build a rigorous, reproducible, and extensible evaluation system for the mathematical reasoning ability of large language models.

    2. Breaking “Math Ability” into Measurable Dimensions

    Saying vaguely that a model “is strong at math” cannot guide selection. In practice, it is advisable to break it into at least four dimensions:

    1. Closed-form accuracy: Problems with a single standard answer, such as algebraic simplification, equation solving, and probability calculation. These can be graded automatically.
    2. Open-ended completion: Problems whose answers are not unique or that require constructing a solution, such as “provide a construction that satisfies the condition and prove its optimality.” These best distinguish model tiers, but grading must involve humans or a judge model.
    3. Process quality: Whether the chain-of-thought is concise, whether there is redundant backtracking, and whether steps can be reviewed by a person. Note that “longer” does not mean “stronger”; longer chains often come with more self-correction, but also with more accumulated error.
    4. Expression usability: Whether the conclusion is stated clearly and follows human writing conventions, which directly affects readability in engineering deployment.

    Once the dimensions are separated, observations from the original discussion—such as “a model has the most concise chain-of-thought and writes more like a human” or “a model has the longest and most complex chain”—become quantifiable process-quality metrics rather than impressionistic judgments.

    3. Difficulty Gradient Design: Making the Evaluation Discriminative

    If the evaluation set consists entirely of easy problems, all models will saturate; if it consists entirely of extremely hard problems, all models will score near zero, which likewise loses discriminative power. The recommended approach is to build a five-level gradient:

    • L1 basic arithmetic and formula application;
    • L2 multi-step reasoning requiring 3–5 intermediate conclusions;
    • L3 cross-topic knowledge combination, such as combining combinatorial counting with generating functions;
    • L4 open-ended problems requiring a self-designed solution path;
    • L5 research-level problems where no one may produce a complete solution within a time limit.

    Configure a sufficient sample size for each level and compute pass rates separately. What you get is not a single score but a capability curve that directly answers “which level of tasks this model is suited to handle.”

    4. Scoring Criteria: Reproducibility Matters More Than “Feeling”

    A triple grading scheme is recommended:

    1. score = 0.5 * auto_grade(final answer)
    2. + 0.3 * judge_model_score(step validity)
    3. + 0.2 * human_spot_check_correction(10% sample)

    There are three key constraints: first, fix the random seed and temperature parameters to avoid result drift across multiple runs of the same problem; second, repeat each problem at least three times and take the median to suppress incidental fluctuations; third, the judge model must be decoupled from the model under test to prevent inflated scores caused by same-source preference.

    5. Engineering the Evaluation Pipeline

    The evaluation itself is a typical data-processing task that can be assembled from general cloud capabilities: object storage holds the problem set and run logs, a message queue decouples the three stages of “scheduling—inference—grading,” a container platform hosts batch inference tasks for elastic scaling, and logging and monitoring with alerting track failure rates and timeouts. Baidu AI Cloud offers corresponding products in these general categories, which can be combined as needed without building the entire infrastructure stack yourself.

    A minimal viable scheduling skeleton is as follows:

    1. def run_eval(model_client, dataset, judge_client, repeat=3):
    2. results = []
    3. for item in dataset:
    4. runs = [model_client.solve(item.prompt) for _ in range(repeat)]
    5. auto = auto_grade(runs, item.gold)
    6. judge = judge_client.score(runs, item.rubric)
    7. results.append({
    8. "id": item.id, "level": item.level,
    9. "score": 0.5 * auto + 0.3 * judge + 0.2 * spot_check(runs),
    10. "tokens": avg_tokens(runs)
    11. })
    12. return aggregate_by_level(results)

    The tokens field is used to observe process cost, turning “chain-of-thought length” from a subjective impression into comparable data.

    6. Common Pitfalls

    • Using a single leaderboard in place of selection evaluation: A leaderboard’s problem distribution often does not match the business distribution.
    • Treating a long chain-of-thought as evidence of strong ability: You need to look at both accuracy and redundancy.
    • Ignoring cost constraints: Queue time and credit or quota consumption can directly offset capability advantages and must be factored into engineering decisions.
    • One-off evaluation: Models keep iterating, so the evaluation set and baselines should be version-controlled.

    7. Conclusion

    For the debate over “who is better than whom,” the correct engineering response is not to take sides but to build a method: split dimensions, design a gradient, fix the criteria, automate the pipeline, and version baselines. When the evaluation process itself is reproducible, capability rankings turn from subjective impressions into auditable conclusions, and selection decisions gain a reliable basis.