How to Evaluate LLM Mathematical Reasoning: A Practical Framework
This article presents a practical framework for evaluating the mathematical reasoning of large language models. It explains why simple model comparisons are unreliable, breaks mathematical ability into four layers, and recommends a 60–120 question evaluation set with a 40/40/20 mix of standard, open-ended, and trap questions. It also covers chain-of-thought quality dimensions, cost-aware execution with quota scheduling, and how to report results as capability ranges rather than rankings. The framework applies to any LLM service, including model capabilities offered by Baidu AI Cloud.
1. Why “Which Model Is Better” Is Hard to Answer
In real engineering decisions, teams often run into an awkward situation: the same model performs very differently across business scenarios. Some teams find it nearly unusable on open-ended math problems, while others find it clearly better than comparable options on specific question types. This is why comment-section-style head-to-head comparisons rarely converge. The root cause is inconsistent evaluation criteria: differences in question difficulty distribution, prompt wording, whether long chains of thought are allowed, and whether tool-calling access is granted can all change the conclusion significantly.
So instead of arguing about whether one model can “beat” another, it is better to establish a self-consistent evaluation method first. This article abstracts a general framework that applies to any large language model service, including the model capabilities offered by Baidu AI Cloud.
2. A Layered Capability Model: Breaking Down “Math Ability”
A vague notion of “math ability” contains at least four layers, and evaluating them together inevitably distorts the results:
- Arithmetic and symbolic manipulation: basic operations, algebraic transformation, and unit conversion, which test baseline reliability.
- Standard problem solving: textbook-style questions and common competition routines, which test training coverage.
- Open-ended problems: problems with no standard solution that require constructing auxiliary structures or introducing intermediate lemmas, which test genuine reasoning depth.
- Long-chain stability: whether contradictions or conclusion drift appear when reasoning steps become very long, which tests consistency.
The core point can be abstracted as follows: what really separates models is the third and fourth layers, not the first two. Many models are nearly indistinguishable on the first two layers; the capability gradient only appears once the task requires autonomously constructing a solution.
3. Building the Evaluation Set: A Three-Part Mix
Build a small but clearly structured evaluation set of your own. A size of 60–120 questions is enough, with a mix like this:
- 40% standard questions: used for regression testing to catch baseline degradation after a model upgrade.
- 40% open-ended questions: requiring multi-step construction, and the main source of discrimination.
- 20% trap questions: containing implicit contradictory conditions, overdetermined systems, inconsistent units, and so on, to test whether the model “forces” a calculation.
A sample evaluation data structure:
{"id": "open-017","tier": "open","prompt": "...","reference": "list of key intermediate conclusions","scoring": ["final_answer", "key_lemma", "chain_consistency"]}
Note that scoring should not look only at the final answer. On open-ended questions, a correct answer reached by a wrong path (for example, reverse-engineering the answer) is very common, so key intermediate conclusions must be included as scoring items.
4. Chain-of-Thought Quality: Four Dimensions That Matter More Than Length
Different models show clear differences in chain-of-thought length and complexity, and this is critical in engineering. Chain-of-thought quality should not be judged by length alone but by four dimensions:
- Conciseness: whether there is a lot of repeated self-confirmation.
- Traceability: whether intermediate conclusions are written out explicitly, making it easy to locate errors manually.
- Self-correction rate: whether the model can backtrack and fix a contradiction instead of continuing down the wrong path.
- Readability: whether the expression resembles a human problem-solving narrative, which directly affects maintainability.
A practical way to quantify this is to measure the “wasted token ratio,” the proportion of repeated statements and uninformative transitions in the total output. The lower this metric, the more effective reasoning is usually produced per unit of cost.
5. Running the Evaluation and Controlling Cost
Long chains of thought mean high latency and high consumption. If your organization has trial resources billed by credits or quotas, use a scheduling strategy like this:
- Run a smoke test with standard questions first to confirm the service is available and to check rate-limiting behavior.
- Run open-ended questions in small batches, observe failure modes, and then decide whether to expand the sample.
- Batch high-consumption tasks together to avoid wasting quota on fragmented calls.
- For quota that is about to expire, schedule low-value but automatable batch tasks to use it up, such as log summarization or document classification, so resources are not left idle.
Pseudocode example:
def schedule(tasks, quota_left):for t in sorted(tasks, key=lambda x: x.cost):if t.cost <= quota_left:run(t); quota_left -= t.costif quota_left <= 0:breakreturn quota_left
6. How to Express the Selection Conclusion
A more rigorous conclusion should not be a ranking but a “range judgment”: roughly which two capability tiers a model sits between, which question types it is stronger on, and in which scenarios it falls short. This kind of statement is reproducible, verifiable, and easy to keep updated as models iterate. Teams should write conclusions into an internal evaluation report and note the evaluation date, question version, and prompt version, so conclusions are not misused after they become outdated.
7. Implementation Checklist
- Set up a versioned evaluation set, with questions and scoring scripts committed to the code repository.
- Run a full regression on every model change and output a layered radar chart instead of a single score.
- Keep a manual spot-check step for open-ended questions, focusing on the correctness of intermediate conclusions.
- Include both cost and effectiveness in decisions, forming an “effectiveness per unit of consumption” metric.
- Describe conclusions as ranges and applicable scenarios, avoiding absolute rankings.
In summary, evaluating open-ended math ability is a continuous engineering effort, not a one-off comparison. Once a team masters layered decomposition, a structured evaluation set, chain-of-thought quality dimensions, and quota scheduling, it can make robust and reproducible model selection decisions under incomplete information.
