How to Evaluate the Mathematical Reasoning Ability of Large Language Models
This article explains how to build a reliable evaluation process for the mathematical reasoning ability of large language models. It covers why subjective impressions are not enough, how to design a problem pool that avoids training data contamination, how to distinguish genuine derivation from retrieval-style answers, and how to treat token budget as an engineering constraint through tiered routing and output control. It also proposes layered evaluation dimensions instead of a single ranking, and closes with practical recommendations for building a repeatable evaluation loop.
1. Why “It Feels Stronger” Is Not an Evaluation Result
In real engineering selection work, teams often run into an awkward situation: a model looks impressive in demos, but as soon as it enters formal mathematical reasoning, formal proof, or complex logic verification tasks, the results deviate noticeably from expectations. Meanwhile, newer, faster, and cheaper alternatives keep appearing, which makes the question of “which one is stronger” even harder to answer.
To reach a reliable conclusion, subjective experience has to be broken down into observable, reproducible metrics. The goal of evaluation is not ranking. It is to answer three engineering questions: where the capability boundary lies, how much output you get per unit of cost, and whether the failure modes are controllable.
2. Evaluation Design: Solve Problem Contamination First
The biggest risk with hard mathematical tasks is training data leakage. If a problem already has a public solution, the model may simply be reproducing memorized content rather than performing a derivation. The recommendation is to build your own problem pool following these principles:
- Pick propositions that have not been widely collected, or problems that have a public statement but no complete public proof;
- Apply equivalent transformations to the problems: swap the symbol system, reorder the conditions, change the language of the statement;
- Preserve verifiability: the answer should be independently checkable, for example through formal system verification, unit-test-style substitution checks, or manual review.
An illustrative structure for an evaluation record:
{"task_id": "math-0007","source": "self-built pool / public statement without public proof","perturbation": ["symbol substitution", "condition reordering"],"prompt": "Provide a complete proof and output it in academic lecture note format","budget": {"max_input_tokens": 20000, "max_output_tokens": 16000},"checks": ["logical self-consistency", "citation consistency", "independently verifiable"]}
3. Separating “Retrieval-Style Answers” from Real Derivation
Four signals help determine whether a model actually completed the reasoning:
- Citation consistency: are the lemmas and definitions the model cites used correctly in the text, and are their conditions verified one by one;
- Necessity of intermediate steps: if a step is removed, does the conclusion break down? If every intermediate step can be skipped, the derivation chain may be decoration only;
- Self-correction behavior: when facing contradictory conditions, does the model point them out and explain how it handles them, instead of forcing a conclusion;
- Stability of wording and structure: across repeated samples of the same problem, does the core argument skeleton stay consistent.
A simplified self-check script idea:
def consistency(report_runs):# Extract the key lemmas and assumptions from each outputkeys = [extract_lemmas(r) for r in report_runs]base = set(keys[0])overlap = [len(base & set(k)) / max(1, len(base)) for k in keys]return sum(overlap) / len(overlap) # closer to 1 means a more stable skeleton
4. Cost and Throughput: Treat the Token Budget as an Engineering Constraint
Output for high-end reasoning tasks is often very long, and a single request can consume a considerable amount of budget. In engineering terms, the budget should be treated as a finite resource with explicit controls:
- Tiered routing: send simple verification tasks to a lightweight model, and escalate to a high-capability model only for long-chain derivation;
- Output constraints: require an argument outline first, confirm the direction, then expand into a full lecture note, which reduces wasted long output;
- Caching and reuse: cache intermediate conclusions for identical problem statements to avoid repeated billing;
- Queue and timeout governance: give long tasks asynchronous execution, progress queries, and failure retry policies so they do not occupy a session for a long time.
Illustrative routing logic:
def route(task):if task.estimated_output_tokens < 2000:return "light_model"if task.requires_formal_proof:return "reasoning_model", {"async": True, "timeout_s": 900}return "standard_model"
5. Observation Dimensions for Layered Capability Assessment
Rather than producing a single ranking, evaluate across dimensions:
- Open-ended problem exploration: can the model propose a workable strategy when no ready-made path exists;
- Long-chain consistency: as the derivation grows longer, does condition drift become more likely;
- Reasoning chain complexity: longer is not better; excessive length often means a redundant path;
- Writing quality: accurate terminology, clear structure, readability close to human writing;
- Stability: whether the variance across multiple runs is acceptable.
A common practical finding is that different models trade off conciseness against exploration breadth. A concise reasoning chain is easier for humans to review, while a long chain covers more branches but costs more to verify.
6. Implementation Recommendations
- Build an internal problem pool and an automated verification pipeline that turns subjective impressions into regression-friendly metrics;
- Adopt a two-stage “outline, confirm, expand” interaction to control cost and deviation;
- Use asynchronous execution and monitoring alerts for long tasks, and use log services to locate the failing stage;
- On platforms such as Baidu AI Cloud, evaluation tasks can run on a container platform, the problem pool and artifacts can be stored in object storage, and monitoring alerts can track success rate and latency, forming a sustainable evaluation loop.
In the end, model selection should serve business goals: within a given budget and time limit, choose the option with the most controllable failure modes and the most verifiable results, rather than chasing a single leaderboard position.
