Evaluating and Selecting LLMs for Mathematical Reasoning: A Reproducible Approach
This article outlines a reproducible methodology for evaluating and selecting Large Language Models (LLMs) for mathematical reasoning tasks. It covers building trustworthy evaluation datasets, analyzing chain-of-thought stability, assessing cost and latency, and implementing model routing. Using observations from testing the K3.1 Pro model, it provides actionable insights for deploying LLMs in educational, engineering, and research scenarios.
1. Why Mathematical Reasoning Requires Dedicated Evaluation
Mathematical problems require a model to simultaneously perform symbol recognition, condition extraction, multi-step derivation, and result verification. An error in any intermediate step will lead to an incorrect final answer. Therefore, a model that performs well in general Q&A may not necessarily solve multi-step math problems reliably. This is why many teams consider mathematical reasoning a key benchmark for a model’s overall capability.
However, scores on public leaderboards are often difficult to use directly for model selection. There are three common issues: test questions may have already appeared in the training data; question patterns are often fixed, making it easy for models to apply templates; and difficulty distribution is uneven, meaning the same score may correspond to entirely different capability levels. Before evaluating, you should first answer a question: what specific capability are we trying to assess, and what is the basis for this assessment?
2. Building a Trustworthy Evaluation Dataset
An evaluation dataset should cover three levels, with the number of questions and judgment rules for each level specified in advance.
| Level | Typical Tasks | Recommended Volume | Judgment Rules |
|---|---|---|---|
| Basic Calculation and Formula Application | Algebraic simplification, derivation, common formula substitution | At least 50 per category | Final answer matches the standard answer |
| Multi-step Derivation | Multi-step algebraic transformation, geometric proofs, sequence recursion | At least 30 per category | Final answer is correct, and key intermediate steps are error-free |
| Open-ended Problems | Modeling word problems, combinatorial counting, competition problems | At least 20 per category | Answer is correct, or proof passes manual review |
The evaluation dataset also requires two additional steps. First, contamination detection. Rewrite questions into equivalent but differently worded versions and compare the accuracy rates of the two sets. A significant gap indicates that the model may have memorized the original questions. Second, difficulty calibration. Each question should be manually labeled for difficulty by at least two annotators, and the inter-annotator agreement rate should be recorded.
3. Chain of Thought and Stability
A longer Chain of Thought (CoT) does not equate to better reasoning. While lengthy derivations show more steps, each additional step increases the chance of an error. During evaluation, three metrics should be recorded: the number of derivation steps, the location of errors in intermediate steps, and whether the model can backtrack and correct itself after being prompted. A good CoT should be concise, with clear justifications between steps, and should utilize symbolic expressions wherever possible.
Stability needs to be tested separately. Sample the same question multiple times under identical parameters and calculate the answer consistency rate. The original test setup used a temperature of 0.2, sampling 3 times per question and taking the best result. This approach inflates the score because it counts as correct if any one of the three attempts happens to be right. When reporting, you should provide both the average accuracy of a single sample (pass@1) and the best result, while clearly stating the sampling count and temperature.
4. Observations and Limitations of a New Reasoning Model
Evaluation articles often use specific models as examples. This article discusses a reasoning model named K3.1 Pro. The author team observed the following phenomena during limited testing. Since the test volume, detailed judgment criteria, and some testing conditions were not fully disclosed, these observations should only serve as directional references.
In basic algebraic operations and structured problem-solving, the model’s steps are generally complete, and the answer format is relatively stable. On open-ended problems requiring the construction of a solution path from scratch, its performance is weaker than some widely recognized powerful closed-source models. In long-chain problems, a common failure mode is that intermediate steps appear reasonable, but the final conclusion is incorrect.
Compared to lightweight open-source models, K3.1 Pro has an advantage in reasoning depth but provides fewer process explanations. If your business requires step-by-step auditing of the reasoning process, you will need to compensate for this through prompt engineering or post-processing.
These observations have clear boundaries. The conclusions only apply to the model version and parameter settings used during testing; results may change with a different version or temperature. Before adoption, readers should re-verify on their own evaluation datasets.
5. Model Selection Based on Business Scenarios
The goal of evaluation is to find a suitable model for specific business needs. The model ranked first overall may not be the best fit for every scenario. Therefore, the following criteria are provided for three types of scenarios.
5.1 Educational Problem Solving and Answer Analysis
For the automated analysis of basic question types, calculation accuracy and the quality of step generation are key metrics. Combining this with Retrieval-Augmented Generation (RAG) and answer verification can reduce the risk of presenting incorrect analyses to students. Before launch, you should conduct sample testing on your institution’s or platform’s real question bank and track the weekly error rate.
5.2 Engineering Calculation and Formula Automation
Models have practical value in converting natural language descriptions into mathematical expressions and generating code. During validation, prepare a batch of formula derivation and code generation tasks with standard answers, and set pass criteria—for example, the generated code must pass unit tests with a numerical error below a set threshold. Failed cases should be archived to identify which types of formulas are prone to errors.
5.3 Research Exploration and Open Conjectures
For unprecedented open mathematical problems, no current model can replace manual research. Models are better at combinatorial reasoning within existing knowledge frameworks. When used for exploration, outputs should be treated as leads to be verified, not as conclusions.
6. Quantifying Cost, Latency, and Stability
Inference models often incur higher calling costs than standard models, and response time fluctuations can be significant. During selection, record the following metrics:
- Input and output token count per call;
- Time to first token (TTFT) and overall response latency, calculating P50 and P95;
- Failure retry rate, including timeouts, formatting errors, and incorrect answers;
- Effective cost per problem, calculated as total cost divided by the number of correct answers.
The effective cost per problem can be approximated using the following formula:
Effective Cost per Problem ≈ (Input Tokens × Input Price + Output Tokens × Output Price) ÷ (1 − Retry Rate) ÷ Per-Problem Accuracy
Pricing should be based on the provider’s current public rates. For example, assume a model averages 800 input tokens and 1200 output tokens per problem, with a 5% retry rate and a 90% accuracy rate. Plugging these into the formula yields an estimated cost. These numbers are for demonstration only; actual prices depend on the provider’s pricing page.
7. Model Routing Features and Thresholds
It is difficult for a single model to achieve optimal performance in both cost and capability. Model routing addresses this by assigning models based on problem difficulty. The router can assess difficulty using the following features:
- Text length of the problem;
- Question type keywords, such as “proof,” “optimization,” “counting,” or “existence”;
- Whether the problem contains multiple conditions or multiple questions;
- A difficulty score provided by a lightweight classifier.
A viable threshold configuration is as follows: if the classifier difficulty score is below 0.3, use a lightweight model; between 0.3 and 0.7, use a balanced model; above 0.7, or if “proof” type keywords are detected, use the most capable model. If the high-difficulty model’s answer fails verification, it is routed to a manual review queue. Thresholds should be determined based on your own annotated data; the values above are merely examples.
8. Three Pre-Launch Checks
First, instruction format constraint testing. Prepare a batch of problems that require a fixed output format, such as returning only JSON or only the final numerical value. The pass criterion is a format consistency rate of at least 99%, with no programmatic parsing exceptions.
Second, multilingual and ambiguity testing. Rewrite the same problem using different phrasings to check if the answers remain consistent. Semantically ambiguous problems should be grouped separately, and it should be recorded whether the model proactively states its assumptions.
Third, version regression testing. After the provider upgrades the model, re-evaluate using a fixed regression dataset. If the accuracy of key sub-capabilities drops beyond a set threshold (e.g., a drop of more than 3 percentage points), pause the transition and investigate the cause.
9. Conclusion
K3.1 Pro demonstrates stable performance in basic calculations and structured problem-solving, but still has clear limitations in open-ended problems and long-chain tasks. This assessment is based on limited observations and should be verified against your own evaluation dataset.
For technical decision-makers, a more practical approach is to first define the capabilities required by the business, measure them using a reproducible evaluation dataset, and finally make a decision factoring in cost, latency, and stability. Adopting model routing can further help strike a balance between cost and performance.
