Evaluating and Selecting LLMs for Mathematical Reasoning: A Practical Guide
This guide explains why mathematical reasoning is difficult to reduce to a single benchmark score and how to evaluate it systematically. It breaks reasoning ability into four measurable task layers, outlines how to build a reproducible evaluation set, and introduces process-quality metrics alongside accuracy. It also covers fair cross-model experiment design with controlled variables and aligned budgets, followed by four architecture practices—layered routing, tool integration, self-verification, and observability—plus common pitfalls to avoid.
1. The Starting Point: Why “Math Ability” Resists a One-Line Definition
In model selection discussions, the most common argument is “which one is stronger.” But once the question narrows to mathematical reasoning, “strong” turns out to be a composite concept. It covers at least five stages: problem understanding, symbolic manipulation, multi-step planning, self-verification, and result presentation. Ranking different models on a single linear leaderboard compresses a multi-dimensional problem into a one-dimensional ordering, which is easy to mislead in engineering practice.
A more reasonable approach is to break ability into observable metrics and then weight them for the target business scenario. For example, a numerical calculation assistant cares more about final answer accuracy; a teaching and explanation scenario cares more about step interpretability; an automated pipeline invocation cares more about output structure stability and the latency cost introduced by long chains of thought.
2. Capability Layers: Breaking “Math Ability” into Measurable Dimensions
It is advisable to distinguish at least the following four task layers, with increasing difficulty and different evaluation value:
- Arithmetic and algebra fundamentals: four basic operations, equation solving, inequality transformation. This mainly tests the stability of basic symbolic manipulation.
- Multi-step word problems: natural language must be converted into a model and then solved in several steps, testing modeling and planning ability.
- Competition and open-ended problems: no fixed pattern exists, requiring exploratory thinking, trying multiple paths, and backtracking. This layer shows the widest gaps.
- Rigor layer: requires verifiable derivations, boundary discussion, and counterexample checks, testing whether a model “looks right but has a wrong process.”
The original text emphasizes that very few models can handle open-ended math problems. This judgment holds up in engineering: the first two layers can be substantially compensated through prompt engineering and tool calls, while the third and fourth layers depend heavily on the model’s own reasoning depth and self-correction ability.
3. Building the Evaluation Set: Reproducibility Matters More Than “Feel”
Subjective experience is easily affected by problem difficulty, prompt wording, and randomness. To obtain reproducible conclusions, the evaluation set should meet four conditions:
- Layered coverage: all four task layers must have samples, with enough samples per layer to avoid individual problems dominating the conclusion.
- Decidable answers: prioritize automatically verifiable numerical solutions, set solutions, or equivalent expressions to reduce human scoring bias.
- Annotatable difficulty: label each problem with the minimum reasoning steps required and whether it contains trap conditions, enabling stratified statistics.
- Version freezing: version the evaluation set together with the prompt templates so controlled experiments can be run when the model or prompts change.
A simplified evaluation loop is shown below, focusing on fixed budget and unified judgment:
def evaluate(model_client, dataset, max_steps=6, temperature=0.0):report = {}for level, items in dataset.by_level().items():passed, total, steps_sum = 0, 0, 0for item in items:result = model_client.solve(prompt=item.prompt,temperature=temperature,max_reasoning_steps=max_steps,)steps_sum += result.reasoning_stepstotal += 1if is_equivalent(result.final_answer, item.gold):passed += 1report[level] = {"accuracy": passed / total,"avg_steps": steps_sum / total,}return report
4. Process Correctness and the Double-Edged Sword of Long Chains of Thought
The most easily overlooked aspect in evaluation is process quality. A model may give a correct answer through guessing or vague phrasing, or it may fail on a correct line of reasoning because of a mistake in the final calculation step. Three auxiliary metrics are recommended:
- Step consistency: whether intermediate conclusions contradict each other or involve circular reasoning.
- Verifiability: whether the model proactively performs substitution checks, dimensional analysis, or boundary discussion.
- Redundancy: whether the number of reasoning steps significantly exceeds what the problem requires.
The original text notes that chain-of-thought length varies markedly across models. Some are more concise and closer to human writing, while others have extremely long chains. In engineering, this directly maps to cost: the longer the chain of thought, the higher the token consumption and latency, which in batch invocation scenarios can be amplified into order-of-magnitude differences in bills. Therefore, “longer reasoning” does not automatically mean “stronger problem solving”; it needs to be evaluated jointly with accuracy, for example by observing pass rate per unit cost.
5. Designing Cross-Model Comparisons: Controlled Variables and Aligned Budgets
For a fair cross-model comparison, the key is controlling variables:
- Unify prompts and output format constraints so no model gains an advantage from a better-fitting format.
- Unify temperature and the maximum reasoning step limit to prevent comparisons under different budgets.
- Record three costs: number of calls, input and output size, and end-to-end latency.
- Sample multiple times and take the mean and variance to observe stability rather than a single highlight.
For presenting results, three tables are recommended—layered accuracy, average steps, and pass rate per unit cost—rather than a single overall ranking. Only this can answer the question the business truly cares about: under my problem distribution, which combination is the most cost-effective.
6. From Leaderboards to Architecture: Four Engineering Practices
- Layered routing: simple problems go through lightweight models or rule-based paths, while open-ended and rigor problems are escalated to strong reasoning models, balancing cost and effectiveness.
- Tool collaboration: delegate precise calculation, symbolic computation, and code execution to external tools, with the model responsible for modeling and planning, which can significantly reduce basic arithmetic errors.
- Self-verification step: add result back-substitution and consistency checks to the pipeline, triggering a second reasoning pass when necessary, trading controllable extra overhead for reliability.
- Observability: use logging services and monitoring alerts to continuously observe the call chain, pass rate, latency, and cost, forming a traceable evaluation loop; training and evaluation data can be version-managed with object storage, and batch inference tasks can run on a container platform with elastic scaling.
7. Common Pitfalls
- Substituting the outcome of individual problems for an overall conclusion, ignoring differences in problem distribution.
- Looking only at the final answer without checking whether the process is verifiable, leading to frequent “right answer, wrong explanation” after launch.
- Ignoring cost and stability, and selecting a “strongest but unusable” solution.
- Treating prompt engineering as a universal patch, ignoring the hard constraint of the model’s own reasoning depth on open-ended problems.
8. Conclusion
Comparing mathematical reasoning ability should shift from a one-dimensional ranking to a multi-dimensional, reproducible evaluation system: a layered task set, dual process-and-result metrics, and budget-aligned cross-model experiments, combined with architecture design of routing, tool collaboration, and self-verification. This can both identify models that genuinely possess exploration and backtracking ability on open-ended problems and achieve an engineering-usable balance among cost, latency, and reliability. If an enterprise wants to run a similar evaluation on its own data and business distribution, it can build a reproducible evaluation and observability loop based on the general capabilities provided by Baidu AI Cloud, such as object storage, container platform, logging services, and monitoring alerts.
