LLM Math Reasoning Evaluation: Methodology and Practice

    Large language models are increasingly expected to do real mathematical work, but evaluating that ability is far harder than running a fixed-answer test set. This article lays out a practical methodology for assessing LLM math reasoning. It explains why traditional answer-key benchmarks break down on open-ended problems, defines a three-layer model of math ability (computation, multi-step reasoning, and open-ended inquiry), and then walks through the parts of a rigorous evaluation: four benchmark-construction constraints, a five-dimension scoring system with code, a review framework for problems that cannot be auto-graded, an anchor-based method for cross-model comparison, and a minimal reproducible evaluation platform. It closes with common pitfalls and role-specific guidance for model selection.

    1. Why Evaluation Is Hard: From “Auto-Gradable” to “Not Auto-Gradable”

    For a long time, the industry has evaluated math ability using question banks with known answers: feed in a problem, get a final number from the model, run a string or symbolic comparison in a script, and report an accuracy score. The advantages are obvious — fully automated, regression-friendly, and extremely cheap.

    But this approach has a fatal flaw: a mismatch between the task distribution and real requirements. The vast majority of math problems in real business are “open math problems.”

    Open math problems typically have the following characteristics:

    1. No unique answer. They may be proofs, constructions, or counterexamples, where the expected output is a piece of reasoning rather than a number.
    2. The premise may be incomplete or wrong. The model must first judge whether the problem itself holds, then decide whether to answer or challenge the premise.
    3. Multiple solution paths. The same conclusion may admit several proofs, and evaluation must tolerate different routes.
    4. Extensible conclusions. A strong answer often goes beyond the original result to offer a stronger proposition, boundary conditions, or a generalized form.

    Once a problem shifts from “fill in the blank” to “write an argument,” grading stops being string comparison and becomes human or model review. And the moment human judgment enters the loop, the reproducibility of the evaluation drops by an order of magnitude — which is exactly why many evaluation results look impressive and then collapse when another team tries to reproduce them.

    So a professional math ability evaluation must solve three things at once: what to test (dimensions), how to test it (engineering), and how to grade it (review). The following sections address each in turn.

    2. Define the Capability Boundary First: A Three-Layer Math Ability Model

    Avoid the vague claim that a model is “good at math.” Instead, split mathematical reasoning into three layers, each corresponding to different problem types and evaluation methods:

    Layer Capability definition Typical problems Grading method
    L1 Computation & execution Arithmetic, algebraic manipulation, standard calculus operations Find a limit, solve an equation, integrate Symbolic equivalence check, fully automated
    L2 Multi-step reasoning Chaining across concepts, requiring intermediate lemmas Competition-level proofs, combinatorial counting Answer extraction + key-step checking
    L3 Open-ended inquiry Self-construction, finding counterexamples, challenging premises, generalizing conclusions “Prove or disprove,” “give a stronger result” Rubric scoring + multi-reviewer voting

    L1 and L2 are already highly engineered, and most of the gap between mainstream models shows up at L3. Yet L3 is precisely the hardest layer to evaluate and the one that best reflects whether a model can genuinely serve as a math assistant.

    3. Building the Evaluation Set: Four Design Constraints You Must Meet

    3.1 Difficulty stratification and mix

    Set a ratio across L1/L2/L3 (for example, 3:5:2) and report the score for each layer separately, rather than a single total. A total score hides structural differences: one model might score full marks on L1 and near zero on L3, yet post the same total as a more balanced model.

    3.2 Contamination resistance

    This is the most common and least seriously handled failure mode in LLM evaluation. Model training corpora contain large amounts of public question banks and solution-website content, so apparent “ability” is actually “memory.” Practical measures:

    • Build variants, not original items. Keep the mathematical structure while swapping numbers, exchanging conditions, or changing parameter ranges. The structure stays comparable in difficulty, while the different surface makes it hard to hit memorized answers.
    • Time-based splitting. Use only problems that became public after the model’s training cutoff, or build a private question bank.
    • Paraphrasing + distractors. Add problems with flawed premises or redundant conditions to test whether the model mechanically applies learned templates.

    3.3 Problem metadata

    Tag every problem with at least: difficulty, knowledge point, reference answer or reference proof, common pitfalls, and a list of expected key steps. Metadata is the basis for later process-level grading; without it you can only grade the final answer.

    3.4 A private held-out set

    Use the public question bank for tuning during development, and build a separate held-out set that is never made public for the final selection decision. Otherwise the tuning process will effectively “overfit” the evaluation set.

    4. Designing the Scoring System: Five Dimensions, Each with an Independent Signal

    A single accuracy number is not enough to support a selection decision. Collect at least the following five metric families:

    4.1 Answer correctness

    For L1/L2, use symbolic equivalence checks to avoid the false negatives that string comparison produces (for example, 1/2, 0.5, and \frac{1}{2} should be treated as equivalent).

    1. from fractions import Fraction
    2. import sympy as sp
    3. def answers_equivalent(pred: str, gold: str) -> bool:
    4. """Numeric/symbolic equivalence check to avoid misjudgment from formatting differences"""
    5. try:
    6. p, g = sp.sympify(pred), sp.sympify(gold)
    7. except Exception:
    8. return pred.strip().replace(" ", "") == gold.strip().replace(" ", "")
    9. if p == g:
    10. return True
    11. try:
    12. diff = sp.simplify(p - g)
    13. return diff == 0
    14. except Exception:
    15. return False

    4.2 Process validity

    A correct final answer with wrong steps (a lucky guess, circular reasoning, invoking an unproven lemma) is a high-risk output in real business — it will be treated as a trustworthy intermediate result downstream. The approach is to maintain an expected_steps list for each sample and check, item by item, whether each step appears and is correctly justified. This can start with semi-automated rules (regex/keywords) and gradually introduce review.

    4.3 Stability and variance

    Sample the same problem 8 times and record the pass rate and variance. This directly answers a practical question: is a failure on this problem a capability gap or sampling luck? It is worth reporting both pass@1 (single attempt) and pass@k (at least one correct out of many attempts). A model with a large gap between the two needs resampling or self-checking strategies in engineering before it can be used.

    1. def sample_and_eval(model, prompt: str, evaluator, k: int = 8) -> dict:
    2. outcomes = []
    3. for _ in range(k):
    4. raw = model.generate(prompt, temperature=0.7)
    5. outcomes.append({
    6. "raw": raw,
    7. "correct": evaluator(raw),
    8. })
    9. pass_k = any(o["correct"] for o in outcomes)
    10. return {
    11. "pass_1": sum(o["correct"] for o in outcomes) / k,
    12. "pass_k": pass_k,
    13. "stability": sum(o["correct"] for o in outcomes) / k, # take overall variance after per-item aggregation
    14. "samples": outcomes,
    15. }

    4.4 Reasoning quality

    This is often misread. A longer chain of thought does not mean a stronger model. Structured metrics worth collecting include:

    • Step count and redundancy: the proportion of repeated derivations and self-repeated corrections.
    • Effective-progress ratio: the share of steps that actually advance the conclusion.
    • Backtracking and correction count: some correction is a capability signal, but frequent overturning signals instability.
    • Readability: paragraph organization, whether assumptions are made explicit, and whether conclusions stand as separate sentences. Writing readability directly determines whether a human can review the work — in math scenarios, “quickly verifiable by a person” is itself product value.

    4.5 Self-calibration

    Ask the model for a confidence level on its answer and measure how well that confidence matches actual correctness (for example, a reliability curve or ECE). In high-stakes scenarios like math, knowing what it doesn’t know is more valuable to engineering than happening to compute the right answer, because the former can trigger human fallback or a tool call.

    5. Reviewing Open Math Problems: Three Mechanisms, None Optional

    L3 cannot be auto-graded, so it requires review. But review itself becomes a new source of error and needs engineering constraints:

    5.1 Define an explicit rubric; forbid “overall feel”

    Break “how good is it” into decidable items, for example:

    1. Conclusion correctness: does the final proposition hold (yes / no / partial)?
    2. Argument completeness: are there logical gaps or unproven lemmas?
    3. Premise handling: does it correctly identify a flawed premise or insufficient conditions, and offer a correction?
    4. Added value: does it provide a stronger conclusion, boundary conditions, a generalization, or a counterexample?
    5. Expression quality: are definitions clear, notation consistent, and the structure readable?

    Give each item a 0/1/2 score and record the reasoning. The reasoning matters more than the score — it is an asset for later regression analysis.

    5.2 Reviewers must be calibrated

    This is the most easily overlooked and most fatal point: if a reviewer cannot solve the problem themselves, they cannot reliably judge whether the model’s answer is correct. A reviewer’s judgment capability and the problem’s difficulty are in a multiplicative relationship. Practical recommendations:

    • Run a reviewer qualification check on each problem first: give a set of answers with known correctness (including carefully constructed “seemingly correct but actually wrong” samples), and only reviewers whose agreement rate exceeds a threshold are qualified to review that problem.
    • Record each reviewer’s historical consistency and use weighted voting rather than a simple average.
    • Route high-disagreement samples (where a majority of reviewers disagree) to a separate review queue — high disagreement usually means the problem itself is ambiguous, or the model produced an unexpected new argument, and both are worth a human look.

    5.3 Suppress reviewer bias

    Actively counter three known biases in the process:

    • Position bias: shuffle the A/B order within the same comparison and run both orders.
    • Length bias: long answers naturally seem more thorough, so the rubric must explicitly “deduct points for redundancy.”
    • Style preference: reviewers may favor proof routes they are familiar with, so a reference proof should serve only as “one sufficient example of correctness,” not as the sole standard.

    6. Cross-Generation and Cross-Version Comparison: Anchor Rather Than Linear Extrapolation

    A common mistake in the industry is the statement “model X’s ability sits between A and B.” The statement itself is imprecise — ability is not a scalar, and cross-generation comparison only holds when anchored to specific problems and specific dimensions. The proper approach is anchor-based evaluation:

    1. Establish capability anchors. Select several models that have been thoroughly evaluated and have clear capability profiles (across generations and scales) as the reference standard.
    2. Fix the same question set, the same sampling parameters, and the same review process, and place all candidate models in one table.
    3. Report a dimension vector rather than a single score:
    1. model L1 L2 L3-open stability avg_tokens readability
    2. candidate-A 0.98 0.81 0.52 0.63 4.2k 3.8/5
    3. candidate-B 0.95 0.76 0.61 0.58 9.7k 3.1/5
    4. candidate-C 0.99 0.86 0.44 0.71 2.1k 4.3/5
    1. Regression monitoring. Wire the evaluation set into CI so that after a model version update it automatically runs the same question set, and any dimension that drops beyond a threshold triggers an alert. This turns a one-off investigation into a long-term asset.

    7. Engineering Implementation: A Minimal Skeleton for a Reproducible Evaluation Platform

    To guarantee that conclusions are reproducible, platform building has three key points.

    First, isolated execution environments. Tasks involving code verification or numerical computation should run in containerized sandboxes with limits on CPU/memory/execution time and network egress, so the evaluation tasks themselves don’t become a risk surface. Cloud platforms such as Baidu AI Cloud offer container and function-compute capabilities that can host these tasks; combined with object storage to archive each evaluation’s raw inputs and outputs, plus logging and monitoring/alerting, this provides a full trace of the process and detection of anomalies.

    Second, structure the storage of every sample. Prompts, model versions, parameters, raw outputs, extracted answers, per-dimension scores, and review reasoning should all be persisted to a database. Missing any one of them makes it impossible to investigate afterward why a score changed.

    Third, aggregate evaluation results in layers.

    1. def aggregate(per_task: list[dict]) -> dict:
    2. """Aggregate separately by ability level to avoid total score masking structural differences"""
    3. by_level = {}
    4. for t in per_task:
    5. by_level.setdefault(t["level"], []).append(t)
    6. report = {}
    7. for level, tasks in by_level.items():
    8. report[level] = {
    9. "pass@1": sum(t["pass_1"] for t in tasks) / len(tasks),
    10. "pass@k": sum(t["pass_k"] for t in tasks) / len(tasks),
    11. "avg_tokens": sum(t["avg_tokens"] for t in tasks) / len(tasks),
    12. "n": len(tasks),
    13. }
    14. return report

    8. Common Pitfalls and Selection Recommendations

    • Deciding on the total score. Always look dimension by dimension. A model weak on L3 but strong on L1 is suited to calculator-style assistance, not to being a research assistant.
    • Ignoring sampling variance. A single evaluation run with low-temperature sampling will systematically overestimate ability.
    • No reviewer qualification threshold. If a reviewer cannot solve a problem, their score on it is unusable.
    • Ignoring cost and latency. Open-ended reasoning is often accompanied by a marked increase in chain-of-thought length, and token consumption and response latency may multiply several times over; these must be accounted for alongside the technical gains.
    • No new problems after the training cutoff. Once the question bank ages, the evaluation gradually degrades into a memory test.

    Recommendations for different roles: For scenarios needing automated grading and batch computation, prioritize L1/L2 pass@1 and stability; for research exploration and proof assistance, prioritize L3 rubric scores, premise-identification ability, and process validity; for teams building platforms, treat the evaluation set, the reviewer-calibration process, and regression monitoring as infrastructure to build, not as a one-off research report.