Evaluating LLM Reasoning and Math Capabilities: A Practical Methodology

    Choosing a large language model often starts with one deceptively simple question: which model is actually stronger? Casual impressions and one-off test cases produce opinions that are neither reproducible nor comparable. This article lays out a rigorous, product-agnostic methodology for evaluating LLMs, with a focus on math and reasoning as the hardest-to-fake dimensions. It covers building a multi-dimensional evaluation framework, judging open-ended reasoning by both answer and process, weighing chain-of-thought quality against cost and latency, understanding inference throughput and deployment tradeoffs, and turning evaluation results into defensible technical decisions. Readers will learn how to move from "it feels strong" to "I can prove how strong it is, in which scenarios, and at what cost."

    Introduction: Why “Which Model Is Stronger” Is So Hard to Answer

    When evaluating or researching models, “is this model actually good?” is almost the most frequently asked question, and also the one most likely to get a one-sided answer. Many conclusions come from scattered chat experiences, performance on a few individual problems, or even a single comment in a community. The problem with this “gut-feel evaluation” is that it is neither reproducible nor comparable: different people use different questions, apply different judging criteria, and vary context lengths, so the conclusions naturally contradict each other.

    The rigorous approach is to break “evaluating a model” into an engineering process that is well-defined, reproducible, and comparable. This article focuses on math and reasoning, the dimensions that most severely test a model, and lays out a methodology that combines evaluation with deployment.

    1. Building a Multi-Dimensional Evaluation Framework

    Comparing along a single dimension is almost meaningless. A usable evaluation framework should cover at least the following layers:

    • Layered capability dimensions: Break evaluation into independent categories with different emphases, such as knowledge Q&A, instruction following, logical reasoning, math calculation, code generation, and long-context understanding. Math and reasoning often reveal the widest gaps, because their answers are hard to simply “memorize.”
    • Layered difficulty: Within the same capability, further divide into three tiers: basic, advanced, and open-ended hard problems. Basic problems are used for regression testing, while open-ended hard problems distinguish the true upper limit of leading models.
    • Test set design: Sources of questions should be diverse, covering different question types and phrasing, with a portion of “held-out questions” reserved to prevent overfitting. The test set itself needs regular updates to avoid contamination by training data.
    • Scoring mechanism: Objective questions are judged automatically against standard answers; subjective questions (such as writing or argumentation) introduce human or cross-model review, with clear scoring rubrics.

    The example code below shows a minimal viable evaluation skeleton. The key is fixed inputs, recorded outputs, and repeatable calls:

    1. # Example: a skeleton for a reproducible evaluation pipeline (not tied to any specific product API)
    2. def run_eval(model_client, dataset, judge):
    3. results = []
    4. for case in dataset: # dataset: each item holds input, reference answer, difficulty label
    5. output = model_client.generate(
    6. prompt=case["prompt"],
    7. temperature=0, # fix randomness during evaluation to guarantee reproducibility
    8. max_tokens=case.get("max_tokens", 2048),
    9. )
    10. score = judge(case, output) # automatic judgment for objective items / scoring for subjective items
    11. results.append({"id": case["id"], "score": score, "raw": output})
    12. return aggregate(results) # aggregate by capability dimension and difficulty tier

    The point is this: temperature=0, a fixed random seed, and recording the complete raw output. These seemingly trivial details determine whether an evaluation can be reproduced by others.

    2. Math and Open-Ended Reasoning: The Hard Metric That Best Reveals the Ceiling

    For math and reasoning, you need to distinguish two kinds of problems:

    1. Closed-form calculation problems: These have a single determinate answer, are suitable for automated scoring, and form the backbone of regression testing.
    2. Open-ended math problems: These have no ready-made solution and require the model to construct its own reasoning path. Such problems are still the “watershed” for leading models today: most models can handle routine questions, but when faced with open problems that require multi-step construction, transformation, and verification, capability shows a clear fault line.

    When evaluating open-ended reasoning, you cannot look only at whether the final answer is correct; you must also examine whether the process holds up. A practical approach is to use a dual criterion of “answer + process”:

    • Answer correctness: Whether the final answer is accurate.
    • Process validity: Whether the reasoning steps contain problems such as skipped steps, circular argument, or inappropriate assumptions.

    A practical technique is to sample the same problem multiple times (for example, 5 to 10 times) and measure the pass rate and answer consistency. Pass rate reflects the capability ceiling, while consistency reflects stability. In real business settings, a model that occasionally gets it right but is highly unstable is often less useful than a medium-level but reliable model.

    3. Chain-of-Thought Quality: The Tradeoff Between Concise and Complex

    Models differ greatly in style when unfolding their reasoning: some chain-of-thought is extremely concise and goes straight to the conclusion; others lay out many intermediate steps, producing lengthy and complex processes. Each style has its costs, so evaluation should look not only at “is it correct?” but also at “is it worth it?”:

    • Concise chain-of-thought: Low token consumption and low latency, but on open-ended hard problems it may “think too fast” and skip key steps.
    • Verbose chain-of-thought: More fault-tolerant on difficult problems, but it brings a significant rise in cost and latency, and is over-thinking on simple problems.

    Therefore, evaluation metrics should extend to an efficiency dimension: tokens consumed per unit of accuracy, average reasoning time, and the shortest reasoning length needed to reach a target accuracy. In engineering, ratios such as “accuracy / average token consumption” are commonly used to holistically measure cost-effectiveness, and this is closer to production environments than accuracy alone.

    4. From Evaluation to Deployment: The Engineering View of Inference Throughput

    Evaluation answers “can it do it?”, while deployment answers “is it worth it?”. Once a model’s capability meets the bar, the real challenge shifts to how to run it at an acceptable cost. A few key concepts matter here:

    • Throughput: The total number of tokens the system can produce per unit of time; it determines how much concurrency the service can support.
    • Latency: The time for a single request from dispatch to the first token (TTFT) and to the complete response; it directly affects user experience.
    • Cost structure: For self-hosting, cost is mainly compute and operations; for calling a cloud API, cost is mainly billed per token.

    Self-hosted deployment vs. cloud API calls is an unavoidable selection question:

    Dimension Self-hosted Cloud API
    Upfront cost High (hardware, ops) Low
    Elasticity Poor (slow to scale) Good
    Unit cost Possibly lower once amortized at large scale Grows linearly with usage
    Data control High Depends on the compliance approach
    Best fit High-frequency, stable, data-sensitive Volatile, quick validation

    For high-frequency, stable-load scenarios, a self-hosted inference cluster can often push marginal cost very low. This is precisely the core reason many enterprises turn to self-hosting after confirming a model’s capability through evaluation.

    Common engineering techniques to improve inference throughput (general industry practices):

    • Batching: Combining multiple requests into a single computation significantly improves GPU utilization. Continuous batching can further increase throughput.
    • Quantization: Representing weights and activations with lower precision reduces memory footprint and boosts throughput, at the cost of possible precision loss, so its impact must be validated on the evaluation set.
    • KV Cache management: Properly managing the memory of the attention cache is key under long context and high concurrency.
    • Tensor/pipeline parallelism: Splitting a large model across multiple GPUs and machines, combined with high-speed interconnects, so that even a single request can “run fast.”
    • Scheduling and rate limiting: Combined with monitoring, alerting, and logging services, dynamically scaling up and down to avoid cascading failures at peak load.

    The example code below expresses the basic idea of throughput measurement. Be sure to measure under real concurrency, not serial single requests:

    1. # Example: concurrent throughput stress-test approach (pseudocode)
    2. import time
    3. def measure_throughput(client, prompts, concurrency):
    4. total_tokens = 0
    5. start = time.time()
    6. # Fire requests simultaneously at a fixed concurrency level to simulate real load
    7. responses = run_concurrent(
    8. task=lambda p: client.generate(prompt=p, max_tokens=512),
    9. items=prompts,
    10. concurrency=concurrency,
    11. )
    12. elapsed = time.time() - start
    13. total_tokens = sum(count_tokens(r) for r in responses)
    14. return {
    15. "throughput_tps": total_tokens / elapsed, # output tokens per second
    16. "avg_latency": avg(r.latency for r in responses),
    17. }

    One point needs emphasis: any throughput number is strongly tied to the hardware model, batch size, sequence length, and precision settings. Citing some “X tps on a single GPU” figure out of a specific configuration has no comparable meaning. The correct approach is to measure under your own target configuration and load profile.

    5. Making Evaluation Results Truly Guide Decisions

    The endpoint of evaluation is not a leaderboard, but a conclusion that can support decisions. It is best to reduce the results to three questions:

    1. Is capability sufficient: On the core question types of the target business, do the pass rate and stability meet the lower-bound requirements?
    2. Is cost acceptable: Combined with measured throughput and usage forecasts, estimate the per-request cost and total cost of ownership.
    3. Are risks controllable: Including output stability, data compliance, vendor lock-in, and future portability.

    A pragmatic principle is: use leaderboards for initial screening, and use your own data for the final judgment. Public leaderboards can only help you narrow the candidate pool; in the end, you must re-test with a private evaluation set that is close to real business, and stress-test performance and cost under the target deployment form.

    Conclusion

    Evaluating a large language model is essentially about turning “it feels strong” into “I can prove how strong it is, in which scenarios, and at what cost, and how reliably.” By building a closed loop around layered capabilities, tiered difficulty, chain-of-thought efficiency, throughput cost, and business fit, you can make technical choices you won’t regret in a fast-iterating model ecosystem. This methodology is independent of any specific product and applies to any engineering practice that requires adopting or replacing a large language model.