Evaluating and Selecting LLMs for Mathematical Reasoning: A Practical Guide

    This article explains why benchmark scores alone are not enough to judge a large language model's mathematical reasoning ability. It introduces a three-level capability model, a reproducible evaluation set with a four-dimension scoring rubric, task-based model selection, structured prompting and verification toolchains, and cost and deployment considerations. Readers will find a practical framework for making reliable decisions across capability, throughput, and cost.

    1. The Problem: Why Benchmark Scores Are Not Enough

    In real engineering work, many teams run into an awkward situation: a model performs well on general leaderboards, but as soon as it is asked to handle math tasks that require constructing a proof on its own, the output degrades quickly—steps get skipped, arguments become circular, and conditions are used as conclusions. The experience described in the original discussion—producing a well-structured English handout from a single prompt—is not really about the model “memorizing the answer.” It means the model has reached a usable threshold in long-chain reasoning, symbolic organization, and expression quality.

    To evaluate a model’s mathematical ability properly, you need to separate three levels:

    1. Reproduction: the problem and its proof already exist in public material, and the model only needs to reproduce them;
    2. Transfer: the problem type is familiar but the conditions have been rewritten, so the model must adjust its reasoning path;
    3. Open-ended: no existing proof is available, and the model must construct and self-check its own argument.

    The third level is the one with real engineering value. It cannot be captured by a single score; it has to be assessed together with process quality, verifiability, and cost.

    2. Building a Reproducible Evaluation Set: From “Feels Good” to Data

    Start with four groups of samples, 20–50 problems each:

    • Group A (existing proofs): detects whether the model is just recalling problems;
    • Group B (perturbed conditions): change variables, swap premises, add redundant conditions;
    • Group C (open-ended construction): requires a complete proof with no reference answer;
    • Group D (counterexamples and boundaries): requires a counterexample or an explanation of where a claim fails.

    Do not score only on “right or wrong.” Use four dimensions:

    1. Correctness 0.4 : whether the conclusion and reasoning hold
    2. Completeness 0.3 : whether all cases are covered with no skipped steps
    3. Verifiability 0.2 : whether each step can be checked independently
    4. Presentation 0.1 : whether symbols, terminology, and layout are clear

    Sample evaluation script (pseudocode):

    1. for task in dataset:
    2. out = model.generate(prompt=task.prompt, temperature=0.2)
    3. score = rubric.evaluate(out, task.reference_or_checker)
    4. report.append((task.id, task.group, score, out.tokens, out.latency))

    The key point: run all candidate models on the same problems, the same rubric, and the same parameters. Otherwise the results are not comparable.

    3. Choosing Models by Task Type: There Is No Universal Winner

    The more reliable engineering approach is to select models per task layer rather than chasing a single “strongest model.”

    • Open-ended math and long proofs: prefer models with long chain-of-thought, self-checking, and support for longer context;
    • Everyday coding and engineering tasks: prefer high-throughput, low-latency models; math ability only needs to be “good enough”;
    • Brainstorming and option enumeration: focus on divergent thinking and natural expression;
    • High-reliability delivery: regardless of the model, add formal verification or unit-test-style checks.

    The original discussion noted that when speed is nearly nine times higher and capability is similar, it is hard to find a scenario that requires one specific model. That is the core conclusion of model selection: once capability crosses the usable threshold, throughput and cost become the deciding variables.

    4. Prompts and Toolchains: Turning “Inspiration” into Deliverables

    High-quality output usually comes from structured prompts, not a single natural-language sentence. Recommended template:

    1. Role: math writing assistant
    2. Task: prove the following claim and produce an English handout
    3. Constraints:
    4. 1. List the definitions and known lemmas used first;
    5. 2. Discuss by cases and state the conditions for each case;
    6. 3. Give a reason for every step; no skipped steps;
    7. 4. End with a self-check list: circular reasoning, misuse of conditions, missing boundaries;
    8. 5. Output structured text with heading levels and numbered formulas.

    Toolchain recommendations:

    • Symbolic computation / numerical verification: spot-check key steps;
    • Formal proof checking: machine-verify the parts that can be formalized;
    • Retrieval augmentation: use only to confirm definitions and known results, not to copy proofs;
    • Logging and tracing: save chain-of-thought summaries, token usage, and latency for review.

    5. Cost, Throughput, and Deployment

    Long mathematical reasoning consumes far more tokens than ordinary conversation. A single handout consuming one to several percent of a monthly quota is a common order of magnitude. Cost optimization can start from three areas:

    1. Tiered routing: send simple tasks to small or high-throughput channels, and escalate only hard problems;
    2. Caching and reuse: apply prefix caching to definitions, lemmas, and templates;
    3. Batching and async: run offline handout generation as batch jobs, and interactive Q&A on low-latency channels.

    For deployment, common approaches include pay-as-you-go public cloud calls, dedicated instances, and self-hosted inference services built on high-performance accelerators. Self-hosted setups have advantages in throughput per unit and data control, but require additional investment in operations, monitoring and alerting, logging services, and elastic scaling. Cloud setups can quickly build an elastic pipeline using common capabilities such as container platforms, object storage, and message queues. The choice depends on data sensitivity, peak fluctuation, and the long-term cost curve—not simply on unit price.

    6. Common Pitfalls

    • Treating leaderboards as conclusions: leaderboard problem types differ greatly from real task distributions;
    • Looking only at the final answer: skipped steps and circular reasoning are common in long proofs;
    • Ignoring verifiability: reasoning that cannot be checked is effectively unusable in engineering;
    • Betting everything on a single model: keep a switchable abstraction layer to avoid lock-in;
    • Underestimating cost: budget for the tokens and latency of long chain-of-thought in advance.

    7. Implementation Checklist

    1. Build a layered evaluation set of about 100 problems and get the rubric working;
    2. Set three red lines per task type: capability threshold, latency limit, and cost limit;
    3. Build a model abstraction layer that supports canary switching and A/B comparison;
    4. Add machine verification and manual spot checks for high-value output;
    5. Review monthly: changes in capability, price, and throughput, and adjust routing strategy dynamically.

    Overall, judging whether a model is “suitable for math tasks” relies not on scattered impressions but on reproducible evaluation, layered selection, structured prompts, and a verifiable toolchain. Once this framework is in place, you can make sound decisions across capability, speed, and cost.