Math Reasoning Model Selection: Beyond Public Benchmarks with A/B Testing and Metrics

    Public leaderboard scores are not enough to choose a large language model (LLM) for math reasoning in production. This guide explains why ranking scores can be misleading and provides a practical framework for evaluation: a domain-relevant question set, clearly defined performance metrics, and a structured A/B testing process. It covers three quality dimensions—derivation chain quality, difficulty stratification, and output stability—alongside core latency and throughput metrics such as TTFT, end-to-end latency, and aggregate throughput. The article then walks through a step-by-step procedure for building your own evaluation set, fixing experimental conditions, selecting baselines, collecting per-request metrics, and setting thresholds for accuracy, latency, cost, and stability. Model routing strategies are also discussed as a cost-reduction option.

    Why Public Benchmark Scores Are Not Enough

    Public leaderboards provide a useful reference, but relying on them for model selection often leads to three types of mismatch.

    First, the test questions in public benchmarks may not reflect the distribution of your business problems. Benchmarks are typically composed of competition problems and elementary word problems, while your workload might consist of financial reconciliation formulas or engineering parameter calculations. Second, the prompting and evaluation setup differs. Some leaderboards allow multiple sampling attempts and take the best result, while others impose strict format requirements; comparing raw accuracy numbers across such settings is misleading. Third, the deployment environment varies. The same model can show significantly different latency and cost depending on the inference framework, quantization method, and hardware.

    A sound selection process therefore requires three components: a question set that mirrors your business, a set of performance metrics with clear definitions, and a decision procedure that combines both. The remainder of this article follows that sequence.

    Three Dimensions of Math Reasoning Quality

    1. Quality of the Derivation Chain

    Evaluating only the final answer can miss many problems. When assessing a model-generation derivation, check three aspects:

    • Step validity: Can each step be logically derived from the previous one? Are there unexplained leaps or reversed cause-and-effect?
    • Self-correction capability: If the model makes an error in an intermediate step, does it detect and fix the mistake later?
    • Chain length: Longer chains of thought are easier to interpret, but they increase generation time and cost. Length alone does not indicate better reasoning.

    On the same set of questions, different models may produce chains of very different lengths. A verbose chain could mean the model is mechanically applying a formula, that it has not fully understood the problem structure, or simply that its output style is verbose. You need to sample and read actual derivations before drawing conclusions; length by itself is not conclusive.

    Record the following fields for each sampled question. A sampling ratio of at least 10% is recommended.

    Check Item Criterion Field
    Final answer Matches the reference answer correct (0/1)
    Skipped step Conclusion reached without justification skip_step (0/1)
    Reversed logic Conclusion used to derive a premise reversed_logic (0/1)
    Self-correction Model detects and corrects its own error self_correct (0/1/NA)
    Chain length Number of output tokens cot_tokens

    2. Difficulty Levels and Question Coverage

    Math problems can be broadly grouped into three tiers:

    • Basic arithmetic: four operations and linear equations. Most modern models handle these without difficulty, so they rarely differentiate models.
    • Word problems and probability/statistics: the model must convert natural language into mathematical expressions, testing semantic understanding and modeling ability.
    • Open-ended problems: competition-style questions or unseen proofs. This tier best distinguishes model capability, as it demands combinatorial reasoning rather than pattern matching.

    If your evaluation set contains only the first two tiers, the results can be misleadingly optimistic. Cover each tier, and distribute questions across four branches: algebra, geometry, number theory, and combinatorics. A reasonable starting configuration is 50 questions per branch, with open-ended problems making up 20% to 30% of the set. Adjust the proportions to match your actual business mix.

    3. Stability and Robustness to Distractors

    Does the model produce consistent answers when the same question is solved multiple times? Does it remain correct when irrelevant conditions or misleading statements are added to the problem statement?

    Estimate stability through repeated sampling. For example, sample 5 times per question and compute the agreement rate of the majority-vote answer, or the fraction of questions where all 5 samples correctly match. Sampling parameters and the scoring rule must be documented in the report so results are reproducible. Record the following fields:

    • Model name, version, and inference parameters (temperature, top_p, maximum output length).
    • Number of samples, and the random seed if the serving backend supports it.
    • Scoring rule, such as the tolerance for numeric answers or the equivalence-check method for symbolic expressions.
    • How the agreement rate is computed and the sample count.

    Performance Metrics: Four Concepts to Disambiguate

    When optimizing time-to-first-token (TTFT) and throughput, the most common confusion is between aggregate throughput and per-request generation speed. Define and measure these four metrics separately.

    Metric Meaning Measurement Method
    Aggregate throughput (tokens/s) Total tokens generated by the service per unit time Sum of output tokens across all requests in a measurement window, divided by the window duration
    Per-request generation speed (tokens/s) Tokens generated per second during the generation phase of a single request Output token count divided by the request-generation duration
    Time to first token (TTFT) Time from request submission to receipt of the first token Client records time of request submission and arrival of first token
    End-to-end latency Time from request submission to receipt of the complete response Client records start and end times; report P50 and P95

    These four metrics are approximately related as follows:

    End-to-end latency ≈ TTFT + number of output tokens ÷ per-request generation speed

    This formula relies on two simplifying assumptions. First, it assumes the request has exclusive use of the generation process, ignoring queue delays from batching. Second, it ignores queuing and network overhead. Use it only for quick estimates. A formal selection process must directly stress-test end-to-end latency and evaluate the P50 and P95, not just the average.

    Aggregate throughput and per-request generation speed are not interchangeable. When a service uses batching to process multiple requests concurrently, aggregate throughput rises, but each request receives fewer generation resources, so per-request speed typically drops. Higher concurrency also tends to worsen tail latency. If your workload is offline batch problem-solving, focus on aggregate throughput and cost per unit. If your workload is interactive online serving, prioritize TTFT and P95 end-to-end latency, and maximize throughput only within those constraints.

    A/B Testing with Your Own Question Set

    Benchmark scores are only useful for an initial screen. The final selection should be based on an A/B test run on your own question set, following the process below.

    1. Build the Question Set

    • Source: Sample questions from real business logs, remove sensitive information, and keep the original wording.
    • Stratified sampling: Allocate questions across the three difficulty tiers and four branches described above so no single type dominates.
    • Reference answers: Have two or more domain experts independently annotate answers; disagreements are adjudicated by a third reviewer.
    • Version control: Assign a version number to the question set. Record the reason whenever a question is modified so results across time remain comparable.
    • Scale: Start with 200 to 500 questions, then expand once branch coverage is adequate.

    2. Fix Experimental Conditions

    For a valid A/B comparison, change only one variable at a time. The following items must be identical across all model groups:

    • Prompt template: Use the same template, including the system prompt, answer-format requirements, and few-shot examples.
    • Decoding parameters: Keep temperature, top_p, and maximum output length consistent.
    • Sampling count: Use the same number of samples per question, for example 5.
    • Scoring rule: Use the same automated scoring program. For numeric questions, set a relative error tolerance; for algebraic questions, use symbolic simplification to compare equivalence. Samples where the automatic grader is uncertain go to human review.

    3. Select Baselines

    The baseline typically includes the current online model and a stronger, more expensive model. These baselines provide lower- and upper-bound references for accuracy. If a candidate model approaches the stronger model’s accuracy while costing significantly less, it is a viable routing candidate.

    4. Collect Metrics

    For each request, record: question ID, model name, TTFT, end-to-end latency, output token count, whether the answer is correct, whether the request timed out, and any error code. When reporting, break down results by question tier rather than reporting only overall means.

    5. Define Decision Thresholds in Advance

    Agree on thresholds before running the evaluation, and do not adjust them after seeing the results. The following is a starting template; adjust the specific numbers to match your business risk tolerance:

    • Accuracy: The candidate model’s accuracy on open-ended questions is no lower than 95% of the baseline, or the difference is not statistically significant. Significance can be assessed with a paired McNemar test or bootstrap confidence intervals.
    • Latency: For online scenarios, P95 end-to-end latency stays under the business-acceptable limit.
    • Cost: Average cost per question is below the baseline, and the savings are enough to cover migration and maintenance overhead.
    • Stability: The multi-sample agreement rate is not lower than the baseline minus an agreed tolerance.

    6. Design Routing Rules

    If different question types are best served by different models, routing can reduce cost. Three common patterns:

    • By question type: Send basic arithmetic and simple word problems to a lower-cost model; send open-ended problems to a higher-capability model.
    • By confidence escalation: Let the lower-cost model answer first. If the system detects an incomplete chain, an output-format anomaly, or inconsistent results across samples, escalate to the higher-capability model.
    • By latency budget: For online requests that exceed a configured TTFT threshold, fall back to a standby instance.

    Routing rules themselves need evaluation. A question-type classifier that misroutes a difficult problem to a lower-capability model will degrade accuracy, so measure classification accuracy separately.

    7. Phased Rollout

    Do not switch to full traffic immediately after the test passes. Roll out gradually, for example starting at 5% of traffic, then 20%, and finally expanding to full coverage while monitoring the same metrics used in the A/B test.