Evaluating and Selecting LLMs for Advanced Mathematical Reasoning: A Practical Framework

    This article presents a practical framework for evaluating and selecting general-purpose large language models based on their advanced mathematical reasoning capabilities. It breaks mathematical ability into four layers, proposes a three-tier task design (verifiable computation, standard proof reproduction, and open-ended construction), and introduces a five-dimension process-based scoring rubric. The article also covers prompt engineering, context management, inference cost governance, and capability-based model selection, offering a deployment checklist for teams that need reliable high-level reasoning under limited quotas.

    1. Background: Why Mathematical Ability Cannot Be Reduced to a Single Score

    In open-source communities and technical discussions, evaluating a general-purpose LLM’s mathematical ability is often simplified into a single aggregate score or a one-off comparison. In real engineering scenarios, however, mathematical ability is not a single dimension. It can be broken down into at least four layers:

    1. Computational reliability: whether arithmetic, symbolic manipulation, and unit conversion remain stable;
    2. Reasoning chain completeness: whether multi-step derivations contain skipped steps, circular reasoning, or implicit assumptions;
    3. Formal expression quality: whether the model can produce deliverable documents using standard mathematical writing (e.g., structured proofs, formula formatting);
    4. Open-ended exploration: whether the model can autonomously construct auxiliary constructions, try multiple paths, and self-refute when facing propositions with no ready-made answer.

    A key observation from the original discussion is that most models perform well at the third layer, while the fourth layer is where real differences emerge. This judgment is valuable in engineering terms, because it means an evaluation set cannot consist only of problems with standard answers.

    2. Evaluation Task Design: Stress Testing with Propositions That Lack Ready-Made Proofs

    To distinguish capability tiers, construct three categories of tasks:

    • Category A (verifiable computation): given explicit inputs and outputs, scored automatically;
    • Category B (standard proof reproduction): a public proof exists, testing rigor and expression;
    • Category C (open-ended construction): the proposition lacks a ready-made proof, testing exploration and self-consistency.

    The key constraint for Category C tasks is: they must not rely on answers already stored in the model’s memory. A sample prompt structure is shown below:

    1. Role: You are a mathematical writing assistant.
    2. Task: Prove proposition P.
    3. Constraints:
    4. 1. Do not cite external results that are not provided as "known";
    5. 2. Every step must state its basis (definition/lemma/construction);
    6. 3. If a step cannot be completed, explicitly state the failure reason and the paths already ruled out;
    7. 4. Output a structured lecture note containing definitions, lemmas, theorems, proofs, and an appendix.

    The value of this prompt is that it turns “the final answer is correct” into “the process is auditable,” upgrading evaluation from result comparison to process assessment.

    3. Evaluation Metrics: From Binary Scoring to Process Scoring

    A five-dimension scoring sheet is recommended (0–5 points per dimension):

    Dimension Focus Scoring Basis
    Premise consistency Whether undeclared assumptions are introduced Line-by-line comparison against the premise list
    Derivation validity Whether each step follows from the previous one Manual or rule-based verification
    Construction novelty Whether a non-trivial auxiliary construction is provided Overlap with known paths
    Expression standardization Consistency of formulas, numbering, and terminology Formatting and terminology checks
    Self-correction Whether the model can backtrack and retry after finding a contradiction Whether explicit backtracking occurs

    In engineering practice, “self-correction” can be treated as the most discriminative metric: weak models tend to keep patching an erroneous path, while strong models explicitly declare “this path failed, switching strategy.”

    4. Prompt Engineering and Context Management

    Advanced mathematical tasks are highly sensitive to context length and structure. Practical recommendations:

    • Layered prompting: first have the model list “known facts—goal—available tools,” then proceed to the proof;
    • Persist intermediate artifacts: write lemmas and constructions to a temporary document to avoid inconsistencies across long reasoning chains;
    • Segmented verification: run a consistency check after each lemma is completed, rather than a single check at the end;
    • Log failures: record rejected paths; this serves both as evaluation evidence and as a reusable asset.

    Sample workflow:

    1. Input proposition → structured decomposition → lemma list → lemma-by-lemma proof → consistency check → consolidated lecture note → failed-path archive

    5. Quotas and Cost: Turning Credit Consumption into a Budgetable Engineering Problem

    The original discussion mentioned quota consumption and queuing issues. In engineering terms, this is typical inference cost governance. Recommended practices:

    1. Tiered task routing: route Category A to low-cost models and Category C to high-capability models;
    2. Budget caps: set token and call-count limits for each open-ended task;
    3. Cache reuse: return cached results directly for identical propositions and prompts;
    4. Asynchronous queues: send long tasks to a message queue so the frontend only subscribes to status, avoiding synchronous waiting;
    5. Observability: use logging services and monitoring alerts to track success rate, average step count, and the distribution of failure reasons.

    Sample pseudocode:

    1. def route(task):
    2. if task.type == "A":
    3. return cheap_model(task)
    4. elif task.type == "B":
    5. return mid_model(task)
    6. else:
    7. return strong_model(task, budget=task.budget)

    6. Model Selection: Match by Capability Tier, Not by a Single Ranking

    Overall, selection should not pursue a “single strongest” model but should match by tier:

    • Tier 1 (open-ended exploration): available in very few models, suitable for research-oriented tasks;
    • Tier 2 (rigorous long-chain reasoning): concise reasoning chains and writing close to human expression, suitable for lecture notes and reports;
    • Tier 3 (complex but controllable): longer reasoning chains, suitable for scenarios requiring detailed processes;
    • Tier 4 (general-purpose and cost balance): suitable for batch Category A/B tasks.

    The engineering recommendation is to build an internal “capability matrix” and rerun the same Category C problems every quarter to form a trend curve, rather than relying on external leaderboards.

    7. Deployment Checklist

    • Build a private evaluation set of 20–50 Category C propositions, kept confidential to prevent memory contamination;
    • Standardize prompt templates and the scoring sheet to ensure reproducibility;
    • Archive failed paths into a knowledge base to feed back into prompt optimization;
    • Control cost with queues and caching, and drive iteration with monitoring metrics;
    • Base selection conclusions on the internal matrix, using external comparisons only as reference.

    With these methods, teams can turn “a model’s mathematical ability” from a subjective impression into a quantifiable, budgetable, and iterable engineering metric, achieving stable high-level reasoning output under limited quotas.