Evaluating Mathematical Reasoning in Large Language Models: Methods, Metrics, and Selection Practices
Mathematical reasoning is one of the hardest capabilities to measure in LLM evaluation. This article explains why final-answer accuracy alone is insufficient, proposes five evaluation dimensions, describes how to build a tiered problem set, details a three-step review process for proofs, and covers cost-latency trade-offs, a sample evaluation pipeline, common pitfalls, and practical recommendations for model selection.
Mathematical reasoning is one of the most difficult capabilities to quantify in LLM evaluation. The same model may perform reliably on basic algebra problems yet produce highly variable results on proof problems that require combining multiple lemmas across many steps. For R&D teams and engineers responsible for model selection, “it feels good to use” cannot support a decision. What is needed is a reproducible, decomposable, and comparable evaluation methodology.
1. Why the Final Answer Is Not Enough
The final answer is only a coarse-grained signal. The value of a mathematical proof lies in the derivation itself: whether each step follows strictly from the premises, whether the correct theorems are cited, and whether any conditions have been omitted. A model may reach the correct conclusion while skipping a critical assumption, or produce a fluent derivation that introduces an error at some boundary case. Evaluation should therefore record “is the conclusion correct” and “is the process reliable” as separate signals; otherwise the two error types get mixed together and become impossible to diagnose.
2. Decomposing the Evaluation Dimensions
At minimum, the following five dimensions should be covered.
- Conclusion correctness: whether the final answer or the truth judgment of the proposition is correct.
- Derivation completeness: whether all necessary steps are covered, and whether there are skipped steps or circular reasoning.
- Citation accuracy: whether the definitions, theorems, and lemmas cited match their original statements in terms of preconditions and conclusions.
- Self-consistency: whether the model’s judgment stays stable when the same problem is rephrased or asked in a different order.
- Resources and latency: per-problem inference time, output length, and call cost.
The first four dimensions measure capability; the fifth measures engineering feasibility. Both categories must be included in model selection—relying on only one usually leads to a biased conclusion.
3. Problem Set Construction and Tiering
The evaluation set should be tiered by difficulty so that capability boundaries can be located.
- Basic tier: standard textbook-style problems that test fundamental computation and conceptual understanding.
- Intermediate tier: problems requiring the combination of two or three theorems, testing knowledge retrieval and application.
- Proof tier: propositions requiring a complete argument, such as proving a generalization of a known result under specific conditions.
- Open tier: problems without an accepted answer. These can only rely on expert review and should not serve as the primary source of automated metrics.
Two points matter when sourcing problems. First, prefer publicly available textbook problems or a self-built problem bank, and avoid content of unclear provenance or disputed copyright. Second, guard against data contamination. If a problem has been published and absorbed into training corpora, the model’s performance may come from memorization rather than reasoning. Self-authored new problems, rewritten variants, and a private held-out set reflect real capability more reliably.
4. Reviewing Proof-Style Outputs
Proof outputs cannot be judged by string matching; they typically require a three-step review.
Step one: structural check. Confirm that the proof explicitly lists its assumptions, intermediate conclusions, and final conclusion, with clear logical links between steps. A proof with a missing structure should receive a lower score even if its conclusion is correct.
Step two: step-by-step verification. Break the proof into atomic assertions and judge whether each one follows from what precedes it. For parts that can be formalized, formal proof tools can assist verification; for parts that resist formalization, reviewers annotate each assertion manually.
Step three: boundary testing. Modify conditions or construct edge cases and observe whether the proof still holds. If the proof only works under an undeclared assumption, it contains a hidden premise and should be judged incomplete.
Citation verification is also critical. When a model cites a theorem, check its number, name, and applicability conditions. If no corresponding statement can be found in public literature, the citation should be judged unreliable. For propositions without any published reference proof, independent expert judgment is the only reliable basis—“looks complete” is not the same as “correct.”
5. Engineering Trade-offs Between Cost and Speed
Model selection is fundamentally a multi-objective trade-off, usually involving four metrics.
- Accuracy: correctness rate and proof completeness rate on the target problem set.
- Cost per task: average call cost to complete one problem, equal to per-output cost multiplied by average output length.
- Time to first token: the wait from submitting a request to receiving the first output chunk.
- Overall throughput: the number of requests processed per unit of time, which determines the completion cycle of batch tasks.
The general pattern is that longer reasoning chains tend to yield higher accuracy, but cost and latency rise accordingly. Different scenarios should therefore prioritize differently.
| Scenario | Priority Metrics | Selection Approach |
|---|---|---|
| Exploration and brainstorming | Diversity and inspiration | Slower responses are acceptable; multiple sampling allowed |
| Batch execution, structured output | Latency, stability, throughput | Prioritize success rate and predictable response times |
| Hard proofs, rigorous derivation | Derivation completeness | Accept high cost and long reasoning chains, with human review |
Deployment mode also affects the cost structure. Pay-as-you-go cloud pricing and a self-hosted inference cluster have different total cost of ownership models; self-hosting additionally requires accounting for hardware utilization and operational overhead. Before selecting, estimate based on actual request volume and peak distribution rather than comparing unit prices directly.
6. A Sample Evaluation Pipeline
The code below illustrates the basic structure of batch evaluation. The model client, step splitting, and grading functions are placeholder interfaces that must be implemented for your actual environment.
# Sample code: batch evaluation of mathematical reasoning tasks# client, split_into_steps, grader, and summarize are placeholder interfacesdef evaluate(model_client, problems, grader):records = []for p in problems:start = now()output = model_client.generate(p.statement)latency = now() - startsteps = split_into_steps(output.text)verdict = grader.check(p.statement, steps, p.reference)records.append({"id": p.id,"level": p.level,"correct": verdict.correct,"gap_count": verdict.gap_count,"latency_s": latency,"output_tokens": output.token_count,})return summarize(records)
At the summarization stage, it is recommended to compute accuracy, average gap count, and percentiles of time-to-first-token and total latency separately for each difficulty tier. Tiered statistics prevent an overall average from masking an obvious weakness in one tier.
7. Common Pitfalls
- Treating fluency as correctness. A smoothly written proof may not survive step-by-step verification.
- Sampling only once. Sampling the same problem multiple times and comparing conclusion consistency better reflects stability.
- Ignoring evaluation set leakage. Public problems may already appear in training data; the problem set needs periodic rotation or a private reserve.
- Ignoring the effect of prompt templates. The same model can behave very differently under different prompting strategies; fix the template during evaluation and record it in full.
- Selecting on a single metric. Accuracy alone ignores cost; speed alone ignores derivation quality. Both belong in the decision table.
8. Practical Recommendations
Build a versioned internal problem bank, and annotate each problem with difficulty, source, and reference answer. For every evaluation run, record the model version, parameter settings, prompt template, and evaluation date so results remain reproducible. Introduce a human review step for high-stakes conclusions that will drive business decisions. Merge evaluation results with cost data into a selection table, and re-evaluate periodically—model version updates can shift capability distributions, so past conclusions may not remain valid over time.
