Evaluation Framework and Selection Practices for LLM Mathematical Reasoning

    Selecting the right Large Language Model (LLM) for mathematical reasoning requires moving beyond subjective experience to a structured evaluation framework. This article provides an actionable methodology for assessing LLM math capabilities, covering dimensions like proof completeness, reasoning stability, and formatting norms. It also details how to align metrics with task types, quantify efficiency and costs, establish a reproducible internal evaluation pipeline, and implement tiered routing strategies to optimize performance and expenditure.

    1. Background: Why Subjective Experience Falls Short in Model Selection

    Discussions about LLMs in technical communities often rely on personal experience. Some argue a specific model is better for brainstorming, while another suits concrete tasks; others prioritize response speed. While valuable, these observations mix multiple variables, are hard to reproduce, and rarely achieve internal team consensus.

    To transform “feels good to use” into reliable decision metrics, three steps are required: clarify task types, break down evaluation dimensions, and collect data using a unified process. The following sections use mathematical reasoning as an example to provide an actionable approach.

    2. Evaluation Dimensions for Mathematical Reasoning

    2.1 Proof Completeness

    A qualified mathematical proof should contain explicit assumptions, step-by-step verifiable derivations, and clear conclusions. During evaluation, check the following:

    • Whether each derivation step is supported by premises or lemmas;
    • Whether the referenced definitions and theorems actually exist, and if their numbering and applicable conditions are accurate;
    • Whether critical edge cases are omitted, such as empty sets, zero values, or consistency during limit processes.

    Scoring based solely on whether the conclusion is correct tends to overestimate the model. Outputs with correct conclusions but skipped steps or circular reasoning are unusable in teaching and research scenarios.

    2.2 Distinguishing Known Conclusions from Open Problems

    Some propositions have complete proofs in public materials, while others remain unresolved. A model might produce a seemingly complete restatement of a known conclusion but err in sources or details. Before evaluating, confirm the status of the proposition:

    • For known conclusions, verify if the model’s restatement aligns with original sources;
    • For open problems, focus on whether the model can provide evidence-based advancements rather than fabricating a seemingly complete proof.

    2.3 Reasoning Stability

    Results for the same problem can vary significantly across different samplings. Stability can be measured by running the task multiple times and comparing whether the core conclusions remain consistent. If a certain type of problem yields different conclusions in three out of five runs, it should be flagged as a high-risk category during model selection, requiring manual review.

    2.4 Expression Norms

    Mathematical documents have strict requirements for symbols, definitions, and formatting. Whether variables are consistent, formulas can be compiled directly, and the structure conforms to common lecture or paper writing styles will affect subsequent usage costs.

    3. Prioritizing by Task Type

    Different tasks place vastly different demands on the model. The table below outlines a common categorization:

    Task Type Key Metrics Acceptable Trade-offs
    Brainstorming and Ideation Coverage, Inspiration Accuracy can be moderately relaxed; speed prioritized
    Code and Document Execution Accuracy, Maintainability, Speed Balance between capability and cost
    High-Difficulty Math Reasoning Proof Completeness, Accuracy Higher latency and cost acceptable
    Batch Data Processing Throughput, Unit Cost Single-pass quality can be slightly lower; rely on spot checks

    The purpose of this categorization is to avoid measuring all scenarios with a single metric. A model excelling in high-difficulty reasoning may not be the best choice for batch processing.

    4. Quantifying Efficiency and Cost

    Speed and cost are often conflated but must be calculated separately. The end-to-end latency of a single request can be approximated as:

    Total Latency ≈ Time to First Token + (Output Token Count ÷ Generation Rate)

    The generation rate is usually measured in output tokens per second. Suppose a task requires outputting 4,000 tokens: at a rate of 50 tokens per second, the output phase takes about 80 seconds; if increased to 400 tokens per second, it takes about 10 seconds. These figures are for illustrative purposes only and do not represent actual measurements of any specific system.

    Cost accounting also needs to be broken down. The cost per task can be expressed as:

    Cost Per Task = Number of Calls × (Input Token Count × Input Price + Output Token Count × Output Price)

    Under subscription or quota-based systems, you should also convert quota consumption into an average proportion per task to facilitate comparing the actual cost-effectiveness of different models.

    5. Building an Internal Evaluation Pipeline

    A reproducible evaluation pipeline typically involves the following steps:

    1. Build a Task Set: Collect representative problems by category, with at least dozens of items per category, covering easy, medium, and hard difficulty levels.
    2. Define Scoring Rules: Use automated comparison for questions with standard answers; design rubrics for proof-based questions to be scored independently by two or more reviewers.
    3. Blind Evaluation: Reviewers score without knowing the model source, reducing the impact of subjective bias.
    4. Record Metrics: Include accuracy, stability, latency, cost, and manual editing time.
    5. Regular Retesting: Model versions and service configurations change rapidly; conclusions should have an expiration date.

    Here is a sample code snippet:

    1. def evaluate_model(model, tasks, grader, runs=3):
    2. records = []
    3. for task in tasks:
    4. for _ in range(runs):
    5. start = now()
    6. output = model.generate(task.prompt)
    7. latency = now() - start
    8. score = grader.score(task, output)
    9. records.append({
    10. "task_id": task.id,
    11. "category": task.category,
    12. "score": score,
    13. "latency": latency,
    14. "output_tokens": count_tokens(output),
    15. })
    16. return aggregate(records)

    The aggregate function can output average scores, standard deviations, and median latency by category, facilitating horizontal comparison.

    6. Tiered Usage and Routing Strategies

    It is uncommon for a single model to handle all tasks. A more prevalent approach is routing based on task difficulty and risk:

    • High-risk or high-difficulty reasoning: Use the most capable model and retain manual review;
    • Routine execution tasks: Select models with fast speed, low cost, and acceptable quality;
    • Divergent tasks: A mid-tier capability model suffices, focusing on coverage.

    Routing rules should be based on evaluation data rather than personal impressions. Teams can adjust tiered thresholds quarterly based on new data.

    7. Common Pitfalls and Considerations

    1. Small Sample Size: Results from a few questions cannot support conclusions; expand the sample size and perform categorized statistics.
    2. Data Contamination: If evaluation questions appear in the training data, scores will be inflated. Use newly constructed questions or test after making equivalent rewrites.
    3. Checking Conclusions Only: Mathematical tasks must have their derivation chains inspected.
    4. Ignoring Privacy and Compliance: When involving internal data or unpublished research, verify the data processing terms of the service.
    5. Equating Speed with Quality: Fast output of incorrect results can cause greater losses than slow but correct results.

    8. Conclusion

    Model selection is essentially a trade-off under constraints. Clarifying task types, breaking down evaluation dimensions, and collecting data through a unified process are more reliable than relying on personal impressions. Teams are advised to start by establishing a baseline with a small task set before gradually expanding to more scenarios.