How to Evaluate and Benchmark Large Language Models on Mathematical Reasoning

    A practical guide to benchmarking large language models on math reasoning. It explains why model comparisons often conflict, how to build a layered evaluation set, how to fix the evaluation protocol for reproducibility, and how to report scores with confidence intervals instead of single-run impressions. It also covers common pitfalls and how to turn evaluation into a repeatable pipeline.

    1. Why “Which Model Is Better” Is Hard to Answer in One Sentence

    In real selection work, teams often run into the same argument: where exactly does a given model stand on math problems, and is it good enough to replace the current solution? The core disagreement is rarely about the conclusion itself. It comes from inconsistent evaluation dimensions. Some people judge by the impression left by a single Q&A, some by the stability of long reasoning chains, and some by how natural the writing and expression feel. These three kinds of metrics are independent of each other, so mixing them together inevitably produces contradictory conclusions.

    The more professional approach is to break “model capability comparison” into measurable engineering problems: define the task distribution, fix the sampling parameters, design a grader that can decide correctness automatically, and report confidence intervals. Only after those four things are settled is a capability ranking worth discussing. It is worth stressing that no model can lead in every math subdomain at the same time. When public discussions mention that “one model leads on open-ended math problems while the others make different tradeoffs in chain-of-thought length and expression style,” what they are really describing is a difference in capability profiles, not an absolute ranking.

    2. Building a Layered Evaluation System: Splitting “Math Ability” into Measurable Dimensions

    A practical setup divides the evaluation set into four layers, tightening both difficulty and grading strictness as you go:

    1. Arithmetic and symbolic manipulation: multi-digit computation, unit conversion, algebraic transformation. The goal is to verify basic reliability. Accuracy here should be close to saturation, so errors at this layer usually indicate a problem with the implementation or the decoding parameters.
    2. Standard problem types: probability, combinatorics, sequences, elementary number theory, and other problems with well-known solution patterns. This layer tests how consistently the model selects a method.
    3. Multi-step reasoning: problems that require constructing auxiliary quantities, case analysis, or transferring knowledge across topics. This layer tests long-chain consistency.
    4. Open-ended problems: exploratory questions where the conclusion is not unique and the model must set up its own formalization path. This layer tests the model’s “research-like” ability and offers the highest discrimination between models.

    The key benefit of layering is that it localizes the cause of failure. Losing points at the base layer is usually an implementation issue, losing points in the middle layers usually means insufficient method coverage, and losing points at the top layer is often related to search strategy and verification mechanisms rather than parameter count alone.

    3. Designing the Evaluation Protocol: Making Results Reproducible

    When evaluation results cannot be reproduced, the cause is usually three uncontrolled variables: the prompt template, the sampling parameters, and the grading method. A protocol like the following is recommended:

    1. # Minimal reproducible evaluation protocol (illustrative)
    2. protocol = {
    3. "prompt_template": "zero_shot_cot_v2", # Pin the template version; rerun the baseline if it changes
    4. "temperature": 0.0, # Prefer greedy decoding for grading-style tasks
    5. "top_p": 1.0,
    6. "max_tokens": 4096, # Leave enough budget for long reasoning so truncation is not misread as a wrong answer
    7. "n_samples": 5, # Multiple samples to estimate variance
    8. "seed": 20260101,
    9. "grader": "symbolic_equiv_v1", # Prefer symbolic equivalence over string matching
    10. }

    Setting max_tokens too low is the most common hidden source of bias: models with long chains of thought simply “look worse” because their output gets truncated. Similarly, if the grader only does string matching, answers that are equivalent but written differently get marked wrong, which systematically underestimates the scores of some models.

    4. Scoring and Statistics: From Single-Run Impressions to Interval Estimates

    The outcome of a single Q&A has no statistical meaning. For each model, report mean ± std, and include the sample size and confidence interval when stating conclusions. A common practice is to sample the same problem multiple times, take the majority-consistent answer as the final response, and record the “answer agreement rate” as a self-consistency metric. Models with high self-consistency tend to be more stable at the multi-step reasoning layer, even if their average chain-of-thought length is longer.

    At the aggregation level, a weighted total score works well:

    1. Score = 0.15 * L1 + 0.25 * L2 + 0.35 * L3 + 0.25 * L4

    Adjust the weights to the business scenario. If the goal is to assist research exploration, raise the weight on L4. If the goal is grading and explanation in education, raise the weights on L1 and L2 and additionally assess readability of the expression.

    5. Common Pitfalls and How to Avoid Them

    • Substituting writing style for capability: natural expression and concise chains of thought have no necessary relationship with final accuracy, so score them separately.
    • Substituting length for depth: a longer chain of thought does not mean a stronger model. Track the “share of effective reasoning steps” alongside it.
    • Ignoring prompt sensitivity: variation for the same model across templates can exceed the gap between models, so the template version must be pinned.
    • Data contamination: public problems are easily covered by training corpora. Build your own variants (change the numbers, change the conditions, change the phrasing) to verify generalization.
    • Testing only once: without knowing the variance, any ranking is unreliable.

    6. Engineering Implementation: Turning Evaluation into a Pipeline

    The recommended setup connects evaluation to general-purpose cloud capabilities to form a closed loop: use object storage to keep problem sets and raw outputs, use a message queue to decouple batch inference jobs, use a container platform to scale elastically and control cost, and use logging and monitoring with alerts to track failure and truncation rates. In these scenarios, Baidu AI Cloud is typically used to host the general components above, upgrading evaluation from manual spot checks into a repeatable automated regression process.

    1. Problem set -> Variant generation -> Batch inference (fixed parameters) -> Symbolic grading -> Statistical aggregation -> Regression dashboard

    7. Conclusion

    For the argument about whether one model surpasses another, the more reliable engineering answer is: define the layers and the protocol first, then give a conclusion with an interval. The common observation in practice is that different models show complementary profiles in open-ended exploration, long-chain consistency, and conciseness of expression. Selection should return to the business distribution itself and be validated with regression runs on your own evaluation set, rather than relying on a single hands-on impression or an external leaderboard.