Evaluating Mathematical Reasoning in Large Language Models: A Reproducible Methodology

    A practical, reproducible methodology for evaluating the mathematical reasoning capabilities of large language models. This article covers how to design evaluation dimensions, build a decontaminated benchmark, judge answers automatically and manually, audit reasoning quality, report statistics with confidence intervals, and avoid common evaluation pitfalls.

    Why Systematic Evaluation Matters

    When people judge a model’s mathematical ability, they often rely on subjective impressions from a handful of conversations. One answer “feels like real reasoning,” another “reads more polished.” Such judgments are heavily influenced by how questions are phrased, which problems are chosen, and personal preferences. They are hard to reproduce and make it difficult to compare the true gap between models on the same task.

    A systematic evaluation needs to answer three questions. First, what to test: which mathematical domains and difficulty levels the problems cover. Second, how to judge: what rules decide whether an answer is correct, and whether the reasoning process should be checked. Third, how to interpret results: how large the sample size must be, and whether observed differences exceed random variation.

    Math problems are especially well suited to objective evaluation because most final answers can be verified. But “getting the right answer” is not the same as “reasoning reliably.” A response may reach a correct result through flawed intermediate steps, or by pattern-matching to a similar problem memorized during training. A complete evaluation must therefore examine both the final answer and the reasoning process.

    Breaking Down the Evaluation Dimensions

    Before building any dataset, you should define the evaluation dimensions. Common ones include the following.

    1. Knowledge domain

    Mathematics spans algebra, number theory, combinatorics, geometry, probability and statistics, analysis, and more. These fields differ significantly in their demands on symbolic manipulation, constructive proof, and numerical precision. Testing only one domain makes it hard to generalize conclusions to overall mathematical ability.

    2. Problem difficulty

    Difficulty can be measured by the number of solution steps, the prerequisite knowledge required, and whether auxiliary constructions are needed. A common approach is to split problems into three tiers—basic, intermediate, and competition-level—and keep a fixed number in each tier, making it easier to see at which level the capability curve starts to drop.

    3. Problem type

    There are three main types: computational problems with a unique numerical or expression answer, proof problems requiring a complete argument, and exploratory problems that ask whether a statement is true and require a counterexample or justification. Judging proofs and exploratory problems costs far more than judging computational ones, so they need separate handling in the evaluation design.

    4. Open-endedness

    Closed problems have known answers; open problems have unknown or unsettled answers. Open problems are closer to real research scenarios, but they are nearly impossible to judge automatically and usually require expert review item by item. In the evaluation report, present the two categories separately rather than blending them into a single overall score.

    Building the Benchmark

    The quality of the benchmark determines whether the evaluation conclusions are trustworthy. Pay attention to the following when constructing it.

    Sourcing and licensing

    Problems should come from public competition archives, textbook exercises, or original authoring. Using materials with clear provenance and licensing avoids compliance issues later.

    Decontamination

    If the model under test has already seen the benchmark problems and their reference answers in its training data, scores will be inflated and conclusions distorted. Common practices include fingerprinting problem text, removing items that heavily overlap with public corpora, and re-testing paraphrased versions. Decontamination can never be perfectly clean, so reports should state the detection method and thresholds used.

    Stratified sampling

    Sample in a stratified way by domain and difficulty, with enough items per stratum for statistical significance. If a domain contains only five problems, its score will fluctuate wildly and is unsuitable as a basis for comparison.

    Annotation consistency

    Every problem should come with a reference answer and key solution points. For answers with multiple equivalent forms, define equivalence rules in advance—for example, fractions versus decimals, different but equivalent algebraic expressions, or values with and without units.

    Answer Judging Methods

    Judging is the most error-prone part of evaluation. Common methods, ordered from most to least automated:

    1. Exact match

    Suitable for integers, fixed-format fractions, or standardized symbolic expressions. Simple to implement but overly sensitive to formatting. The same answer written as “3/4” and “0.75” would be judged wrong under exact matching.

    2. Normalized matching

    Normalize answers first—strip whitespace, reduce fractions to lowest terms, expand polynomials in a fixed format—then compare. This reduces false negatives.

    3. Symbolic or numerical verification

    For algebraic expressions, use a symbolic computation tool to check whether the difference between two expressions is identically zero; for numerical answers, compare within a given tolerance. This is far more reliable than string comparison, but requires defining a verification method for each problem.

    4. Human review

    For proof problems and open-ended questions, automatic judging is largely infeasible. The usual approach is to have reviewers with relevant expertise grade responses against a rubric—for example, completeness of steps, correctness of key lemmas, and consistency of conclusions with the given conditions. To ensure consistency, at least two reviewers should score independently, and an agreement coefficient such as Cohen’s kappa should be computed. Large disagreements require arbitration by a third reviewer.

    Below is a simple automatic judging example combining normalized comparison and numerical verification. query_model is a calling function you need to implement yourself; the code is for illustration only.

    1. from fractions import Fraction
    2. import math
    3. def normalize(ans: str) -> str:
    4. """Strip whitespace, lowercase, and try to convert to a fraction in lowest terms."""
    5. s = ans.strip().replace(" ", "").lower()
    6. try:
    7. return str(Fraction(s))
    8. except (ValueError, ZeroDivisionError):
    9. return s
    10. def is_correct(model_answer: str, reference: str, tol: float = 1e-9) -> bool:
    11. """Compare normalized strings first, then fall back to numerical comparison."""
    12. if normalize(model_answer) == normalize(reference):
    13. return True
    14. try:
    15. return math.isclose(float(model_answer), float(reference), abs_tol=tol)
    16. except ValueError:
    17. return False
    18. def evaluate(problems, query_model):
    19. """problems: each item contains 'question' and 'answer'; query_model: provided by the user."""
    20. results = []
    21. for item in problems:
    22. raw = query_model(item["question"])
    23. results.append({
    24. "id": item["id"],
    25. "correct": is_correct(raw, item["answer"]),
    26. "raw": raw,
    27. })
    28. return results

    The limitations of this code are obvious. It cannot detect whether the model reached a correct answer through incorrect intermediate steps, and it cannot handle proof problems. It should therefore serve only as a first-pass filter, followed by manual spot checks.

    Auditing the Reasoning Process

    Looking only at final answers discards a great deal of information. A response may start from a wrong premise and arrive at the right number through accidental cancellation. The goal of process auditing is to determine whether the chain of reasoning actually holds.

    1. Key-step checking

    Break the standard solution into key steps and check whether each appears in the response. If a key step is missing but the result is correct, record it as “correct answer, incomplete reasoning”—distinct from a fully correct solution.

    2. Error classification

    Common error types include arithmetic mistakes, missed conditions, citations of nonexistent theorems, circular reasoning, and treating necessary conditions as sufficient. Classifying errors helps identify model weaknesses. For example, if most errors involve missed conditions, the problem likely lies in understanding the question itself rather than in computation.

    3. Reasoning-chain length and redundancy

    Longer chains of reasoning are not necessarily more reliable. Overly long derivations often contain substantial repetition or irrelevant steps, increasing the chance of error. You can count the number of steps per response and the proportion of repeated statements, then analyze these alongside accuracy to see whether they correlate.

    4. Clarity of exposition

    The clarity of mathematical writing affects whether readers can verify the work. Heavy skipped steps, undefined symbols, and conclusions disconnected from the derivation all reduce usability. This dimension is well suited to a simple five-point scale, with scoring rationale attached.

    Subjective Impressions vs. Objective Metrics

    The impressions users form in real usage—answer style, tone, how human the writing feels—are a separate dimension from mathematical ability. A response that is concise and fluent is not necessarily more rigorous; a long, convoluted response is not necessarily worse.

    In the evaluation report, list subjective impressions as a separate section, noting the sample source, number of questions, and evaluation criteria. Subjective assessments can serve as a supplement but should not be the basis for rankings. If you must cite them, state their limitations: small sample size, differing questioner experience, and lack of controlled conditions.

    Another common mistake is compressing impressions of different models into a single ranking. Mathematical ability has multiple dimensions—a model that performs well on computational problems may not do equally well on proofs. The sound approach is to report per-dimension results rather than one total score.

    Statistics and Confidence Intervals

    When reporting accuracy, always include the sample size and confidence interval; otherwise, readers cannot judge whether differences are meaningful.

    Take a binomial proportion as an example: with 200 problems and 132 correct answers, the accuracy is 66%. Using a Wilson interval, the 95% confidence interval is roughly 59% to 72%. This means that if another model scores 62% on the same problem set, the difference may be nothing more than sampling noise—you cannot conclude which model is stronger.

    When comparing two models, a paired test is more robust. Since both models answer the same problems, you can compare per-problem correctness differences—for example, using McNemar’s test. This is more effective than comparing two independent proportions, because it reduces interference from problem difficulty.

    In addition, running the same model multiple times may yield different results. If generation uses random sampling, fix the random seed or repeat the run several times and report the mean and standard deviation.

    Common Pitfalls

    Drawing conclusions from too few problems. Scores on ten problems say nothing about capability. When the sample is insufficient, label conclusions explicitly as preliminary observations.

    Reporting only the best run. Picking the highest score across multiple attempts overstates model stability. Report average performance and variance instead.

    Inconsistent prompts. Different prompts for the same problem can produce very different results. Use a unified prompt template during evaluation and make it public.

    Ignoring time and version. Models and services are updated constantly, so conclusions are only valid for a specific version and test window. Note the test date and version information in your report.

    Treating results as absolute rankings. Evaluation only reflects performance on a specific benchmark under specific judging rules. Results across different benchmarks or rules cannot be compared directly.

    An Implementation Checklist

    To run a mathematical reasoning evaluation within your team, proceed as follows:

    1. Define the evaluation goal—model selection, regression testing, or capability monitoring—and set the dimension scope accordingly.
    2. Build the benchmark by domain and difficulty, recording sources, licensing, and decontamination results.
    3. Prepare reference answers, equivalence rules, and verification methods for each problem; define grading rubrics for proof problems.
    4. Standardize the prompt template, fix sampling parameters, and record the model version and test time.
    5. Run automatic judging, manually spot-check all results, and compute agreement metrics.
    6. Perform key-step checking and error classification on the reasoning process.
    7. Compute accuracy, confidence intervals, and paired-test results, and write per-dimension reports.
    8. Present subjective impressions as separate supplementary material, noting their limitations.

    Following this workflow makes evaluation conclusions more reliable and easier to reproduce at different points in time. Mathematical capability evaluation is inherently ongoing work: a single run only captures the state at that moment, and continuous tracking is what reveals true trends.