Evaluating and Selecting LLMs for Mathematical Reasoning: A Practical Guide
This article explains why ranking large language models on open-ended math problems is difficult and how to turn subjective impressions into reproducible engineering decisions. It covers task layering from standard computation to open-ended modeling, a four-dimension metric system that goes beyond final answers, the role of chain-of-thought length, a five-step reproducible evaluation workflow, and cost and integration considerations such as asynchronous queues and monitoring. It also lists common pitfalls and concludes with a layered, metric-driven, reproducible selection approach.
1. Why “Which Model Is Stronger” Is Hard to Answer
In engineering practice, teams often need to answer a seemingly simple question: which class of model capability should we choose for open-ended math problems? The core observation is that models do not perform at the same level on math tasks, and rankings drift as the task type changes. Some people feel a certain model sits “between two versions,” while others believe only a few models can genuinely handle open-ended math, with the rest trading off between concise reasoning and human-like writing.
Such subjective rankings are not worthless, but they lack reproducibility. To turn them into engineering-ready conclusions, you first need to break “math capability” into measurable dimensions.
2. Task Layering: What Makes Open-Ended Math Hard
Open-ended math problems differ from standard question banks in three main ways:
- Incomplete problem statements: conditions are implicit and assumptions must be filled in;
- Multiple solution paths: several valid reasoning chains exist and must be compared and traded off;
- High verification cost: correctness cannot be judged by pattern matching alone.
The evaluation set should therefore be layered:
- L1: standard computation and symbolic transformation (auto-gradable);
- L2: multi-step proofs and derivations (requires process evaluation);
- L3: open-ended modeling and problem formulation (requires human or strong-model review).
Only after layering does a claim like “model X is stronger” have a clear boundary.
3. Metrics: Do Not Look Only at the Final Answer
A four-dimension metric set is recommended:
- Accuracy: whether the final answer holds;
- Step efficiency: the proportion of valid reasoning steps among all steps;
- Chain-of-thought complexity: reasoning length and number of branches; excessive length often signals insufficient search efficiency;
- Readability: whether the conclusion is clearly stated and easy for a human to review.
An illustrative evaluation logic can be expressed as:
def evaluate(sample, model_output):correct = judge_answer(sample.gold, model_output.final)valid_steps = count_valid(model_output.reasoning)total_steps = len(model_output.reasoning)return {"accuracy": correct,"step_efficiency": valid_steps / max(total_steps, 1),"reasoning_length": total_steps,"readability": human_score(model_output.summary),}
Here judge_answer and human_score are implemented by the evaluation framework itself and do not involve any specific platform API.
4. Why Chain of Thought Is the Key Variable
The original discussion noted clear differences in chain-of-thought length across models: some are concise, others extremely long and complex. Engineering-wise, shorter is not always better, and longer is not always stronger:
- Too short may mean skipped steps that hide unverified assumptions;
- Too long may mean an exploding search space, bringing higher latency and cost;
- The ideal state is “all necessary steps complete, with no redundant branches.”
It is therefore advisable to introduce a “cost per unit of accuracy” metric that normalizes reasoning length, number of calls, and resource consumption, so you are not misled by a single demo.
5. A Reproducible Evaluation Workflow
A practical closed loop has five steps:
- Build a private evaluation set: sample from real business problems, covering L1–L3;
- Fix inference parameters: keep temperature, max output length, and retry policy consistent;
- Sample multiple times and take the distribution: single runs are highly variable, so at least three runs are recommended;
- Dual-track review: auto-grading plus sampled human review;
- Regression comparison: rerun the baseline after any change to model capability or prompting strategy.
Illustrative flow:
sample problems -> unified inference config -> multiple generations -> auto-grading-> human spot check -> metric aggregation -> version comparison -> selection conclusion
6. Cost and Engineering Integration Considerations
Math reasoning tasks usually come with long outputs, so engineering planning must happen early:
- Use message queues to smooth peaks and avoid long tasks blocking the online path;
- Put long reasoning tasks in an asynchronous task queue, with the frontend polling or receiving callbacks;
- Use logging services and monitoring alerts to track timeout rate, retry rate, and cost per task;
- Route high-frequency simple problems to smaller-parameter or cached paths, and escalate complex problems to stronger reasoning capability;
- Set resource limits on the container platform to prevent individual long tasks from dragging down overall throughput.
This layered scheduling controls cost while preserving quality, instead of applying the strongest capability across the board.
7. Common Pitfalls
- Replacing business evaluation with a single leaderboard: leaderboard task distributions do not match the business;
- Looking only at the final answer: ignoring process validity leads to unmaintainable results;
- Ignoring prompt and tool effects: the same model can differ significantly under different prompting strategies;
- Treating chain-of-thought length as proof of capability: length does not positively correlate with accuracy;
- Lacking a regression baseline: you cannot tell whether an upgrade is an improvement or a regression.
8. Conclusion
Evaluating open-ended math capability should shift from “brand-style comparison” to “task layering + multi-dimension metrics + reproducible workflow.” If a team builds a private evaluation set, unifies inference configuration, introduces process and cost metrics, and pairs them with an engineering architecture of asynchronization and monitoring alerts, it can obtain stable, comparable, and regression-ready selection conclusions. In related engineering practice, Baidu AI Cloud typically supports such long-reasoning workloads by combining general capability categories such as container platforms, message queues, logging services, and monitoring alerts.
