How to Scientifically Evaluate LLM Reasoning and Execution Capabilities: A Framework for Quality, Speed, and Cost

    Choosing or comparing large language models (LLMs) shouldn't rely on a few casual conversations or marketing pages. This article lays out a reproducible evaluation framework built on three linked dimensions—answer quality, execution efficiency, and usage cost. It explains why intuition and public leaderboards fall short, how to build a layered task set (L1 basic, L2 advanced, L3 high-difficulty), and how to use customized mathematical proofs and "lecture note" outputs as a stress test for reasoning depth. It also covers latency and throughput metrics such as time-to-first-token and decode tokens/sec (with sample benchmark code), cost modeling under both pay-per-use billing and quota/subscription plans, and practical cost-optimization and model-routing strategies. The goal is to help you find the best balance of speed, quality, and cost for your specific workload.

    1. Why You Shouldn’t Evaluate an LLM “by Feeling”

    When discussing how to scientifically evaluate the reasoning and execution capabilities of LLMs, the first thing to avoid is drawing conclusions from a handful of conversations. Evaluation methods matter because intuition is easily distorted by three factors:

    • Single runs are random. Running the same prompt multiple times can produce noticeably different outputs. One or two rounds of conversation aren’t enough to reflect true capability.
    • Prompt quality varies widely. For the same model, a well-structured prompt can clearly improve output quality, so prompt versions must be kept consistent when comparing models.
    • Public leaderboards are disconnected from real scenarios. Leaderboard questions have a fixed distribution and are easily covered by training data, making them poor at reflecting long-tail problems in actual business.

    As a result, model selection should break “is this model good?” into measurable questions: Are the answers correct? Is execution fast enough? Is the cost acceptable? Does it fit the specific scenario? For questions like “how do I choose an LLM, what to watch for in evaluation, and what mistakes are common,” the answers usually aren’t on a marketing page—they’re in a reproducible, self-built evaluation.

    2. Evaluation Framework: Quality, Efficiency, and Cost Working Together

    Dimension Core question Key metrics Measurement method
    Answer quality Is the output correct, complete, and rigorous? Task pass rate, human score Automated grading + human review
    Execution efficiency How long does a task take, and how long does the user wait? Time-to-first-token, time per token, total latency, concurrent throughput Unified load-testing script
    Usage cost How many resources does one task consume? Input, output, and reasoning token usage; cost per task or quota share Pay-per-use accounting or quota deduction

    The three dimensions must be analyzed together:

    • When quality is close but one is faster, prefer the faster one for everyday tasks;
    • When speed is close but quality differs clearly, quality is the bottleneck;
    • When a model leads on both quality and speed but costs significantly more, weigh task value, call volume, and quota consumption together.

    3. Step One: Build a Layered Evaluation Task Set

    The evaluation set should cover a full gradient from “good enough” to “hard.” It’s recommended to split it into three tiers. The suggested question counts below are rules of thumb; the actual volume can be adjusted based on team resources:

    Tier Task types Suggested count (rule of thumb) Scoring method Emphasis
    L1 Basic Summarization, rewriting, information extraction, format conversion 30–50 Rule matching, spot-check review Instruction following, format stability
    L2 Advanced Code generation and repair, logic puzzles, multi-constraint planning 20–30 Unit tests, reference answers Execution capability and correctness
    L3 High-difficulty Mathematical proofs, open-ended research, long-chain solutions 5–10 Expert human scoring Reasoning depth and rigor

    Key design points:

    1. Freeze the evaluation set. Once questions, prompts, and scoring criteria are set, lock them down and put them under version control.
    2. Run repeatedly. Run each question multiple times (e.g., 3 times) and take the median, mean, or majority result to offset randomness; increase the sample size for critical conclusions.
    3. Record metadata. Log the model version, temperature, max output length, reasoning mode, and token usage to ensure results are reproducible.
    4. Anonymize data. Business data must be de-identified before entering the evaluation set to avoid leaking personal information, trade secrets, or sensitive content.
    5. Aggregate results. You can report L1, L2, and L3 pass rates separately, or combine them into a weighted total—for example, weighting L1, L2, and L3 at 0.2, 0.4, and 0.4 respectively. If you only run 3 times, note the small-sample variance and confidence limits.

    4. Testing Reasoning with Mathematical Proofs

    4.1 Why choose mathematical proofs as a “stress test”

    Mathematical proofs test several underlying capabilities at once:

    • Premise decomposition. Identifying implicit assumptions to avoid “reasoning out of thin air.”
    • Theorem invocation. Accurately citing known results and their conditions of applicability.
    • Multi-step linkage. Logical coherence from one derivation step to the next.
    • Boundary handling. Covering degenerate cases and exceptions.

    For proof tasks, a correct conclusion is only the bare minimum—rigor in the process is the real dividing line.

    4.2 Proposition selection: avoid the “memorization” trap

    If a proposition already has a proof in public literature or online math resources, the model may simply be regurgitating existing content. A more effective approach is to:

    • Choose customized variants that are not easily found through direct search;
    • Or write your own propositions with specific constraints, such as adding a condition or requiring an explicit construction;
    • Avoid overclaiming that “a problem has absolutely no answer in public sources.” Instead, describe it as a variant customized for evaluation; if you can’t confirm this, switch to a self-built business task.

    You can verify this by comparing two types of prompts:

    • The first type (proof only) may reproduce an existing proof, making it hard to distinguish model quality;
    • The second type (prove and explain the source of the construction) better tests the reasoning process.

    In either case, require the model to state the source of its approach—known theorems, custom lemmas, or the derivation chain. If a proof closely resembles some public proof but the model doesn’t explain the source, its credibility should be discounted.

    4.3 Have the model produce “lecture notes”

    To test long-output quality, you can ask the model to write the proof as a self-contained English lecture note:

    1. Please prove the following proposition and write it up as a complete English lecture note.
    2. Proposition: <replace this with the proposition to be proven>
    3. Requirements:
    4. 1. First state an overview of the approach, then give a formal proof;
    5. 2. Clearly state all assumptions and preconditions;
    6. 3. Cite the known results used at each step; provide a full proof for any self-defined lemmas;
    7. 4. Discuss boundary cases and degenerate cases separately;
    8. 5. Output as structured text, using standard mathematical notation for formulas;
    9. 6. At the end, add a "self-check for potential gaps": list any places where the proof might not be rigorous and how to fix them.
    10. Note: This proposition is a variant customized for evaluation. Please derive it yourself and do not directly cite results that are not provided.

    The “self-check for potential gaps” item tests whether the model has the critical ability to scrutinize its own reasoning.

    4.4 Rigor scoring rubric

    It’s recommended to have two or three reviewers with relevant backgrounds score independently and blind, rating each dimension on a 1–5 scale. If the score difference on any dimension reaches or exceeds 2 points, hold a group review; a single reviewer may introduce subjective bias, so critical conclusions should ideally add cross-review.

    Evaluation dimension Focus
    Conclusion correctness Is the proposition rigorously proven? Is the reasoning complete?
    Premise rigor Are assumptions stated explicitly? Any concept-switching or assumed conclusions?
    Theorem citation Do the cited theorems actually exist, and are their conditions of applicability met?
    Boundary and degenerate cases Are exceptions discussed and handled correctly?
    Expression and structure Is the lecture note well-structured, clearly worded, and does the self-check contain substance?

    Custom proposition example (illustrates the scoring method only): Let n be a positive integer, and define f(1)=2, f(k)=f(k-1)+k². Prove that f(n)=n(n+1)(2n+1)/6+1, and give f(10). Use a self-built proposition for the actual evaluation.

    “Trap” question example:

    Proposition: For any real numbers a and b, (a+b)²=a²+2ab+b². If a=b=3, then 9+18+9=36, and since (3+3)²=6²=36, the proposition holds.

    Ask the model to judge whether the proof is valid. A correct answer should point out that verifying a single special case cannot prove a proposition that is supposed to hold for all real numbers. Questions like this can effectively identify whether a model only “keeps calculating along” and lacks critical thinking.

    5. Execution Capability: Speed Also Determines Experience

    On the same self-built evaluation set, when model quality is close, the faster model often saves more time and delivers a smoother experience across most routine tasks (verify with your own evaluation data).

    From an engineering perspective, speed metrics can be broken down as:

    • Time-to-first-token (TTFT): The time from sending a request to receiving the first token, mainly affected by queue wait time and input length;
    • Time per token / generation rate: The average time to generate one token during the generation phase, or its inverse expressed in tokens/sec;
    • Total latency: The total time to complete a task, related to output length, queuing, and time-to-first-token;
    • Concurrent throughput: The system’s carrying capacity under simultaneous load.

    To evaluate concurrency, fix the concurrency level (e.g., 1, 8, 32), record p50/p95 latency and tasks completed per second, and compare against single-concurrency results.

    When measuring, note the following:

    1. Keep the input prompt and output length roughly consistent;
    2. Run each task multiple times and take the median rather than the mean to avoid outlier interference;
    3. If output length varies greatly, report both generation rate and total latency;
    4. Load testing and trial runs incur real costs, so validate the workflow with a small sample first; business data should be anonymized before entering the load-test set.

    Sample load-testing code:

    1. import time
    2. import statistics
    3. def benchmark(client, prompt, max_output=2048, runs=5):
    4. """Measure time-to-first-token, decode throughput, total latency, and cost-related token usage"""
    5. ttfts = []
    6. decode_times = []
    7. total_times = []
    8. in_tokens = []
    9. out_tokens = []
    10. # These two fields feed into the cost formula; keep them at 0 if the platform does not return them separately
    11. max_output_tokens_in = 0 # Fill with the input-side token field for the chosen API; use 0 if not returned
    12. reasoning_tokens_out = 0 # Fill with the reasoning token field for the chosen API; use 0 if not reported separately
    13. for _ in range(runs):
    14. start = time.perf_counter()
    15. first_token_at = None
    16. text_parts = []
    17. local_in = 0
    18. local_out = 0
    19. try:
    20. # stream=True means streaming output: return content each time a chunk is generated
    21. for chunk in client.generate(prompt, max_output=max_output, stream=True):
    22. if first_token_at is None:
    23. first_token_at = time.perf_counter() # Record the time the first token arrives
    24. text_parts.append(chunk.text)
    25. if chunk.usage:
    26. local_in = getattr(chunk.usage, "input_tokens", local_in) or local_in
    27. local_out = getattr(chunk.usage, "output_tokens", local_out) or local_out
    28. except Exception as e:
    29. print("This request failed: ", e)
    30. continue
    31. end = time.perf_counter()
    32. if first_token_at is None or local_out == 0:
    33. continue # Skip this call if there was no valid content
    34. ttfts.append(first_token_at - start)
    35. decode_times.append(end - first_token_at) # Time spent in the generation phase
    36. total_times.append(end - start) # Total latency = end time − request start (including queue and time-to-first-token)
    37. in_tokens.append(local_in)
    38. out_tokens.append(local_out)
    39. if not decode_times:
    40. raise RuntimeError("No valid response, cannot compute performance metrics")
    41. # Compute decode throughput per run to avoid masking per-run variance with total tokens/total time
    42. decode_tps = [ot / dt for ot, dt in zip(out_tokens, decode_times)]
    43. return {
    44. "ttft_ms": statistics.median(ttfts) * 1000, # Time-to-first-token (ms), using the median
    45. "decode_tps": statistics.median(decode_tps), # Decode throughput (tokens/sec), median across runs
    46. "elapsed_s": statistics.median(total_times), # Total latency, median
    47. "input_tokens": statistics.median(in_tokens),
    48. "output_tokens": statistics.median(out_tokens),
    49. "max_output_tokens_in": max_output_tokens_in,
    50. "reasoning_tokens_out": reasoning_tokens_out,
    51. }

    This code answers a few clear questions:

    • For the same input, who returns an answer first?
    • For the same output length, who is faster?
    • What is the total latency to complete the task?
    • Are the input, output, and reasoning token fields required by the cost formula being recorded?

    If two models are at the same quality level but their total latency differs by several times or even close to an order of magnitude, the “fast enough” model will likely become the first choice for routine tasks.

    6. Cost Evaluation: Pay-Per-Use and Quota Two Perspectives

    6.1 Pay-per-use

    Cloud services generally bill input tokens and output tokens separately; when deep reasoning mode is enabled, the “reasoning tokens” a model consumes are usually included in the bill. Using unit prices a, b, and c (in currency per million tokens) as an example:

    1. Cost per task = (input tokens × a + output tokens × b + reasoning tokens × c) / 1,000,000

    Note that reasoning tokens are typically folded into output-token billing, in which case take c=b; if the platform lists a separate reasoning-token price, substitute the actual unit price for c.

    Cost analysis should be grounded in “per task”:

    • A model that produces results several times faster may have a lower cost per task, and over the long run the difference in call volume gets amplified;
    • Deep reasoning significantly increases reasoning tokens, especially on complex tasks;
    • Long-output tasks (such as lecture notes and reports) also warrant attention on the output-token unit price.

    6.2 Quotas and subscriptions

    Under a subscription or plan model, you can measure cost by “the share of the monthly total quota consumed by a single task.” For example, one lengthy, rigorous proof lecture note might consume a few percent of the monthly total quota. Running a small number of sample tasks is enough to estimate the monthly task capacity, avoiding the risk of a few high-consumption tasks quickly exhausting the quota.

    6.3 Cost-optimization strategies

    • Use a lightweight model for simple tasks; enable deep reasoning only for complex tasks;
    • Cache repeated requests and reuse existing results;
    • Replace full-text concatenation with context summarization, retrieval augmentation, or stitching together only the necessary snippets to compress context;
    • Use max output tokens to limit redundant output and avoid unbounded growth in long-output scenarios;
    • Route models by task difficulty: send routine requests to a fast model and high-difficulty requests to a deep-reasoning model;
    • Track token usage and task cost for each optimization separately, using data to verify the savings.

    7. Summary and Selection Recommendations

    1. Clarify the scenario first. For tasks that need rapid iteration—creative discussion, code generation—focus on execution speed; for tasks like theorem proving and critical decisions, focus on reasoning quality.
    2. Build a small self-owned evaluation set. Fixed questions run repeatedly are more reliable than public leaderboards alone; a few dozen business-relevant questions are often more persuasive.
    3. Evaluate cost and experience together. Don’t look only at single-task cost—also consider quota consumption, delivery timeline, and team efficiency.
    4. Combine different models. In practice, many teams pair a “speed-oriented” model with a “deep-reasoning” one: the former handles the bulk of routine requests, while the latter tackles the few high-difficulty tasks. This tiered approach balances efficiency and quality while making overall cost easier to control.
    5. Consider the deployment form. Whether you use a cloud API or a self-hosted inference cluster, you can build a stable service by referencing common modules such as inference services, elastic compute, object storage, message queues, container platforms, logging services, and monitoring/alerting.
    6. Watch the output-length limit. The output-length limit determines whether long answers (such as lengthy lecture notes) can be generated in full. Fix this parameter during load testing and record it alongside output-token usage to assess whether long-output scenarios are adequately served.

    Only by building a scientific evaluation method can you avoid being swayed by parameters or marketing messages and find the balance point among speed, quality, and cost that best fits your business needs.

    8. FAQ

    How many questions does a self-built evaluation set need? As a rule of thumb, prepare 30–50 for L1, 20–30 for L2, and 5–10 for L3. More isn’t always better—what matters is covering real tasks, having clear scoring criteria, and being reproducible.

    Can leaderboards still be referenced? Yes, but only as an initial screen. Leaderboards can’t fully represent long-tail business problems, so the final selection should still come back to your self-owned evaluation set.

    Do load testing and trial runs incur costs? Yes. Especially in long-output, deep-reasoning, and high-concurrency scenarios, validate with a small sample first, then scale up gradually while recording actual token consumption and task cost.