Evaluating and Selecting LLMs for Mathematical Reasoning: A Practical Guide

    High benchmark scores do not guarantee reliable production performance. This article explains why LLM capability is a multi-dimensional vector rather than a single scalar, and how to evaluate mathematical reasoning across correctness, token efficiency, variance, and write-up quality. It covers prompt structures that produce deliverable documents, a three-tier routing strategy that reserves expensive reasoning models for open-ended tasks, and the economics of self-hosted inference. Readers will learn how to build an engineering system that balances quality, latency, and cost.

    1. Background: Why a High Benchmark Score Does Not Mean the Model Can Do the Job

    In real engineering work, teams often run into an awkward situation. A model ranks near the top of public leaderboards, yet once it is wired into a business workflow, output quality becomes unstable, formatting slips out of control, and long reasoning chains drift off course midway. Meanwhile, some models with extremely fast responses and very low unit cost perform quite reliably on structured extraction, template-based writing, and routine code completion.

    This shows that model capability is not a scalar but a multi-dimensional vector. Evaluation must start by分层 the tasks, and only then can model selection be discussed. Tasks commonly fall into four layers:

    1. Routine execution: format conversion, summarization, template-based text generation, simple code generation;
    2. Complex engineering: multi-file refactoring, long-context consistency maintenance, tool-call orchestration;
    3. Semi-open reasoning: multi-step derivation with a standard answer, such as competition-level math problems and formal proof completion;
    4. Open research: no ready-made answer, requiring the model to construct a proof path or propose a new approach on its own.

    The core pain point is precisely here. Once routine tasks are covered by high-speed models with nearly an order-of-magnitude throughput advantage, high-end reasoning capability becomes the scarce resource, even though this scarce capability is actually used infrequently.

    2. Evaluation Framework: Breaking “Math Ability” into Observable Metrics

    Asking broadly “which model is good at math” is meaningless. It is better to split evaluation into four dimensions.

    1. Correctness
    A correct final answer is only the minimum requirement. A more rigorous approach is layered judgment: the conclusion is correct, the key lemmas are correct, and the reasoning chain contains no circular argument. For formal proof tasks, you should also check whether the model cites non-existent theorem numbers or fabricates prerequisite results.

    2. Token Efficiency
    There is a counterintuitive phenomenon that is often overlooked: a model with a longer chain of thought is not necessarily stronger. An overly long reasoning chain introduces more self-negation and branch backtracking, which increases the surface area for errors. The following illustrative metric can be used for horizontal comparison:

    1. # Illustrative only: joint evaluation of reasoning efficiency and correctness
    2. def score(correct: bool, output_tokens: int, latency_ms: int) -> float:
    3. if not correct:
    4. return 0.0
    5. # Given correctness, lower tokens and latency are better
    6. return 1.0 / (1.0 + output_tokens / 4000 + latency_ms / 60000)

    3. Variance
    Sampling the same prompt multiple times, the smaller the fluctuation in accuracy, the more suitable the model is for production. Research-oriented exploration can tolerate high variance, but business pipelines require low variance.

    4. Write-up Quality
    Whether the model can organize the derivation into a clearly structured document that is ready for delivery is the key distinction between “can solve the problem” and “can deliver.” Clean formatting, consistent notation, and continuous lemma numbering are all part of engineering usability.

    3. Prompt Design: Making the Model Output a Deliverable, Not a Draft

    A representative practice is to give only a minimal instruction, asking the model to complete a proof that is not covered by existing material and to produce an English lecture note directly. This suggests that the marginal value of high-end models lies mainly in zero-shot long-task completion.

    A reusable prompt skeleton is as follows:

    1. Task objective: <the type of document to deliver and the target reader>
    2. Constraints:
    3. 1. Do not cite external results that are not given; if a lemma is needed, prove it yourself;
    4. 2. Present the notation table first, and keep notation consistent throughout;
    5. 3. Structure: definitions -> lemmas -> main theorem -> proof -> corollaries.
    6. Output format: compilable typesetting source with theorem environments.
    7. Self-check step: list the prerequisite result number that each step of the proof depends on.

    The key is the final self-check step. Forcing the model to explicitly list dependencies significantly reduces circular reasoning and skipped steps.

    4. Human-AI Collaboration: Spending Scarce Compute Where It Matters

    Based on task layering, a three-tier routing strategy is recommended:

    • Tier 1: routine tasks go to high-throughput, low-cost models, or fall back to rule-based templates;
    • Tier 2: complex engineering tasks go to models with strong long-context capability, paired with retrieval and static-checking tools;
    • Tier 3: only open reasoning tasks invoke the strongest reasoning model, with a human review gate in place.

    Illustrative routing logic:

    1. def route(task):
    2. if task.level == "routine":
    3. return fast_model, {"temperature": 0.2}
    4. if task.level == "engineering":
    5. return long_context_model, {"retrieval": True}
    6. return reasoning_model, {"max_tokens": 32000, "self_check": True}

    This layering directly addresses the cost anxiety: generating one high-end lecture note may consume a considerable share of the monthly quota, and spending it on template-based tasks is a huge waste.

    5. Deployment and Cost: The Economics of Self-Hosted Inference

    When model weights are available for self-deployment, the cost structure changes fundamentally. A single high-spec accelerator server rack can achieve very high generation throughput in batch scenarios, making the per-token cost far lower than pay-as-you-go API calls. Enterprises can build elastic inference services on top of general-purpose container platforms, object storage, message queues, and monitoring and alerting capabilities: the container platform hosts inference instances and auto-scaling, object storage retains evaluation sets and artifacts, message queues smooth out traffic peaks and troughs, and the logging and monitoring system tracks latency, failure rate, and token consumption.

    It is worth emphasizing that higher throughput does not automatically translate into business gains. Caching and reuse, request batching, and timeout fallback strategies must be in place, otherwise high-speed inference will only produce invalid output faster.

    6. Common Pitfalls and Practical Recommendations

    • Pitfall 1: substituting speed for quality. Speed solves the experience problem; correctness solves the usability problem.
    • Pitfall 2: drawing conclusions from a single run. Sample multiple times at minimum, and observe the variance.
    • Pitfall 3: ignoring the delivery format. A model that cannot directly produce a properly formatted document requires an additional post-processing pipeline, which carries high hidden costs.
    • Pitfall 4: setting the strongest model as the default. The default should be the best cost-performance tier, with the strongest model triggered on demand.

    In summary, the core of model selection is not finding a “single irreplaceable” solution, but building an engineering system with task layering, metric-based evaluation, tiered routing, and observable cost. When the evaluation criteria are clear and the routing strategy is sound, the technology stack can maintain a stable balance among quality, latency, and cost, and keep adjusting as the business evolves.