How to Evaluate LLM Mathematical Reasoning and Proof Capabilities

    Evaluating an LLM’s mathematical capabilities requires more than a single benchmark score. This article outlines a reproducible framework covering calculation accuracy, multi-step reasoning, proof construction, exploration, and mathematical writing. It explains how to build tiered evaluation datasets, establish consistent review criteria, control prompting and inference budgets, and manage the cost and operational demands of evaluation.

    1. Why “Mathematical Ability” Is an Oversimplification

    Before comparing models on mathematics, recognize that mathematical ability is not a single scalar quantity. If the measuring scale is poorly defined, comparisons amount to competing impressions rather than defensible conclusions.

    In practice, evaluation should distinguish at least five separate dimensions:

    1. Accuracy on problems with definitive answers: Problems with unique, automatically checkable answers, such as solving equations, evaluating integrals, and combinatorial counting.
    2. Stability of multi-step reasoning: Problems that may not be intrinsically difficult but require tens of uninterrupted reasoning steps. The key concern is how errors accumulate over a long derivation.
    3. Constructive proof capability: Tasks requiring the model to construct auxiliary functions, counterexamples, or induction structures. Valid answers may differ, so string matching cannot determine correctness.
    4. Exploration of open mathematical problems: Tasks for which no ready-made proof is available in the literature, requiring the model to search for a solution path. This dimension is particularly useful for distinguishing capabilities, but also the hardest to evaluate.
    5. Quality of mathematical writing: Beyond reaching a correct conclusion, the output should be clearly structured, use consistent notation, and be suitable for delivery as mathematical exposition.

    Many arguments about which model is “better at math” use results from the first dimension to infer capabilities in the third and fourth. That inference is methodologically unsound.

    2. Build a Tiered Evaluation Dataset

    The evaluation dataset determines how strong your conclusions can be. A practical approach is to use three tiers, with at least 30 problems per tier and a deliberate range of difficulty.

    • Tier A: Automatically graded problems. Normalize answers into standard forms and compare them for mathematical equivalence. Use symbolic simplification rather than string matching; otherwise, equivalent answers such as 1/2 and 0.5 may be marked incorrectly.
    • Tier B: Semi-automatically graded proofs. Use a fixed scoring rubric that breaks each proof into checkpoints—for example, whether it states the induction base case, verifies the inductive step, and addresses degenerate cases.
    • Tier C: Fully human-reviewed problems. Use propositions from public mathematical literature for which no proof is supplied. The purpose is to assess reasoning where reproducing a supplied proof is not an option.

    The following pseudocode illustrates a reusable evaluation skeleton. Symbolic computation and grading use generic library interfaces.

    1. def evaluate(model_client, dataset, rubric, k=5):
    2. report = {}
    3. for tier, items in dataset.items():
    4. scores = []
    5. for item in items:
    6. # Sample independently k times to distinguish reliable
    7. # correctness from occasional success.
    8. outputs = [model_client(item.prompt) for _ in range(k)]
    9. if tier == "A":
    10. scores.append(majority_symbolic_equiv(outputs, item.answer))
    11. else:
    12. scores.append(mean([rubric.score(o, item.reference) for o in outputs]))
    13. report[tier] = {
    14. "mean": mean(scores),
    15. "pass_at_k": mean([1 if s >= 0.8 else 0 for s in scores]),
    16. "variance": variance(scores),
    17. }
    18. return report

    Include both pass_at_k and variance in the evaluation report. Scores based on a single sample often cannot distinguish reliable capability from a fortunate attempt.

    3. Make Reviewer Agreement Part of the Evaluation

    Because Tiers B and C depend on reviewers, the process must address reviewer bias. Three practical safeguards are:

    • Blind review: Hide model identities and randomize the order of outputs.
    • Two independent reviewers, followed by disagreement resolution: Measure inter-rater agreement using a statistic such as Cohen’s kappa. An agreement score below 0.6 should prompt a review of the rubric rather than simply adding more reviewers.
    • Fix the rubric before inspecting outputs: Defining criteria after reading responses can systematically amplify stylistic preferences, such as favoring text that “sounds human.”

    A convincing evaluation needs consistent judgments, not just expert reviewers.

    4. Control Prompts and Reasoning Budgets

    Differences in how a model is invoked can be greater than differences between models. At a minimum, fix and disclose the following variables:

    • Reasoning-length limit: Longer reasoning is not necessarily better. Excessively long derivations can introduce repeated reconsideration and reversal, reducing accuracy.
    • Number of samples and voting strategy: Majority voting can substantially improve Tier A results, but is less useful for the open-ended proofs in Tier C.
    • Output-format requirements: Asking for structured mathematical exposition—with sections, lemmas, proofs, and notes—encourages the model to make intermediate steps explicit. This is often more reliable in practice than requesting only a final answer.
    • Temperature and random seed: Uncontrolled randomness undermines the interpretability of comparisons.

    Treat these settings as part of the evaluation configuration, not as incidental implementation details.

    5. Account for Quotas, Queues, and Costs

    Advanced reasoning configurations often come with queueing and quota constraints. An evaluation campaign can exhaust the available allowance before it finishes.

    Designing the evaluation as a batch-processing workload helps manage these constraints:

    • Offline batch execution and persistent results: Store all inputs and outputs in object storage to avoid repeated calls. Use a hash of the prompt, parameters, and model identifier as the cache key.
    • Asynchronous queues and retry backoff: Use a message queue to smooth traffic peaks and exponential backoff to handle rate limits, avoiding synchronous blocking.
    • Tier-based routing: Run Tier A in bulk using lower-cost configurations, reserving higher-reasoning configurations for Tiers B and C. This can reduce much of the resource consumption.
    • Observability: Record latency, token usage, and failure reasons for each call. Integrate logs, monitoring, and alerts so that resource consumption can be explained.

    For cloud-hosted implementations, these requirements map to standard infrastructure categories: object storage, message queues, container platforms, logging services, and monitoring and alerting. Providers such as Baidu AI Cloud offer infrastructure in these categories; consult the official documentation for applicable quotas and billing details.

    6. Common Evaluation Mistakes

    Avoid these recurring pitfalls:

    • Inferring all dimensions of mathematical capability from a single leaderboard score.
    • Drawing conclusions from only one sample per problem.
    • Using string matching to grade symbolic answers.
    • Allowing reviewers to see which model produced an answer.
    • Ignoring differences in prompts and budgets, then attributing invocation effects to model capability.
    • Treating fluent writing as evidence of correct reasoning.

    7. A Practical Implementation Checklist

    1. Define the capability you want to evaluate. Write down the non-negotiable criteria for correctness.
    2. Build the Tier A, B, and C datasets. Fix the randomness settings.
    3. Run Tier A as a smoke test. Verify that the grading pipeline works correctly.
    4. Conduct blind review for Tiers B and C. Check reviewer agreement and revise the rubric where necessary.
    5. Publish a reproducible report. Include mean scores, pass_at_k, variance, and invocation parameters.

    This process produces conclusions that can be verified and transferred to other evaluation settings, without relying on claims about specific products. That is the kind of evidence needed for sound technical selection.