Evaluating Mathematical Reasoning in LLMs: Dimensions, Metrics, and Model Selection
This article outlines a practical approach to evaluating mathematical reasoning in large language models beyond public leaderboard scores. It covers private benchmark design for open-ended, proof, and cross-disciplinary problems; metrics for accuracy by difficulty and token efficiency; separate assessment of explanation quality; empirical comparison of versions within a model family; and enterprise model selection based on business scenarios, reproducible measurements, and post-deployment monitoring.
Large language models vary widely in mathematical reasoning, and relying only on public leaderboard scores can lead to poor selection decisions. This article provides actionable practices across four areas: evaluation design, chain-of-thought efficiency, expression quality, and model selection.
1. How to Evaluate Open-Ended Math Problems
Closed problems have standard answers and are easy to score, but public benchmark questions may already be in training corpora. This can inflate scores and make it difficult to distinguish between two strong models. Open-ended problems better reveal whether a model can design its own solution path, propose intermediate constraints, and complete multi-step reasoning.
Consider building a private evaluation set that includes at least three types of problems: open exploration problems (allowing multiple solutions), theorem proving problems (requiring a complete derivation), and cross-disciplinary computation problems (requiring physics, statistics, or programming knowledge). The following checklist can guide construction.
- Problem sources: Prefer original problems. When adapting textbook or competition problems, keep adaptation records and confirm copyright and licensing.
- Rubric: Evaluate separately whether the final answer is correct, whether proof steps are complete, and whether intermediate assumptions are explicitly stated.
- Blind review: Reviewers do not see model names or versions, reducing brand bias.
- Decontamination: Use retrieval tools to compare problems with public corpora, remove highly similar items, and add new problems regularly.
- Statistical protocol: Fix decoding parameters for each problem, sample repeatedly, and report the mean and confidence interval rather than a single result.
2. Measuring Chain-of-Thought Length and Efficiency
Longer chain-of-thought does not necessarily indicate weaker capability. Hard problems naturally require more steps, and longer derivations may be more reliable. The evaluation question is how many tokens a model needs to reach a correct answer at the same difficulty level, and whether the output can be checked.
Very short outputs are not necessarily efficient. A short chain-of-thought may skip key steps and end with an incorrect answer. Therefore, evaluation should be stratified by difficulty and consider both accuracy and cost.
Use the following metrics consistently.
| Metric | Definition | Measurement conditions |
|---|---|---|
| Accuracy by difficulty | Proportion of correct answers within each difficulty tier | Same prompt, same temperature, same maximum output length |
| Average tokens per problem | Total output tokens for reasoning and answer | Based on the usage field returned by the model |
| Token cost per correct answer | Total output tokens divided by the number of correct problems | Used to compare cost at equivalent accuracy |
| End-to-end latency | Time from request sent to complete output | Record P50 and P95, and note concurrency |
| Downstream parseability | Whether a program can extract the final answer or steps from the output | Measured with a fixed parser script |
Metrics must be recorded together with measurement conditions. Numbers without conditions cannot be reproduced or compared with other results.
3. Boundaries of Naturalness Evaluation
Some scenarios require a model to first give a rigorous derivation and then explain the conclusion in plain language. This capability has practical value in high-interaction scenarios such as intelligent tutoring and data analysis assistants. However, it is a different dimension from mathematical correctness.
When evaluating expression quality, use an independent rubric to check three things: whether the conclusion is consistent with the preceding derivation, whether assumptions are stated, and whether the language is understandable to the target user. Expression scores should be analyzed together with task completion rate and user satisfaction. Anthropomorphism should not be treated as direct evidence of reasoning ability.
4. Comparing Different Versions Within the Same Family
The capability relationship between versions in the same model family cannot be inferred from names alone. An enhanced version may outperform the previous flagship on one type of problem but lag behind on another. Therefore, this article does not assume any generational mapping. Use an empirical evaluation matrix instead.
The sample code below shows the basic structure of stratified evaluation. Here, model needs to implement a generate method, and each item in cases contains question and reference fields. The code illustrates the workflow and should be adapted to the actual SDK interface when integrated.
def run_tests(model, cases, grader):"""Call the model for each case, grade the answer, and return accuracy.cases: list, each item is {"question": str, "reference": str}grader: function with signature grader(answer, reference) -> bool"""correct = 0for case in cases:answer = model.generate(case["question"], temperature=0.0)correct += int(grader(answer, case["reference"]))return correct / len(cases)def calculate_token_efficiency(model, cases, grader):"""Return average output tokens and token cost per correct answer.Assumes model.generate returns a result object containing text and output_tokens."""total_tokens = 0correct = 0for case in cases:result = model.generate(case["question"], temperature=0.0)total_tokens += result.output_tokenscorrect += int(grader(result.text, case["reference"]))avg_tokens = total_tokens / len(cases)cost_per_correct = total_tokens / correct if correct else float("inf")return {"avg_output_tokens": avg_tokens, "tokens_per_correct": cost_per_correct}def build_matrix(models, suites, grader):"""Run evaluation for each model and each difficulty level, returning a nested dictionary.models: {model name: model object}suites: {difficulty level: list of cases}"""matrix = {}for name, model in models.items():matrix[name] = {}for level, cases in suites.items():matrix[name][level] = run_tests(model, cases, grader)return matrix
The matrix has models as rows and difficulty levels as columns. Each cell records accuracy, token cost, and latency. Differences in the same model across difficulty levels are often more informative than average differences between models.
5. How Enterprises Should Approach Model Selection
Model selection should start from business scenarios. Different scenarios require different metrics.
| Scenario | Metrics to watch | Recommended measurement approach |
|---|---|---|
| High-frequency Q&A, basic summarization | Latency, per-call cost | Replay requests based on real traffic |
| Data analysis, code generation | Accuracy, output verifiability | Build test cases from business data |
| Research assistance | Open-ended performance, proof completeness | Use a private evaluation set and blind review |
| Business involving sensitive data | Data storage location, retention and deletion policies | Review terms of service and compliance requirements |
This article does not recommend specific vendors or products. Selection conclusions should be based on the enterprise’s own test results.
For deployment, complex reasoning tasks can create significant compute and concurrency pressure. Container services and autoscaling from general cloud-native platforms can help handle traffic fluctuations. Test datasets can be managed centrally in object storage. Logging and monitoring alerts can record inference latency and token consumption and notify when thresholds are exceeded. These measures help keep evaluation and production environments stable and make cost changes easier to review.
6. Three Actionable Conclusions
- Build a private evaluation set first, covering open exploration, proof, and cross-disciplinary computation problems, and use blind review and decontamination to ensure credible results.
- Compare models using accuracy by difficulty and token cost per correct answer, and record measurement conditions so results are reproducible.
- Decide model selection with an empirical matrix for the same versions rather than inferring capability from version names, and continuously monitor latency and cost after launch.
