Evaluating LLMs for Math Reasoning and Engineering Execution: A Practical Approach
This article presents a practical framework for evaluating general-purpose large language models on two kinds of work: mathematical reasoning and engineering execution. It explains why single impressive outputs and one-off speed tests are unreliable, and it describes a layered task suite, a scoring scheme that separates correctness, latency, cost and verifiability, a reproducible evaluation workflow, scenario-based model selection, and governance practices for production use. Readers will learn how to structure their own evaluations and match models to tasks.
1. Problem Background: Why Single-Point Experience Is Not Enough
Evaluating a general-purpose large language model should go beyond vague impressions of whether it is “easy to use.” Mathematical reasoning and engineering execution are two very different capabilities. Mathematical reasoning requires long chains of logical steps, accurate understanding of propositions, proof construction, and clear written expression. Engineering execution requires instruction following, tool calling, fast iteration, detectable errors, and controllable cost per unit of work.
Public discussions often show two common biases. One is judging a model’s overall ability from a single impressive example. The other is replacing throughput and cost analysis with a single experience of speed. A more sound approach is to build a layered task set and a unified scoring system, and to measure capability, speed, cost, and verifiability separately.
This matters most when models are used for tasks such as completing mathematical proofs, generating technical lecture notes, batch code repair, and log analysis. For these tasks, the quality of a single response and the efficiency of batch execution are often equally important. One model may perform well on complex proofs but have a high unit cost in high-concurrency batch jobs. Another model may be very fast on routine tasks but struggle with open-ended mathematical problems. Evaluation should therefore be organized around scenarios rather than a single overall ranking.
2. A Multi-Dimensional Evaluation Framework
2.1 Mathematical Reasoning and Proof Generation
Evaluation of mathematical ability should distinguish between “proof completion” and “open-problem research.” Proof completion means that, given a proposition from a mathematical literature collection whose proof is not provided, the model must construct a proof independently and output well-structured lecture notes in standard mathematical typesetting. Open-problem research involves unknown conclusions, counterexample construction, and exploration of proof strategies. It requires a much higher level of capability. Most models can complete well-defined proofs reasonably well, but that result does not justify concluding that they can do open-problem research.
When evaluating mathematical output, check at least five aspects: correctness of the conclusion, completeness of the steps, consistency of dependencies and references, checking of boundary conditions, and readability of the expression. Also assess whether the chain of thought is concise and auditable. A longer chain of thought does not mean stronger ability, and writing that sounds more human does not make a proof more rigorous. A more reliable approach is to ask the model for a counterexample search, explanations of key lemmas, and a self-check list, then have rule-based checks or expert spot checks review the output. For a proposition without a provided proof, the key question is not whether the model repeats existing material. The key question is whether it can independently build a verifiable proof chain.
2.2 Brainstorming and Solution Exploration
Creative divergence tasks differ from mathematical proofs. The focus is not on a single correct answer but on diversity, feasibility, constraint satisfaction, and deduplication quality. Teams should fix the topic, constraints, output format, and scoring rules in advance, and avoid counting only the number of ideas. One model may generate many solutions, most of which cannot be implemented. Another may produce fewer ideas that better fit engineering constraints.
In complex workflows, combining different models through an external orchestration or routing layer may improve the brainstorming experience. However, it also adds consistency risks and operational complexity. When evaluating such setups, record how the routing strategy affects final quality, latency, and cost. Do not compare only the raw outputs of single models.
2.3 Engineering Execution: Speed, Stability, and Verifiability
Engineering execution covers tasks such as code repair, configuration generation, log analysis, format conversion, and test case completion. Evaluation should not rely only on how “intelligent” a model appears. It should also include time to first response, time to completion, throughput, failure and retry rate, output stability, and verifiability. When models have similar intelligence, a throughput difference of several times can significantly change the right choice for batch work. A fast channel suits large-volume, low-risk tasks that can be checked automatically. A deep-reasoning channel suits complex architecture design and difficult defect diagnosis, where slower responses are acceptable in exchange for higher correctness.
Engineering output must be verifiable. Code should pass test cases, configurations should pass validation, and log conclusions should trace back to the original evidence. An output that merely “looks correct” without a verification loop should not be used as the basis for release.
2.4 Cost and Throughput: From Single Calls to Deployment Economics
The cost of a single call includes more than input and output billing. It also includes retries, manual rework, the cost of verification tools, and operational overhead. Subscription quota usage, batch discounts, and cache hit rates all affect real costs. For deployment, high-throughput inference hardware can spread out the unit cost per call. However, total cost of ownership must be calculated from actual benchmark tests, not taken directly from marketing figures.
For self-hosted deployments or externally offered inference services, the benefits do not come only from differences in official list prices. They also come from throughput utilization, batching efficiency, monitoring and alerting, logging services, and elastic scheduling. Teams should track a “cost per task” metric instead of looking only at price per million tokens.
3. A Reproducible Evaluation Method
Start with a small layered task set and expand it gradually. The task set can include proof completion, open-problem attempts, mathematical lecture writing, code repair, configuration generation, log analysis, and creative solution brainstorming. All candidate models should use the same prompts, the same context, and the same scoring rules.
Illustrative configuration:
eval_suite: math_engineering_v1tasks:- id: proof_fill_001type: proofconstraints: "Construct the proof independently and provide key lemmas and boundary conditions"- id: code_repair_001type: engineeringconstraints: "Pass the given test cases without modifying the tests"metrics:- correctness- verifiability- latency_p50- latency_p95- throughput- cost_per_task- human_rework
Scoring pseudocode:
for model in candidates:for task in suite:run with fixed context and temperaturescore correctness and verifiabilityrecord latency and costaggregate by scenariocompare with confidence interval
Keep records of failed cases and manual review notes, and run version regression tests on a regular schedule. Mathematical output needs formal checks or expert spot checks. Engineering output needs automated testing. Only when quality, speed, and cost are all included in the scorecard can model selection be reproduced.
4. Scenario-Based Selection Recommendations
| Scenario | Primary Metric | Secondary Metric | Recommendation |
|---|---|---|---|
| Mathematical proofs and lecture generation | Correctness, verifiability | Readability, latency | Use the deep-reasoning channel, and require self-checks and manual spot checks |
| Batch engineering execution | Throughput, p95 latency | Cost, failure and retry rate | Prioritize the fast channel, combined with automated testing |
| Creative brainstorming | Diversity, feasibility | Constraint satisfaction | Use multi-model routing, with manual screening |
| High-throughput inference services | Cost per task | Stability, monitoring capability | Calculate total cost of ownership based on actual benchmarks |
No single model is the best choice for every scenario. A better strategy is task routing. Send high-throughput, low-risk tasks to the fast channel, and send difficult reasoning and open-ended problems to the deep-reasoning channel. Route all outputs through a unified verification and monitoring process. This approach uses the speed advantages of fast models while keeping the capability for complex reasoning.
5. Release and Governance
After release, continuously monitor quality, latency, cost, and failure rates, and set up canary releases and rollback mechanisms. Mathematical outputs should have review records, engineering outputs should have test evidence, and creative outputs should go through deduplication and compliance checks. Logging and monitoring alerts should cover the call chain, abnormal retries, and cost anomalies. Reproducible benchmarks and scenario-based routing help teams reduce subjective bias. They also let teams shift from asking “Which model is stronger?” to asking “Which combination of capabilities is more stable, economical, and verifiable for each type of task?”
