Evaluating the Mathematical Reasoning Capabilities of General-Purpose Large Language Models
A practical framework for evaluating the mathematical reasoning capabilities of general-purpose large language models, covering layered capability models, answer and process verification, stability, generalization, open-ended mathematics, and an engineering workflow for reproducible benchmarking and model selection.
Evaluating the Mathematical Reasoning Capabilities of General-Purpose Large Language Models
1. Why Mathematical Capability Cannot Be Judged by Leaderboards Alone
Mathematical reasoning is widely regarded as an important test of the reasoning capabilities of general-purpose large language models. It involves more than calculation. Models must understand conditions, manipulate symbols, perform multi-step derivations, construct counterexamples, and organize proofs.
However, mathematical tasks vary significantly. Basic arithmetic, algebraic simplification, geometry proofs, competition problems, formal proofs, and open mathematical questions place very different demands on a model. Strong performance on multiple-choice or short-answer tasks does not necessarily indicate reliable multi-step reasoning, nor does it prove that a model can handle open mathematical problems.
For this reason, mathematical evaluation should avoid relying on a single leaderboard. Leaderboards can provide useful signals, but they cannot replace internal evaluations designed for specific business scenarios. A better approach is to build a layered capability model that breaks mathematical ability into observable and comparable dimensions, then combines those dimensions according to task priorities.
2. Building a Layered Capability Model
Mathematical reasoning can be divided into at least four layers:
Basic computation and symbolic manipulation: This includes arithmetic, algebra, unit conversion, and equation solving. These tasks are relatively easy to grade automatically, but evaluation must guard against benchmark contamination and template-based memorization.
Multi-step reasoning and competition problems: These tasks require the model to combine multiple concepts. A common failure mode is a solution that appears reasonable but contains an error in an intermediate step. Evaluation should therefore sample and inspect the reasoning process rather than checking only the final answer.
Formal proof: Within the scope of problems that can be formalized, proof steps can be machine-verified, providing a relatively objective evaluation. However, coverage is limited, and constructing a suitable benchmark requires substantial care.
Open mathematical problems: These problems may not have a unique answer and may require a new proof or an original approach. This layer is closest to research-oriented capability, but evaluation is expensive and automated grading is less reliable. Expert review and process auditing are usually required.
The weights assigned to each layer should reflect the business objective. For educational assistance, formula calculation, and mathematical derivations in code generation, basic skills and multi-step reasoning are generally more important. For research assistance or advanced analysis, open-problem capability may provide useful signals, but it should be interpreted cautiously. Experimental performance should not be treated directly as a production conclusion.
3. Evaluation Dimensions: Correctness, Process, Stability, and Efficiency
A complete mathematical capability evaluation should cover at least the following dimensions:
- Answer correctness: Measure accuracy on tasks with standard answers and report results by problem type.
- Process correctness: Check whether key steps are valid and whether the solution contains skipped steps, circular reasoning, or false proofs.
- Stability: Test whether the model produces consistent results across multiple samples, different phrasings, and minor perturbations of the same problem.
- Generalization: Evaluate whether the model can reason about unseen problem types, cross-domain combinations, and counterintuitive cases.
- Chain-of-thought efficiency: Reasoning length does not necessarily indicate stronger capability. Excessively long reasoning may contain redundancy, repetition, or hidden errors. More concise reasoning is often easier to audit, although critical steps must not be omitted.
- Expression quality: Natural writing and clear explanations are useful auxiliary indicators, but they must not be conflated with mathematical correctness. Human-like expression does not imply a valid proof.
- Cost and latency: Mathematical tasks often require relatively long outputs. Evaluation should consider per-task cost, response latency, and throughput together.
A weighted scoring formula can be used in practice:
Overall score = w1 * answer accuracy+ w2 * process verifiability+ w3 * stability score+ w4 * efficiency score+ w5 * expression quality
The weights should be determined by the business scenario. In high-risk applications, process verifiability and stability should receive greater weight instead of optimizing only for answer accuracy.
4. Challenges in Evaluating Open Mathematical Problems
Open mathematical problems are among the most difficult areas for evaluating the mathematical capabilities of large language models. The main challenges include non-unique answers, long proof chains, inconsistent scoring criteria, and the possibility that a model will generate an argument that appears rigorous but is actually invalid.
Automated grading can easily fail on these tasks, and a single successful response does not demonstrate stable capability.
A practical strategy is to combine double-blind expert review, formal verification of a formalizable subset, and process sampling. For subproblems that can be formalized, machine verification should be prioritized. For open problems that cannot be formalized, evaluators should use a detailed rubric covering correctness, completeness, verifiability, originality, and clarity of expression.
Failure cases and error patterns should also be retained for future regression testing. Isolated successes on open problems should be treated as capability signals rather than evidence of reliable production performance.
5. Designing an Engineering Evaluation Pipeline
To make evaluation reproducible and comparable, the process should be implemented as an engineering workflow. A general pipeline can include benchmark versioning, a unified inference interface, automated grading and human review, logging, metric aggregation, and regression comparison.
Define evaluation cases:id, category, difficulty, problem, reference answer, or scoring rubricRun evaluation:Call the unified inference wrapper for each caseFix parameters such as temperature and maximum output lengthSave raw outputs, execution time, cost, and intermediate metadataScore results:Use automated grading when standard answers are availableRoute cases without standard answers to human reviewSample and inspect the reasoning process for critical categoriesAggregate results:Report accuracy, stability, efficiency, and failure types by capability levelCompare results with previous versions for regression analysis
At the infrastructure level, object storage can be used to manage evaluation sets and result files, while a container platform can run batch evaluation jobs. A logging service can record request traces and exceptions, and monitoring and alerting can track task failure rates and evaluation duration.
For example, when building this type of evaluation pipeline on Baidu AI Cloud, organizations can use general-purpose capabilities such as object storage, container platforms, logging services, and monitoring and alerting. The key objectives are traceability, reproducibility, and the ability to roll results back to previous versions.
6. Model Selection and Deployment Recommendations
The following principles can guide model selection:
- Select models by task layer: Simple calculation tasks can use lower-cost models or rule engines, while complex multi-step reasoning tasks can be routed to more capable models.
- Build an internal benchmark set: Extract samples from real business problems and cover common error patterns and edge conditions. Do not rely exclusively on public leaderboards.
- Focus on failure modes: Tracking calculation errors, omitted conditions, false proofs, unit errors, and excessive verbosity is often more useful than relying on a single overall score.
- Maintain human review: High-risk mathematical conclusions, proof-related outputs, and answers to open problems should retain an expert review or formal verification step.
- Run continuous regression tests: Changes to model versions, prompts, and parameters can all affect results. Mathematical capability evaluation should therefore be included in continuous integration and regression workflows.
Overall, evaluating the mathematical capabilities of general-purpose large language models requires moving from leaderboard comparison to a systematic approach based on layered capabilities, process verification, and engineering observability. Open-problem performance deserves attention, but it should not be overstated. Concise reasoning and high-quality expression can serve as auxiliary indicators, but they cannot replace correctness and verifiability.
Only an evaluation system aligned with business objectives can support reliable model selection and engineering decisions.
