Evaluating LLM Math Reasoning and Long-Form Writing: A Reproducible Method for Model Selection and Routing

    This article describes a reproducible method for evaluating large language models on math reasoning and long-form text generation. It covers how to standardize metrics such as latency, output speed, token usage, cost, and accuracy, how to design math proof tests and long-document evaluations, and how to turn the results into model selection and routing decisions.

    Public leaderboard scores show how a model performs on a shared question set, but they rarely answer the questions that matter for a specific business: Which model can complete a task quickly and reliably, and at a cost you can control? This article presents a reproducible evaluation method and explains how to turn the results into decisions about model selection and routing.

    1. Standardize Your Measurement Definitions First

    Before comparing models, agree on which data to record. The table below lists the minimum set of metrics.

    Metric Definition Measurement Method Recording Requirements
    First-token latency Time from sending a request to receiving the first output character Run the same batch of requests and report the median and P95 Record concurrency and network environment
    Output speed Output tokens generated per second Divide the number of output tokens by generation time Record input and output lengths
    Tokens per task Total input, output, and reasoning tokens Read the usage fields returned by the API State whether deep reasoning is enabled
    Cost per task Token consumption multiplied by the unit price Calculate according to the provider’s billing rules Record the price version and date
    Accuracy Share of correct answers under the scoring rules Have two reviewers grade manually and calculate their agreement Publish the sample size and labeling rules

    The speed of a model can vary widely with concurrency. For that reason, any claim that a model is “X times faster” must include the hardware, concurrency, input and output lengths, and test date. Without these details, nobody can reproduce the result. Cost also depends on more than the unit price. For the same volume of requests, unit cost depends on the unit price, the actual number of tokens used, and throughput under concurrency.

    2. Designing Math Proof Tasks

    A useful math proof test meets three conditions. First, the propositions come from an open knowledge base, and that knowledge base has no existing proof. This prevents the model from completing the task by retrieving or copying a known answer. Second, the prompt is fixed, and it asks for output as an English LaTeX lecture note with a consistent format. Third, the scoring rules are defined before testing begins.

    The recommended scoring rubric gives each item 0 to 2 points.

    • Logical closure: Can each step be derived from the premises?
    • Step completeness: Are any steps skipped, and are the key lemmas stated?
    • Definitional consistency: Are symbols and concepts used consistently throughout the document?
    • Format usability: Does the LaTeX document compile without errors?
    • Conclusion alignment: Does the proof’s conclusion match the original proposition?

    A LaTeX document that compiles and has no skipped steps only shows that the document is well formed. Whether the proof itself is correct still requires review by someone with relevant background. Store each review result together with the model version, prompt, and output. For deep reasoning tasks, measure token consumption as an average and a range across many tasks. Do not estimate quota usage from a single run.

    3. Evaluation Dimensions for Long-Form Lecture Generation

    The main difficulty in long-form tasks is consistency across the whole document, not just reaching a target word count. The evaluation can focus on the following areas.

    • Structural completeness: Do the chapters match the given outline? Are any chapters missing or repeated?
    • Factual consistency: Do definitions, symbols, and conclusions contradict each other anywhere in the document?
    • Cross-section consistency: Do later sections respect the assumptions set earlier?
    • Citation verification: Do the cited references exist, and can you find the original sources?
    • Latency and cost: What is the total time and token consumption for generating the full document?

    One practical approach is to test two methods with the same outline: generating the whole document in one pass, and generating it chapter by chapter and then merging the chapters. Compare the number and types of consistency problems each method produces. This comparison tells you more than comparing document length alone.

    4. Chain-of-Thought Length Does Not Directly Indicate Reasoning Quality

    Some models produce short chains of thought, while others produce very long ones. Length can be useful as an observation, but it is not a direct measure of quality. A more reliable approach is to:

    • Compare accuracy at the same token budget.
    • Record the step where the first error appears.
    • Observe where the reasoning starts to drift when the chain of thought becomes very long.

    Open math problems have no standard answers, so evaluation needs criteria agreed in advance, such as novelty, verifiability, and completeness of derivation. An expert panel can score outputs against these criteria. Keep the failed cases too. A few impressive outputs do not represent a model’s overall capability.

    5. Task Tiers and Model Routing

    The core of a routing layer is assigning different goals to different tasks. The table below shows one common way to tier tasks. Your team should set the actual values based on its own service level agreements.

    Task Type Primary Goal Timeout Failure Strategy Budget Constraint
    Brainstorming and rewriting Low latency, high concurrency Short Retry once, then switch to a backup model Set a cap per request
    Long-form summaries and lecture drafts Stability with long context Medium Generate in segments, then merge Set a budget per document
    Code generation Correctness and testability Medium Retry with the error message attached Set a budget per project
    Deep math and logical reasoning Correctness Long Send to a manual review queue Cap per problem, with approval required for overages

    After launch, keep monitoring success rate, latency percentiles, cost per task, and the rate at which human reviewers reject outputs. Record the sample size, labeling rules, and version number for each golden test set. If a new model version falls below the accuracy threshold set in advance, pause the switch and return to manual evaluation.

    For infrastructure, you can choose public cloud, private deployment, or a hybrid setup. The decision depends on service level commitments, pricing transparency, data compliance requirements, rate limiting policies, and migration cost. Treat vendor marketing claims as a starting point only, and verify them with your own test set.

    6. Risks and Limits

    • Human review is required for model outputs, especially proof steps, cited references, and data-based conclusions.
    • Do not rely directly on model conclusions for high-risk decisions in areas such as medicine, law, or finance.
    • Before you send customer data or internal documents to a third-party API, confirm the provider’s data retention and training policies.
    • Build the routing layer so models can be swapped out, which avoids dependence on a single vendor.

    7. Three Actionable Conclusions

    1. Base model selection on measured results from your own test set. Use public benchmark scores only for initial screening.
    2. Start cost control with token budgets and task tiers, and set separate caps for deep reasoning tasks.
    3. Manually review every conclusion about correctness, and keep records so you can trace results later.