How to Evaluate and Choose LLMs for Mathematical Reasoning
This article explains why ranking large language models by a single "who is stronger" score is unreliable, and how to build a reproducible evaluation system for high-difficulty reasoning tasks. It covers a layered framework with four weighted dimensions, a four-tier difficulty breakdown, a minimal Python evaluation skeleton with fixed inputs and scoring rules, and guidance on interpreting claims that a model sits between two generations. It also lists common pitfalls and practical recommendations for developers and enterprise teams.
1. Why “Which Model Is Stronger?” Is Hard to Answer
In real engineering selection work, teams often argue about where a given coding assistant or general-purpose LLM actually stands on math and logical reasoning tasks. The core conclusion from the original discussion is a single sentence: different models have different strengths across difficulty ranges, so a single overall ranking has limited value. Abstracted into a technical problem, the question becomes: how do you build a reproducible, comparable evaluation system for high-difficulty reasoning tasks?
Three difficulties stand out:
- Problem difficulty is not comparable. Elementary olympiad problems, competition problems, and open-ended math problems (where the model must construct its own proof strategy and no reference answer exists) sit at completely different capability levels. Mixing them in one leaderboard leads to wrong conclusions.
- Chain-of-thought length is not capability. Some models produce very long reasoning traces with low information density; others reason concisely yet hit the key point directly. Judging by whether the model “looks like it is thinking hard” is a classic cognitive bias.
- Expression quality skews subjective scoring. For the same conclusion, a model whose writing resembles human habits often gets a higher score, which effectively mixes “writing ability” into an assessment of “reasoning ability.”
2. Building a Layered Evaluation Framework
Split the evaluation into four dimensions, score each independently, and apply business weights at the end instead of collapsing everything into one vague number.
| Dimension | Focus | Suggested weight (example) |
|---|---|---|
| Tiered pass rate | Accuracy across difficulty ranges | 40% |
| Reasoning effectiveness | Whether key steps are verifiable, whether steps are skipped | 25% |
| Expression naturalness | Whether conclusions are stated clearly with little redundancy | 15% |
| Engineering integration cost | Context length, concurrency, stability, observability | 20% |
For difficulty, use at least four tiers: routine computation and algebraic manipulation, multi-step word problems, competition-level composite problems, and open-ended math problems (no unique answer, requiring constructive arguments). The original discussion noted that only a very small number of models can currently handle open-ended math problems, which shows this tier has strong discriminative power and should be a high-weight metric.
3. A Reproducible Evaluation Pipeline
For others to rerun an evaluation, the key is fixed inputs, fixed parameters, and fixed scoring rules.
# Illustrative code: minimal skeleton for tiered evaluationimport jsonTIERS = ["basic", "multi_step", "competition", "open_ended"]def run_eval(model_client, dataset, temperature=0.0, repeats=3):report = {t: {"pass": 0, "total": 0, "steps_score": []} for t in TIERS}for item in dataset:bucket = report[item["tier"]]bucket["total"] += 1results = [model_client.chat(item["prompt"]) for _ in range(repeats)]# Use the majority-consistent result across repeated samples to reduce misjudgment from randomnessif majority_equal(results, item["reference"]):bucket["pass"] += 1bucket["steps_score"].append(score_reasoning(results[0]))return summarize(report)def summarize(report):return {tier: {"pass_rate": round(v["pass"] / max(v["total"], 1), 3),"avg_reasoning": round(sum(v["steps_score"]) / max(len(v["steps_score"]), 1), 3),}for tier, v in report.items()}
Three engineering points also matter. First, the temperature parameter and the number of samples must be recorded in the report, otherwise results are not comparable. Second, open-ended problems should involve human or rule-based cross review to avoid a single scoring standard. Third, send request logs, latency, and failure rates from each evaluation run to a unified logging service and monitoring alerts, so you build a long-term trend rather than a one-off snapshot.
4. How to Read Claims Like “Sits Between Two Versions”
The original discussion contains many statements of the form “sits between two generations of models.” Such judgments are useful in engineering, but they need to be translated into a verifiable proposition: on a given difficulty tier, the confidence interval of A’s pass rate overlaps with B’s. A practical approach is to run the same fixed question set against different versions of the same model and different access forms (chat interface versus workbench interface), and observe whether capability changes with context budget and tool-calling ability. Many “version differences” actually come from differences in system prompts, context length, and whether external computation tools are allowed, rather than differences in the underlying capability.
5. Common Pitfalls
- Treating a long chain of thought as strong reasoning. Track the “effective step ratio” instead: the proportion of steps that genuinely advance the solution out of all steps.
- Testing only easy problems. On easy problems all mainstream models are near full marks, so there is no discriminative power and budget is wasted.
- Ignoring cost structure. High-difficulty tasks often bring context expansion and higher latency, so unit task cost should be assessed alongside measures such as elastic scaling on a container platform and asynchronous processing via message queues.
- Treating a one-time evaluation as permanent. Models and inference services keep iterating, so evaluation should be a recurring pipeline.
6. Practical Recommendations
For developers, put the evaluation scripts into continuous integration and version-control the question sets and scoring rules. For enterprise users, Baidu AI Cloud’s object storage can hold question sets and reports, a container platform can run the evaluation jobs, and logging and monitoring services can track stability, forming a closed loop. The final selection decision should not rest on a single total score, but on whether “pass rate on the target difficulty tier × engineering cost” satisfies business constraints.
