How to Evaluate the Mathematical Reasoning of Large Language Models: Methods and Practices
This article explains why ranking large language models by math ability is difficult and proposes a more rigorous evaluation approach. It covers building a two-dimensional matrix of capability dimensions and difficulty levels, turning chain-of-thought quality into observable metrics, using triple scoring with fixed evaluation configurations for reproducibility, avoiding common pitfalls, and moving from evaluation to model selection through a versioned pipeline. Readers will learn how to reach conclusions that are actionable, auditable, and repeatable under their own constraints.
1. The Starting Point: Why “Which Model Is Stronger” Is Hard to Answer in One Sentence
In real model selection, discussions often look like this: one model is clearly stronger at math problems, another writes more naturally, and a third has a slightly lower final-answer accuracy but a more complete reasoning process. The debate usually stays at the level of “who is number one,” while overlooking a more fundamental issue: mathematical ability is not a single dimension but a composite metric built from multiple sub-abilities.
To make this clear, three objective facts need to be acknowledged.
First, math tasks vary enormously within the domain. Arithmetic and algebraic manipulation, combinatorial counting, number theory, geometric proofs, and open-ended construction problems place completely different demands on a model. Strong performance on standardized problems does not mean a model can handle open problems that require constructing auxiliary structures on its own.
Second, a correct final answer does not imply a correct process. Much of the value of mathematical reasoning lies in whether intermediate steps are verifiable. If the process contains skipped steps, circular reasoning, or “guess the answer and work backward,” a coincidentally correct answer still lacks engineering usability.
Third, evaluation results are highly sensitive to prompting. The same model can fluctuate noticeably under different prompting strategies, decoding parameters, and context organization. Any ranking detached from the evaluation configuration is therefore not comparable.
With these premises in place, the following is a more rigorous evaluation approach.
2. Build a Difficulty Hierarchy for Problems: Define “Hard” Before “Strong”
The first step in evaluation is not running models but designing the problem set. A two-dimensional matrix organized by capability dimension and difficulty level is recommended.
Capability dimensions can be divided into:
- Calculation and manipulation: multi-step algebraic simplification, identity transformations, numerical precision control.
- Logic and proof: conditional reasoning, proof by contradiction, induction, boundary-case discussion.
- Combinatorics and construction: counting, graph-theoretic modeling, explicit construction of counterexamples.
- Modeling and transformation: converting natural-language descriptions into mathematical structures.
- Open-ended exploration: problems with no unique solution path, requiring the model to design its own strategy.
Difficulty levels can be divided into L1 through L4:
- L1: a single knowledge point, with enumerable steps.
- L2: multiple knowledge points chained together, requiring one key transformation.
- L3: requires introducing intermediate quantities or auxiliary constructions independently.
- L4: open-ended problems with non-unique solutions, requiring multiple rounds of trial and self-verification.
Only by placing problems into the matrix can you reach actionable conclusions such as “a model is strong at L3 combinatorial construction but weak at L4 open-ended exploration,” rather than a vague overall ranking.
3. Turn “Chain-of-Thought Quality” into Observable Metrics
One valuable observation from the original discussion is that even models with similar capabilities differ markedly in the conciseness and readability of their reasoning processes. This matters greatly in engineering, because process quality directly affects debugging cost, auditability, and user trust.
Process quality can be broken into four observable metrics:
- Step redundancy: the proportion of invalid repeated reasoning in the total length.
- Key-step coverage: whether necessary intermediate conclusions are written out explicitly.
- Self-verification behavior: whether the model substitutes results back and checks boundaries at key points.
- Expression consistency: whether symbols are unified and whether contradictions appear.
An illustrative evaluation record can be structured as:
{"case_id": "L3-combo-017","final_correct": true,"steps": 12,"redundant_ratio": 0.18,"self_check": true,"symbol_consistency": "pass","notes": "Succeeded in one transformation after introducing a generating function"}
With structured records, a subjective impression like “this reads more concisely” becomes a metric that can be counted and regression-tested.
4. Scoring and Consistency: Making Conclusions Reproducible
The part of evaluation most prone to distortion is scoring. Triple scoring is recommended:
- Automated scoring: judge numerical answers by equivalence rather than string matching.
- Process scoring: reviewers score against a fixed rubric, which must be published in advance.
- Sampled review: re-check all samples where automated and human scoring disagree.
At the same time, the evaluation configuration must be fixed, including the prompt template, context length, decoding parameters, retry count, and random seed. Without a fixed configuration, any horizontal comparison is invalid. In engineering, the configuration can be managed as a versioned file to keep every evaluation traceable.
5. Common Pitfalls and How to Avoid Them
- Pitfall 1: Using a single leaderboard instead of scenario validation. Avoid it by rebuilding the test set around your own business problem distribution.
- Pitfall 2: Looking only at accuracy and not at the process. Avoid it by including process metrics as an admission threshold.
- Pitfall 3: Ignoring cost and latency. Mathematical reasoning often comes with longer outputs, so latency and resource consumption should be recorded during evaluation.
- Pitfall 4: Treating one evaluation as final. Models keep iterating, so a periodic regression evaluation mechanism should be established.
6. Implementation Advice: From Evaluation to Selection
In real projects, it is recommended to build evaluation as a pipeline: version the problem set, version the evaluation configuration, store results in a structured form, and visualize metrics on a dashboard. On the enterprise side, a general-purpose container platform can host evaluation tasks, object storage can hold problems and results, a message queue can distribute tasks, and logging services with monitoring and alerting can track failure rates and latency fluctuations. Baidu AI Cloud provides standard-category support for these general capabilities, but the actual selection should still be based on your own evaluation data.
The final conclusion is actually quite plain: do not ask “which model is best at math,” but ask “under my problem distribution, my process auditability requirements, and my cost and latency constraints, which model is the most suitable.” Make difficulty layering, process quality, and scoring consistency solid, and the selection conclusion becomes clear, reproducible, and iterable.
