How to Systematically Evaluate LLM Mathematical Reasoning and Choose the Right Model
Choosing a large language model for mathematical tasks requires more than gut feeling. This article presents a structured evaluation methodology: tiered problem sets, automated and manual scoring, reasoning quality analysis, stability testing, and cost tracking, along with a reproducible Python evaluation framework and common pitfalls to avoid when interpreting results and planning resources.
Why You Need a Systematic Evaluation Method
Many people judge a model’s mathematical ability based on their experience with a handful of problems. This approach has two flaws. First, single outputs are random: re-sample the same problem and you may reach a completely different conclusion. Second, personal impressions are easily influenced by formatting, tone, and length. A confident, well-organized derivation is not necessarily correct, and a short but correct answer can be misjudged as weak.
Evaluation therefore needs to turn subjective impressions into metrics that can be recorded, reproduced, and compared. A sound evaluation plan typically includes four parts: a problem set, scoring rules, a run protocol, and a method for interpreting results.
Breaking Down the Evaluation Dimensions
2.1 Tier Problems by Difficulty
Mathematical problems vary widely in difficulty. Use at least three tiers:
- Basic: problems with clear solution paths, such as algebraic simplification, series summation, and probability calculations, to test the reliability of fundamental computation.
- Competition: problems requiring constructive insights or multi-step transformations, to test problem decomposition skills.
- Research: open problems with no accepted answer or that remain unsolved. These are hard to score directly, but reveal whether the model can understand the problem, propose reasonable approaches, and recognize known dead ends.
Tiering helps you locate capability boundaries. If a model already makes frequent errors on basic problems, its research-tier performance carries little reference value.
2.2 Separate Automatically Verifiable from Manually Judged Problems
Problems with standard answers can be checked with scripts, such as comparing numeric results or testing expression equivalence. Proof-type problems require human review or a dedicated proof-checking process. When judging, distinguish between two error types: a wrong conclusion, and flawed intermediate steps where the conclusion happens to be correct. The latter should also lose points on proof problems.
2.3 Reasoning Process Quality
Looking only at final answers misses a lot of information. Evaluate the reasoning process from these angles:
- Are premises stated explicitly, and does the model introduce assumptions not given in the problem?
- Is each transformation verifiable, or are there unjustified jumps?
- Can the model backtrack after hitting a dead end, instead of repeating the same argument?
- Is the length proportional to the problem’s complexity? Verbose is not the same as deep, and concise is not the same as shallow.
Some models produce long reasoning chains full of redundant repetition. Others reason briefly yet deliver the key transformation directly. Focus on the information density of the steps, not the word count.
2.4 Stability
Sample the same problem multiple times and measure the distribution of correct answers. If a model answers correctly three out of five times, its capability should be described as “correct with some probability,” not simply “can do it” or “can’t do it.” Stability matters especially in production, because users typically get only one output.
2.5 Cost and Latency
Mathematical ability is just one dimension. Also track average compute per problem, response time, and per-call cost. When two options have similar accuracy, cost and latency often decide the choice.
Building a Reproducible Evaluation Pipeline
Here is a simplified evaluation framework for recording every run. The model-calling function needs to be implemented against your actual API.
import statisticsfrom dataclasses import dataclass@dataclassclass Problem:pid: strlevel: str # basic / competition / openstatement: strreference: str | None # reference answer; can be None for open problemsdef run_trials(call_model, problem: Problem, n: int = 5):records = []for i in range(n):output = call_model(problem.statement)records.append({"trial": i, "output": output})return recordsdef score_numeric(output: str, reference: str) -> bool:# In production, replace with expression equivalence checkingreturn reference.strip() in outputdef summarize(results: list[dict]) -> dict:accs = [r["correct"] for r in results]return {"accuracy": statistics.mean(accs),"n": len(accs),}
The point of this code is the structure: problems, runs, scoring, and aggregation are independent, making scoring rules easy to swap. In practice, save the raw output of every run for later human review.
The run protocol must also be fixed: identical system prompts, identical sampling temperature, identical maximum output length, and identical problem ordering. If any of these varies, the comparison becomes meaningless.
Key Points for Human Review
Automated scoring cannot cover proof-type problems. Follow these steps when reviewing:
- Solve the problem independently first, then read the model’s output to avoid being led astray by its reasoning;
- Check each equation or inequality step by step, and note where the first error occurs;
- Distinguish fatal errors from fixable flaws. Fatal errors fail outright; fixable flaws lose partial credit;
- For open problems, record whether the model’s proposed approach has value, even if the proof is never completed.
Keep written records of review results so they can be traced later.
Common Pitfalls When Interpreting Results
First, sample sizes that are too small. Accuracy differences across ten problems are rarely enough to support a ranking conclusion.
Second, confusing model versions with run modes. Different reasoning levels or run modes within the same model family can differ greatly in capability and cost. Always note the exact configuration when comparing.
Third, treating subjective impressions as evidence. Judgments like “reads more naturally” or “clearer reasoning” are a separate dimension from mathematical correctness and should be recorded separately.
Fourth, ignoring data freshness. Model versions iterate quickly, so conclusions have a short shelf life. Always note the test date in your report.
Model Selection and Resource Planning
Once you have evaluation results, selection should return to the actual task. Rank tasks by risk:
- High-risk tasks, such as computations that must be strictly correct or proof assistance, should use solutions with high stability and strong verifiability, paired with human review;
- Medium-risk tasks, such as drafting solutions and brainstorming approaches, can tolerate some error rate, but a verification step should remain;
- Low-risk tasks, such as text polishing and formatting, can use low-cost, fast-responding options.
Resource planning matters too. Many services bill by quota or credits with expiration dates. If you start using them only as they near expiry, you may be forced to burn credits on low-value tasks. A safer approach:
- List pending tasks before the quota expires and rank them by value;
- Schedule high-value tasks first;
- Use cheaper options for exploratory work where it does not affect results;
- Regularly check remaining credits and deadlines to avoid idle resources.
Summary
Evaluating an LLM’s mathematical ability comes down to standardizing the judgment process: tier your problems, separate verifiable from non-verifiable results, pay attention to reasoning quality and stability, track costs, and keep written records during review. Only then can you reach reliable conclusions. Model selection should combine task risk with resource constraints, rather than relying on a single leaderboard ranking.
