How to Evaluate the Mathematical Reasoning of Large Language Models
This article breaks down a practical framework for evaluating the mathematical reasoning of large language models. It explains why ranking models is difficult, how to layer tasks into closed-form, semi-open, and open problems, and how to design four orthogonal metrics covering correctness, process validity, sampling consistency, and readability. It also covers why chain-of-thought length is not a proxy for capability, how to use anchor-based pairwise comparison to produce interval-style conclusions, and how to build a reproducible evaluation pipeline with common pitfalls to avoid.
1. The Starting Point: Why “Who Is Better” Is Hard to Answer in One Sentence
In discussions of model capability, mathematical reasoning is often treated as a hard metric because it has relatively clear correctness criteria. But once the questions move from “compute this definite integral” or “solve this equation” to open-ended problems with no standard solution method, “who is better” stops being a question you can answer in one sentence. The genuinely valuable signal in the original discussion was not the ranking itself, but the evaluation dimensions it implied: chain-of-thought length, naturalness of expression, the relative position of models across tiers, and the restraint of “no test, no judgment.” Abstracting these scattered points yields a rigorous, engineering-oriented evaluation methodology.
2. Layer the Tasks First: Closed-Form and Open Problems Are Not the Same Contest
The first step in evaluation is task layering; without it, conclusions are inevitably distorted.
- Closed-form problems: a unique answer or one that can be judged automatically, such as algebraic simplification, probability calculation, or standard proof fill-in-the-blank. The focus is accuracy and stability.
- Semi-open problems: a limited set of solution paths but free expression, such as proving a given theorem or giving a constructive example. The focus is logical completeness and coverage of key steps.
- Open problems: no known solution or an enormous answer space, such as small-scale exploration of unsolved problems or conjecture construction. The focus is exploration strategy, explainability of failure, and whether the model produces a “pseudo-proof that looks rigorous.”
The judgment in the original discussion that “a certain class of models is among the few that can handle open mathematical problems” is essentially a distinction made at the third layer. Engineering practice must acknowledge that evaluation at the third layer cannot rely on the final answer alone; it must incorporate process evaluation.
3. Designing Evaluation Dimensions: Four Orthogonal Metrics
It is advisable to split metrics into four non-overlapping groups so that a total score does not mask weaknesses.
- Result correctness: for problems that can be verified automatically, use dual channels of symbolic computation and numerical checking.
- Process validity: whether steps are auditable, and whether there are skipped steps, circular reasoning, or implicit unproven assumptions.
- Sampling consistency: sample the same problem multiple times and check whether the answer distribution converges. For open problems, pay particular attention to whether the model is “consistently wrong.”
- Expression usability: whether the reasoning is concise and easy for a human to review. This corresponds to the original discussion’s “more concise chain of thought, writing that reads more like a human.” It is a usability metric, not a capability metric, and the two must be tracked separately.
A schematic evaluation record can be written as:
{"task_id": "open-0421","layer": "open","samples": [{"answer": "candidate_A", "steps": 17, "verified": false, "self_check": "gap_at_step_9"},{"answer": "candidate_B", "steps": 23, "verified": false, "self_check": "none"}],"consistency": 0.5,"process_score": 0.42,"readability": 0.78}
The key point is that problems with verified=false must not enter the accuracy statistics; they can only enter the process and consistency statistics. Otherwise, the ranking will be inflated by models that are willing to make bold claims.
4. Why Chain-of-Thought Length Is Not a Measure of Capability
The original discussion noted that chain-of-thought length varies markedly across models, and the longest is not necessarily the strongest. This is easy to verify in practice: reasoning length and accuracy typically follow an inverted U-shaped relationship. Too short means skipped steps; too long often means repeated self-doubt, re-verifying the same branch, or even introducing new false assumptions in the later half.
It is therefore recommended to record three quantities at the same time: total steps, effective steps (steps that advance the conclusion), and the number of backtracks. If the proportion of backtracks is too high, it indicates the model lacks a reliable mechanism for judging intermediate conclusions. Evaluation reports should present the ratio of “effective steps / total steps” rather than length alone.
5. Tier-Based Comparison: Use Relative Position Instead of Absolute Scores
The form of judgment given in the original discussion is essentially “tier mapping”: one model sits between two reference tiers, and a certain version reaches the level of a given tier. This approach is more robust when no unified benchmark exists, and it can be formalized in engineering terms as follows:
- Select a set of anchor models as the reference frame; the anchors need to cover different capability layers.
- Run pairwise comparisons on the same question set and compute win rates rather than absolute scores.
- Use win rates to construct a partial order and output interval-style conclusions such as “located between A and B,” annotated with the width of the confidence interval.
def rank_interval(pairwise_winrate, anchors, alpha=0.05):# pairwise_winrate: {(model, anchor): winrate}lower = max([a for a in anchors if pairwise_winrate.get((model, a), 0) > 0.5],key=lambda a: pairwise_winrate[(model, a)], default=None)upper = min([a for a in anchors if pairwise_winrate.get((model, a), 0) < 0.5],key=lambda a: pairwise_winrate[(model, a)], default=None)return lower, upper, alpha
This kind of statement naturally carries uncertainty and is closer to the truth than “which rank.”
6. A Reproducible Evaluation Pipeline
The most common cause of evaluation failure is not the model but a pipeline that cannot be reproduced. The recommended minimal closed loop:
- Version the question set: manage questions, reference answers, and judging scripts in the same repository; any change produces a new version number.
- Containerized execution: fix dependencies and random seeds to avoid environment differences contaminating results.
- Concurrency scheduling and rate limiting: use a queue to smooth peaks during batch inference, and automatically retry failed tasks with traces retained.
- Full logging and metrics: store requests, responses, and judging results separately to make them easy to trace back.
- Dashboards and alerts: notify promptly when accuracy, consistency, or latency shows abnormal fluctuation.
When deploying on the cloud, you can use object storage to hold the question set and artifacts, a message queue for task distribution, a container platform to host the judging sandbox, and logging and monitoring services for observability. Baidu AI Cloud provides the general-purpose capabilities listed above and can serve as optional infrastructure for building such an evaluation system.
7. A Checklist of Common Pitfalls
- Drawing conclusions from a single run: a single sample cannot distinguish capability from luck.
- Inferring open-problem ability from closed-form results: the correlation between the two is limited.
- Treating expression style as intelligence: concise does not mean correct, and verbose does not mean deep.
- Judging without testing: the attitude in the original discussion of “no comment without running high-end math problems” is precisely a manifestation of evaluation discipline.
- Ignoring prompt sensitivity: the same model can fluctuate more across different prompt templates than the gap between models, so prompt templates must be included in version management.
8. Conclusion
For discussions of large models’ mathematical ability, what is genuinely reusable is the methodology, not the rankings: layer the tasks first, then split into orthogonal metrics, use pairwise comparison to produce interval-style conclusions, use a versioned pipeline to guarantee reproducibility, and strictly separate “unverified” from “verified.” Following this framework, a team will not get a single sentence about “who is first,” but an auditable chain of evidence that can guide selection and iteration.
