LLM Mathematical Reasoning Evaluation and Model Selection: A Practical Framework
This article presents a practical framework for evaluating and selecting large language models for mathematical reasoning. It covers decomposing mathematical reasoning into measurable subskills, designing layered evaluation sets and scoring rubrics, reducing data contamination, adding multi-pass validation, calculating effective cost, routing models by task difficulty, and reviewing generated proofs and documentation.
1. Why Mathematical Reasoning Is the Easiest Model-Selection Scenario to Misjudge
In model-selection discussions, many conclusions come from personal experience: one model “thinks clearly,” while another “writes more naturally.” Such impressions are useful references, but they are not enough to support procurement or architecture decisions.
Mathematical reasoning tasks have a distinctive characteristic: the output is often fluent and well formatted, while an error may be hidden in a symbol substitution, an implicit assumption, or an incorrect citation at a particular step. A reader skimming the output may not notice the problem. Evaluation must therefore distinguish between “looks correct” and “is actually correct.”
2. Decompose “Mathematical Ability” into Measurable Subskills
Asking broadly “which model is good at math” does not produce an actionable answer. A better approach is to break the work into task types and evaluate each one:
- Statement comprehension: Can the model accurately restate the conditions and conclusion, and identify quantifiers and domains of definition?
- Knowledge retrieval: Can it correctly cite known theorems and check their applicability conditions?
- Step-by-step derivation: Does each step follow strictly from the premises, and are there logical jumps?
- Counterexample construction: When faced with a false proposition, can it provide a valid counterexample?
- Proof completeness: Does it cover all cases, and does it handle boundary conditions?
- Notational and presentational consistency: Are symbols, numbering, and formula formatting consistent enough to make manual review easier?
Each subskill corresponds to different failure modes. A common failure in knowledge retrieval is mismatched theorem application, where a theorem with a similar name but different preconditions is cited. A common failure in derivation is circular reasoning, where the conclusion is quietly used as a premise. Clear failure modes give reviewers a basis for judgment.
3. Build Evaluation Sets and Scoring Rubrics
Evaluation sets should be layered. The first layer consists of problems with standard answers, which are suitable for automatic comparison. The second layer consists of classical theorem proofs from textbooks, which require manual judgment of whether the steps are rigorous. The third layer consists of propositions for which no complete public proof exists in the literature. This layer has the highest cost, and its conclusions must be reviewed by domain experts.
Data contamination also requires attention. If a problem and its answer have appeared extensively in the training corpus, the score may reflect memorization rather than reasoning ability. Possible mitigations include using new problems published after the model’s training cutoff, or having the evaluation team write problems and maintain a private, unpublished problem bank.
Scoring should cover at least four dimensions: conclusion correctness, derivation completeness, citation accuracy, and clarity of presentation. Each dimension needs clear levels. For example, completeness can be divided into three levels: “no gaps,” “gaps that can be repaired,” and “critical steps missing.” Two or more reviewers should score independently, and an agreement metric should be calculated. If agreement is low, the rubric needs refinement rather than simple averaging.
4. From Single Responses to Multiple Validation
A single response has limited reliability. In practice, the following mechanisms can be combined:
- Multiple sampling and consistency checks: Generate multiple responses to the same problem and compare the final conclusions. Problems with large disagreement should be prioritized for manual review.
- Self-review: Ask the model to check its own derivation step by step. This should be used only as a filter, because a model reviewing its own work may repeat the same mistakes.
- External validation: Pass the formalizable parts to formal proof tools for checking. The more steps that can be formalized, the more reliable the validation.
- Manual spot checks: Sample a proportion of results that pass automatic checks for manual review, record the error rate, and use it to calibrate the process.
Below is a simplified evaluation workflow example showing how multiple sampling and scoring records can be organized. The function names and data structures are for illustration only and must be replaced according to the actual environment:
from collections import Counterdef evaluate_problem(problem, call_model, grade, n_samples=5):results = []for _ in range(n_samples):output = call_model(problem["statement"])results.append({"conclusion": output["conclusion"],"score": grade(output, problem["reference"]),})conclusions = Counter(r["conclusion"] for r in results)_, top_count = conclusions.most_common(1)[0]consistency = top_count / n_samplesreturn {"id": problem["id"],"consistency": consistency,"mean_score": sum(r["score"] for r in results) / n_samples,"needs_review": consistency < 0.6,}
The 0.6 in the example is an assumed threshold. It should be calibrated based on actual problem difficulty and the cost of manual review.
5. Engineering Tradeoffs Among Cost, Latency, and Throughput
Model selection cannot rely only on unit price or single-response speed. A more useful metric is effective cost per task, calculated as follows:
Cost per task = input tokens × input price + output tokens × output price
Effective cost = cost per task ÷ task accuracy
This formula shows that a model with low accuracy may have a higher effective cost even if its unit price is cheap, because more retries and manual reviews are required. Conversely, a model with a higher unit price but clearly higher accuracy may be more cost-effective overall.
def effective_cost(input_tokens, output_tokens, price_in, price_out, accuracy):unit_cost = input_tokens * price_in + output_tokens * price_outif accuracy <= 0:return float("inf")return unit_cost / accuracy
Speed also needs to be broken down by scenario. In interactive scenarios such as brainstorming and solution discussion, users may accept longer thinking time in exchange for deeper reasoning. In batch scenarios such as bulk problem organization, format conversion, and exercise generation, throughput and latency are more sensitive, making faster models a better fit.
For inference throughput, tokens/s figures in public benchmarks are affected by multiple conditions, including hardware model and count, batch size, context length, quantization precision, and concurrency. When citing such data, the test conditions must be recorded at the same time. A single number without conditions cannot be used directly for capacity planning.
6. Route Models by Task Difficulty
Most teams eventually adopt a routing strategy rather than using a single fixed model. The basic idea is to first use a lower-cost model, and if the result fails checks, escalate to a model with stronger reasoning ability.
- Layer 1: Format conversion, symbol cleanup, and problem categorization, using a fast-response model.
- Layer 2: Routine proof drafts and worked examples, using a mid-tier model with automatic checks enabled.
- Layer 3: Complex derivations and open-ended propositions, using a deep-reasoning model with mandatory manual review.
Escalation conditions must be quantified, for example low consistency, checker errors, or users flagging results as doubtful. Without clear escalation conditions, routing quickly degrades into subjective judgment.
7. Notes for Lecture Notes and Document Generation
When organizing derivations into lecture notes, several types of issues need separate handling:
- Compile checks: Documents should compile correctly, and numbering, cross-references, and symbol definitions should remain consistent.
- Reference verification: Whenever a known result is cited, the statement and preconditions must be checked against the original literature. References in generated text are often fabricated or have incorrect versions or numbers.
- Source distinction: Documents should clearly distinguish between “restating an existing proof” and “a newly generated proof.” If a proposition lacks a complete public proof, the generated proof must be reviewed by domain experts.
