How to Evaluate and Benchmark the Mathematical Reasoning of Large Language Models
This guide presents a practical framework for evaluating the mathematical reasoning of large language models (LLMs). It explains why single-number rankings are unreliable, breaks mathematical ability into four dimensions, and organizes evaluation into three layers: auto-checkable closed problems, process-scored proofs, and open-ended problems that prioritize verifiability. It also covers score aggregation with capability, cost, and stability vectors, plus how to turn one-off evaluation into continuous regression with versioned datasets, fixed sampling, layered release gates, and cost dashboards. Readers will learn how to make model selection a reproducible engineering decision rather than a subjective impression.
1. Why “Which Model Is Better” Is Hard to Answer in One Sentence
In real evaluation and selection work, teams often run into the same kind of debate. Someone compares one model against another and concludes that a certain model simply cannot match another. Someone else tries a model once and produces a complete capability ranking from that single experience. The problem with these discussions is not whether the conclusion is right or wrong, but that there is no reproducible evaluation standard behind it.
Mathematical reasoning is itself a multi-dimensional concept. At minimum, it can be broken down into four layers:
- Computation and symbolic manipulation: arithmetic, solving equations, simplification, and factorization.
- Structured reasoning: geometric proofs, combinatorial counting, and constructions or proof by contradiction in number theory.
- Open-ended problems: incomplete problem conditions, self-directed modeling, and non-unique answers.
- Expression and verifiability: whether the reasoning chain is clear, whether steps can be reviewed, and whether conclusions can be formally checked.
Different models do not occupy the same relative position across these four layers. One model may perform consistently on standardized problems but fail on geometry problems that require constructing an auxiliary line. Another may be weak at short answers but expand its reasoning chain thoroughly, making fewer mistakes on complex problems. For this reason, any “ranking” that is detached from the problem set, scoring rules, and cost should be treated as personal experience, not an engineering conclusion.
2. A Layered Evaluation Framework: Turning “Ability” into Measurable Metrics
It is recommended to split evaluation into three layers, tightening the strength of conclusions at each layer.
2.1 Layer 1: Closed Problems with Automatic Judging
These problems have a unique answer and are suitable for large-scale regression. Typical examples include arithmetic word problems, equations and inequalities, and basic probability calculations. The evaluation focuses on accuracy and stability: whether the same problem yields consistent answers across multiple samples, and whether the answer remains correct after slight prompt perturbations.
A sample evaluation data structure can be written as:
{"id": "math-0001","category": "algebra","difficulty": "L1","prompt": "Solve the equation and give all real roots","reference_answer": ["x=2", "x=-3"],"checker": "symbolic_equal","max_tokens": 2048}
Here, the checker should use symbolic equivalence rather than string matching, to avoid false negatives caused by expression differences such as “2.0” versus “2”.
2.2 Layer 2: Proof Problems That Require Process Judging
Proof problems cannot be judged by the conclusion alone, so process scoring must be introduced. A workable approach is “rubric + two-person review”: break the reference answer into several key steps (such as “identifying a constructible auxiliary quantity”, “completing the induction hypothesis”, and “verifying boundary cases”), and assign 0/0.5/1 points to each step. To reduce cost, rules can be used for initial screening first (whether key conclusions are included, whether there are signs of circular reasoning), followed by manual review of borderline samples.
It is important to emphasize that the length of a reasoning chain does not equal accuracy. In practice, two extremes are common: one type of model has a very short reasoning chain that is concise but prone to skipping steps; another has a very long reasoning chain that covers more branches but costs more and has higher latency, and the later part of a long chain is more prone to self-repetition. When evaluating, one should record both “accuracy” and “average reasoning length per correct sample” to judge whether a long chain truly brings benefits.
2.3 Layer 3: Open Mathematical Problems
Open problems refer to problems with incomplete conditions that require self-assumptions or modeling, for example, “give a construction that satisfies a certain property and prove its optimality”. Such problems have no unique answer, so evaluation should shift to “verifiability first”:
- Whether the conclusion can be independently verified (for example, whether a construction satisfies the constraints, whether the upper and lower bounds match);
- Whether the assumptions made are explicitly listed;
- Whether there are logical jumps or unproven assertions.
This layer is not suitable for a single overall score. It is better suited to output a capability profile: relative performance on construction-type, estimation-type, and contradiction-type problems.
3. Score Aggregation and Result Presentation
Combining the three layers into a single overall score often masks differences. It is recommended to use “vectorized presentation + weighted views”:
- Capability vector: closed-problem accuracy, process score, and open-problem verifiability rate.
- Cost vector: average input and output tokens, average latency, and cost per correct sample.
- Stability vector: variance across multiple samples and score drop under prompt perturbations.
A sample aggregation logic:
def aggregate(metrics, weights):# metrics: normalized scores for each layer# weights: business focus weights, e.g., higher weight for open problemsscore = sum(metrics[k] * weights[k] for k in weights)return round(score, 4)weights = {"closed": 0.3, "process": 0.3, "open": 0.4}
When reporting externally, it is recommended to provide both the “capability vector” and the “cost vector”, so decision-makers can see the trade-off between “stronger” and “more expensive”, rather than just a single rank.
4. Engineering Implementation: From One-Off Evaluation to Continuous Regression
Evaluation only has long-term value when embedded in the development process. The recommended minimal loop has four steps:
- Dataset versioning: keep the dataset and scoring scripts together under version control, and record the reason for any change.
- Fixed sampling: fix the random seed and number of samples to ensure comparability across versions.
- Layered gates: block a release if closed-problem accuracy drops below a threshold, and treat the process score and open-problem verifiability rate as observation metrics.
- Cost dashboard: connect token consumption, latency, and failure rate to logging services and monitoring alerts to form trend curves.
Architecturally, evaluation tasks can run on a container platform, with datasets and result objects stored in object storage, task queues decoupled with a message queue, and evaluation reports archived through a logging service. This avoids evaluation tasks affecting the online request path and makes it easy to trace back by version.
5. Common Pitfalls and How to Avoid Them
- Pitfall 1: Drawing global conclusions from a small number of problems. Avoidance: cover multiple difficulty layers and problem types in the dataset, and report confidence intervals.
- Pitfall 2: Looking only at the final answer. Avoidance: introduce a process rubric and sampling review for proof problems.
- Pitfall 3: Treating reasoning length as ability. Avoidance: track both the reasoning length and cost per correct sample.
- Pitfall 4: Ignoring prompt sensitivity. Avoidance: design prompt perturbation groups and observe the score drop.
- Pitfall 5: One-off evaluation. Avoidance: build regression gates and a trend dashboard.
6. Conclusion
Evaluating the mathematical ability of a large model is essentially building a reproducible, layered, and sustainable measurement system. Rather than arguing whether a certain model “simply cannot match” another, it is better to reframe the question as: under what problem type, what difficulty, and what cost constraint is a given model more robust? When the evaluation standard is clear, the metrics can be reviewed, and the cost can be accounted for, model selection turns from subjective impression into an engineering decision. For enterprises that want to quickly build this system, general capabilities such as the container platform, object storage, message queue, and monitoring alerts offered by Baidu AI Cloud can be used to solidify the evaluation pipeline and continuously track changes in model capability.
