Evaluating LLM Mathematical Reasoning: Methods and a Practical Model Selection Framework
A reproducible evaluation process helps teams select large language models based on evidence rather than isolated demonstrations. This article explains how to classify tasks, define measurable criteria, build representative test sets, verify mathematical reasoning, and compare latency and cost to make task-specific model selection decisions.
Introduction
Large language models (LLMs) are now used for specialized work, including mathematical reasoning, software development, and document writing. Yet many teams still select models based on impressions from informal trials, which often produce inconsistent conclusions.
One successful demonstration does not establish reliability, and one failure does not prove that a model cannot handle a task. A more useful approach is to make evaluation reproducible through four activities: task classification, metric design, test-set construction, and performance and cost measurement.
1. Classify Tasks Before Comparing Models
Start by defining the use case. The same model can perform very differently across tasks, so asking which model is “better” without specifying the task has little practical value.
Common tasks fall into three categories:
- Exploratory tasks: Brainstorming, exploring alternatives, and proposing hypotheses. These tasks prioritize diversity and useful ideas over the precision of any single answer.
- Execution tasks: Modifying code, transforming data, and generating documents according to a specification. Outputs must be directly usable and consistently follow formatting requirements and constraints.
- Rigorous reasoning tasks: Mathematical proofs, logical deductions, and complex constraint solving. Correct conclusions and complete derivations are essential; an unsupported step can invalidate the result.
Each category needs different metrics. Exploratory tasks can be assessed by the number of candidate ideas, their relevance, and their potential for further development. Execution tasks should be measured by first-pass acceptance rates and the number of revisions required. Rigorous reasoning tasks require step-by-step review of the submitted derivation.
2. Define Measurable Evaluation Criteria
Evaluate models across at least five dimensions:
- Correctness: Does the final answer match the reference answer? For open-ended problems, domain experts need to establish a scoring rubric.
- Completeness of the solution: Are the intermediate steps sufficient? Does the answer contain unsupported jumps disguised as statements such as “this is obvious”?
- Verifiability: Can citations, formulas, and conclusions be independently checked?
- Consistency: Does the model produce reliable results across repeated attempts at the same problem? A single correct answer is not enough.
- Efficiency and cost: Measure time to first token, generation speed, and cost per task.
Consistency is especially easy to overlook. Suppose a model has a 60% success rate on a particular problem. A single attempt has a 60% chance of producing a correct answer. Making a selection decision from that one result is risky.
Run each problem multiple times and report an interval for the pass rate rather than only a single point estimate.
3. Build an Effective Test Set
The quality of the test set determines how much confidence to place in the results. Four practices are particularly important.
Cover a Range of Difficulty Levels
Divide problems into basic, intermediate, and advanced groups to identify where performance begins to deteriorate.
Using only difficult problems may lead to the unhelpful conclusion that every model performs poorly. Using only basic problems may conceal meaningful differences between models.
Watch for Data Contamination
A model may have encountered public benchmark questions or their answers during training, inflating its measured performance.
Use original problems where possible, or modify the parameters of public problems before testing.
Create Rubrics for Open-Ended Problems
For proof tasks, break the assessment into checkpoints such as:
- Are the assumptions stated correctly?
- Are known results applied under the correct conditions?
- Are boundary cases addressed?
- Does the conclusion follow from the premises?
Mark each checkpoint as passed or failed, then aggregate the results into a score.
Preserve Complete Records
Save the model’s raw response, sampling settings, and grading records. These records support later review and make it easier to reproduce the evaluation after a model or configuration changes.
4. A General Evaluation Workflow
The following platform-independent pseudocode illustrates the data flow for batch evaluation:
Inputs:Test set TRepetitions per problem KModel invocation function call_modelGrading function gradeFor each problem q in T:For i from 1 to K:Record start timeanswer = call_model(q.prompt, sampling_settings)Record end timeCalculate latency and output lengthscore = grade(answer, q.reference, q.checklist)Save (q.id, i, answer, score, latency, token_count)Aggregate:Pass rate = passed attempts / (number of problems * K)Calculate pass rates by difficulty levelAverage latency = mean latency across all samplesCost per successful attempt = total cost / passed attempts
Two points deserve clarification.
First, the grade function can represent manual assessment or a combination of rule-based checks and manual spot checks.
Second, cost per successful attempt is useful for comparing economic efficiency because it relates spending to successful outcomes rather than to attempts alone. It should be considered alongside latency: the formula does not itself measure speed, so neither price nor speed should be assessed in isolation.
5. Additional Checks for Rigorous Reasoning
Mathematical proofs and similar tasks require more stringent verification. Three common methods are useful.
Step-by-Step Review
Reviewers examine the derivation line by line and identify the justification for each step. That justification may be an earlier assumption, a proven lemma, or an established theorem. Steps without adequate support should be recorded as defects.
Citation Verification
When a model cites a theorem or a numbered reference, check that the cited statement matches how it is used. Citation errors are often less obvious than arithmetic mistakes.
Formal Verification
Translate key propositions into a language accepted by a formal proof system and have the system check them. This approach requires more effort, but it is appropriate when conclusions must be highly reliable.
A professional-looking answer is not necessarily a correct derivation. Polished formatting and dense terminology can conceal logical gaps. Reviewers should prioritize the chain of reasoning over presentation and wording.
6. Balance Speed and Cost
For execution tasks, speed can matter more than maximum capability on an individual problem. If two models have similar correctness rates but one generates output substantially faster, the faster model may offer greater value for batch processing and interactive development.
Conversely, a slower model may be indispensable for a particular stage if it can solve problems that another model cannot handle at all.
Separate workflow stages into two groups:
- Stages where correctness is mandatory: Prioritize correctness and verification methods.
- Stages where rework is acceptable: Prioritize latency and cost.
For stages that allow rework, a faster model can generate an initial draft, followed by a more rigorous model or human review of critical sections. This tiered approach is common in engineering practice.
Deployment choices also affect the cost structure. Self-hosting requires accounting for hardware utilization, concurrency scheduling, and operational effort. Hosted services require comparing billing granularity and quota limits.
In either case, base calculations on measured throughput and actual costs rather than promotional figures.
7. A Practical Model Selection Framework
Use the following process to reach a defensible decision:
- Define the task categories and acceptance criteria.
- Build a difficulty-stratified test set and run repeated attempts for each problem.
- Evaluate all candidate models under consistent parameter settings.
- Report correctness, consistency, latency, and unit cost separately.
- Review reasoning outputs step by step and test execution outputs end to end.
- Assign models to tasks according to business risk.
Write conclusions conditionally. For example: “Model A has a higher pass rate on this task category, while Model B has a lower unit cost. Use different models for different task types.”
Such conclusions are more useful than declaring a universal winner, and they can be tested again when models change.
8. Common Evaluation Mistakes
Replacing Systematic Evaluation with Personal Trials
Informal trials use small samples and are easily influenced by prompt style and chance.
Comparing Only One Attempt
Random variation can make single-response comparisons misleading.
Mixing Task Categories
A positive experience with brainstorming does not establish that a model will reliably execute structured tasks.
Ignoring Verification Costs
An answer that appears correct may require extensive human review. Its actual efficiency can be lower than that of an apparently slower alternative.
Treating Advertised Metrics as Measured Results
Use results from your own test set and operating environment rather than relying on promotional claims.
Conclusion
The purpose of LLM evaluation is to turn “it seems useful” into reproducible evidence. Task classification, measurable criteria, representative test sets, and realistic speed and cost accounting are all essential.
Together, these practices support model selection decisions that remain testable as models, workloads, and operating conditions change.
