Evaluating and Selecting LLMs for Mathematical Reasoning: A Practical Guide

    Evaluating the mathematical reasoning capabilities of large language models (LLMs) extends far beyond checking leaderboard rankings. This guide explores why standard metrics often fall short and introduces a layered capability model for assessing arithmetic, symbolic derivation, geometric reasoning, and open-ended problem-solving. It also outlines a reproducible evaluation pipeline design and provides actionable insights for interpreting results to make informed model selection decisions based on accuracy, stability, and engineering usability.

    Evaluating and Selecting LLMs for Mathematical Reasoning: A Practical Guide

    In the process of large language model (LLM) selection, “mathematical capability” is often treated as a single dimension, but practical engineering proves it is far too complex to be summarized by a leaderboard rank. Basic arithmetic, symbolic derivation, geometric spatial relationships, probability and statistics, discrete algorithms, formal proofs, and open-ended mathematical exploration demand vastly different model capabilities. Furthermore, the same model can exhibit significant fluctuations across different tasks, prompting methods, and tool strategies. Therefore, evaluating a model’s mathematical reasoning capability requires a return to task definition, evaluation methodology, result reproducibility, and engineering usability.

    1. Why Mathematical Capability Evaluations Are Easily Distorted

    Although math problems seem to have standard answers, a model’s output is rarely a simple binary of “correct” or “incorrect.” First, mathematical reasoning chains are long, and process errors may be accidentally offset in the final step, resulting in a correct answer but untrustworthy reasoning. Second, open-ended problems differ fundamentally from standardized question banks: the former often lack ready-made solutions and require exploration, conjecture, counterexample construction, and multi-path verification, which standard accuracy metrics fail to capture. Lastly, data contamination can significantly inflate question bank scores; if evaluation sets overlap with training data, rankings become distorted.

    Additionally, output behavior may vary between interactive and workflow entry points. Interactive entry points typically prioritize conversational coherence, whereas workflow entry points lean towards structured output and stable reproducibility. If evaluations mix entry points, temperature parameters, and tool strategies, the results lack comparability. Hence, professional assessments must specify preconditions, including which entry point is used, the prompt structure, whether tools are permitted, and the number of sampling runs.

    2. Establishing a Layered Capability Model

    Instead of relying on a single aggregate score, it is recommended to decompose mathematical reasoning capabilities into several distinct layers:

    1. Basic Arithmetic and Unit Conversion: Focuses on numerical stability, precision handling, and boundary conditions, suitable for quick screening.
    2. Symbolic Derivation and Algebraic Transformation: Evaluates multi-step equivalence transformations, variable constraints, and implicit condition identification.
    3. Geometric and Spatial Reasoning: Centers on figure relationships, coordinate transformations, and auxiliary construction capabilities.
    4. Probability, Statistics, and Data Analysis: Assesses conditional probability, distribution assumptions, and result interpretation, ensuring the model understands semantics rather than merely calculating values.
    5. Discrete Mathematics and Algorithmic Reasoning: Focuses on combinatorial counting, recurrence relations, complexity analysis, and boundary proofs.
    6. Formal Proofs and Verifiable Derivation: Examines step-by-step checkability, lemma usage, and the identification of proof gaps.
    7. Open-ended Problem Exploration: Evaluates conjecture generation, counterexample searching, multi-path attempts, and self-verification—this is the scarcest and most difficult dimension to score automatically.
    8. Engineering Usability: Includes long-context stability, tool-calling compliance, output parsability, cost, latency, and refusal rates.

    After layering, teams can assign weights based on business scenarios. For instance, educational assistance prioritizes process interpretability, R&D assistance emphasizes symbolic derivation and algorithmic reasoning, and research exploration focuses on open-ended problem capabilities. A single aggregate score is suitable for initial screening but inadequate for final model selection.

    3. Evaluation Design: From Question Bank to Pipeline

    A reproducible evaluation plan should include at least the following elements: layered datasets, anti-contamination checks, blind evaluation processes, multiple sampling runs, process scoring, tool toggle comparisons, and statistical confidence intervals. For open-ended problems, relying solely on final answer matching is insufficient; evaluations should incorporate manual review or verifiable scripts to structurally record conjectures, counterexamples, and proof gaps.

    Recommended evaluation metrics should simultaneously cover: answer accuracy, process correctness, verifiability, stability, average attempt count, unit task cost, latency percentiles, refusal rate, hallucination rate, and manual repair rate. For tasks requiring multiple samplings, standard pass@k metrics can observe the probability of at least one success within k attempts. However, this must be reported alongside average cost and latency to avoid masking the true expense.

    Below is a pseudocode example:

    1. evaluation_plan = {
    2. "task_family": ["Basic Arithmetic", "Symbolic Derivation", "Geometry", "Probability and Statistics", "Discrete Algorithms", "Open-ended Exploration"],
    3. "difficulty": ["Easy", "Medium", "Hard"],
    4. "tool_policy": ["Tools Disabled", "Tools Enabled"],
    5. "samples_per_item": 5,
    6. "metrics": ["Answer Accuracy", "Process Correctness", "Verifiability", "Stability", "Cost", "Latency"]
    7. }
    8. for item in benchmark_items:
    9. for run in range(samples_per_item):
    10. prompt = build_prompt(item, tool_policy, format_rule)
    11. output = model_generate(prompt, temperature=controlled_value)
    12. record = {
    13. "item_id": item.id,
    14. "task_family": item.family,
    15. "difficulty": item.difficulty,
    16. "tool_policy": tool_policy,
    17. "answer": extract_answer(output),
    18. "reasoning": output,
    19. "latency": measured_latency,
    20. "cost": measured_cost
    21. }
    22. store(record)
    23. report = aggregate(records, by=["task_family", "difficulty", "tool_policy"])

    In engineering practice, evaluation records can be written to object storage, utilizing logging services to retain prompt versions, model versions, and parameter snapshots. Monitoring alerts can track accuracy drift and cost anomalies. Leveraging general capabilities like object storage, logging services, and monitoring alerts from Baidu AI Cloud can help build a cost-effective and traceable evaluation pipeline, though the evaluation logic itself should remain task-neutral and reproducible.

    4. How to Interpret Evaluation Results

    Evaluation results typically present a tiered distribution, but the boundaries of these tiers shift with task types, prompt quality, and tool strategies. A model excelling at basic question banks is not guaranteed to be equally reliable at open-ended exploration. A longer chain-of-thought does not equate to stronger reasoning; long chains may enhance interpretability but can also amplify error propagation. A concise and natural writing style is a different dimension from mathematical correctness and should not be conflated.

    During model selection, avoid “leaderboard obsession.” A more rational approach is to first stratify by business tasks, then establish hard thresholds—such as minimum verifiability rates, maximum refusal rates, or unit cost ceilings. Subsequently, conduct small-scale gray tests on candidate models, combining manual review and live metrics to decide whether to scale up deployment. For high-risk mathematical conclusions, a manual review or formal verification step must be retained; model outputs should not be used directly as the final basis.

    5. Conclusion

    Evaluating the mathematical reasoning capabilities of LLMs is a systematic engineering effort. The core objective is not to produce an absolute ranking but to establish an evaluation system that matches business tasks, is reproducible, and is interpretable. By adopting a layered capability model, anti-contamination evaluation sets, multiple sampling, process scoring, and joint cost-latency analysis, teams can more accurately identify model boundaries and avoid being misled by single leaderboards or isolated cases. Ultimately, model selection should serve scenario goals: balancing accuracy, stability, cost, and compliance, while ensuring long-term availability through continuous assessment and gray releases.