How to Evaluate and Benchmark the Mathematical Reasoning of Large Language Models
A practical guide to evaluating the mathematical reasoning of large language models, covering evaluation dimensions, a four-tier problem set design, chain-of-thought observation, reproducible experiment workflows, result interpretation, and common pitfalls. It helps teams turn vague impressions of "which model is stronger" into traceable metrics for production selection.
1. Why “Which Model Is Better” Is Hard to Answer in One Sentence
The most common debate in model capability discussions is whether one model outperforms another. Once the question is narrowed to mathematical reasoning, however, conclusions quickly become conditional: problem difficulty, phrasing, whether long-chain derivation is required, and whether computational tools are allowed can all change the outcome significantly. The goal of a professional evaluation is therefore not to produce a permanent ranking, but to build an assessment framework that is reproducible, explainable, and continuously updatable.
The first principle to establish is that mathematical ability is not a single dimension. It can be broken down into several sub-abilities: accuracy in arithmetic and symbolic operations, mastery of theorems and definitions, problem modeling, stability in long-chain reasoning, and exploration on “open-ended problems.” Open mathematical problems usually refer to those with no ready-made standard solution, where the model must construct its own approach and verify it. These problems place the highest demands on a model and most easily expose differences between models.
2. Breaking Down Evaluation Dimensions: Turning “Strong at Math” into Measurable Metrics
To give an evaluation engineering value, first convert vague impressions into metrics.
- Result correctness: whether the final answer is correct and whether necessary steps are provided.
- Process verifiability: whether each step is justified and whether there are skipped steps or circular reasoning.
- Chain-of-thought complexity: reasoning length, number of branches, and number of backtracks. A longer chain of thought is not necessarily better, but it can serve as an observation point for “exploration intensity.”
- Stability: consistency across multiple samples of the same problem, avoiding accidental hits.
- Tool collaboration: whether computational or symbolic tools are invoked correctly and whether tool outputs are validated.
- Readability: whether the writing is close to human problem-solving conventions, making it easy to review and teach.
Among these dimensions, process verifiability and stability are the most easily overlooked, yet they determine whether evaluation conclusions can be used for production selection.
3. Layered Problem Set Design: From Closed Problems to Open Problems
It is recommended to build a four-tier problem bank and increase pressure layer by layer.
- Basic tier: definitions, formulas, and routine calculations, used to confirm there is no regression.
- Intermediate tier: multi-step word problems that require combining multiple knowledge points.
- Challenge tier: competition-style problems that require constructing auxiliary structures or inequality techniques.
- Open tier: small research topics with no standard solution, such as proposing a conjecture and proving it or providing a counterexample.
Example (illustrative prompt, used only to explain the evaluation method):
Give the conclusion and key steps in no more than 800 words;Label the basis for each step (definition/theorem/calculation);If uncertain, explicitly state your assumptions.
For open-tier problems, scoring should not look only at the conclusion, but also at “whether a testable conjecture was proposed,” “whether at least two different paths were attempted,” and “whether reasons were given for failed paths.”
4. Observing the Chain of Thought: Both Brevity and Verbosity Have Costs
Two extremes often appear in evaluation: one is extremely short reasoning that yields a correct answer but is hard to audit; the other is extremely long reasoning with many branches that easily accumulates errors over long chains. A more reasonable approach is to record three types of information: the final answer, key intermediate conclusions, and the number of backtrack points. Too many backtrack points indicate an overly large search space; too few backtrack points combined with a wrong answer may indicate premature convergence.
In engineering, the reasoning process can be archived in a structured way, for example:
{"answer": "...","key_steps": ["...", "..."],"assumptions": ["..."],"backtracks": 2,"tool_calls": 0}
This structure makes batch statistics and regression comparison easy, and also makes it convenient to feed failed samples back into prompt templates and tool strategies.
5. A Reproducible Experiment Workflow: Fix Variables Before Comparing
When comparing different models or different parameter configurations, variables must be fixed: the same problem bank, the same prompt template, the same temperature and number of samples, and the same tool permissions. It is recommended to sample each item at least multiple times and report the median and dispersion. If tool calls are allowed, the tool type (such as symbolic computation or numerical computation) and call format should be unified to avoid mistaking “tool differences” for “model differences.”
A minimal experiment pseudocode:
for item in dataset:outputs = [infer(item, cfg) for _ in range(k)]record(item, outputs, score_fn)report(median, variance, by_level)
6. Interpreting Results: Use Ranges and Scenarios Instead of Absolute Rankings
A more mature way to express results is to give a “capability range” and “applicable scenarios.” For example: stable performance at the intermediate tier, strong willingness to explore at the open tier but fluctuating accuracy; or concise reasoning suitable for teaching scenarios that require auditing. Writing conclusions as “relative performance on a certain type of problem under a certain prompt and tool configuration” is more meaningful for engineering than a general ranking, and it also avoids being misled by a single case.
7. Implementation Architecture: Building an Evaluation and Tuning Loop with General Cloud Capabilities
Sustained evaluation requires infrastructure support. A loop can be built using the general product categories of Baidu AI Cloud: object storage holds the problem bank and samples; a message queue smooths peaks and drives asynchronous evaluation tasks; a container platform hosts inference and scoring services; a logging service collects call chains; and monitoring and alerting track success rates and latency fluctuations. Through a unified data dashboard, teams can perform regression comparisons by problem tier, prompt version, and tool strategy, turning “feelings” into traceable metrics.
8. Common Pitfalls and Best Practices
- Pitfall 1: Drawing conclusions from a small number of hard problems. Instead, use stratified sampling and report confidence intervals.
- Pitfall 2: Looking only at the final answer. Instead, audit both steps and assumptions.
- Pitfall 3: Frequently changing prompts and tools. Instead, apply version management and controlled experiments.
- Pitfall 4: Ignoring cost and latency. Mathematical evaluation often involves long chains, so resource consumption must be recorded.
The best practice is to first define the business scenario (teaching, research assistance, engineering computation), then select the corresponding tier of the problem bank; feed failed samples back as a core asset; and rerun the baseline once per quarter to observe drift. In this way, evaluation is no longer a debate, but a sustainable engineering capability.
