How to Evaluate LLM Cost-Effectiveness and Capability Scientifically

    Choosing a large language model requires more than comparing input and output prices. This guide explains how to evaluate total cost per successful task, latency, task quality, reliability, and benchmark validity. It also presents a practical framework for building an internal evaluation set, conducting subjective reviews, and making model-selection decisions based on consistent evidence.

    1. Why Price and Capability Must Be Evaluated Together

    When selecting a large language model, teams often use the unit price as the primary criterion. A low price appears cheap, while a high price appears expensive. This comparison is incomplete.

    Models are typically billed by input and output tokens, but the real cost is the total expense required to complete a task. A lower-priced model may require multiple calls and repeated revisions before producing a usable result. Its actual cost can therefore exceed that of a more expensive model that completes the task in a single attempt.

    A proper evaluation should consider three factors:

    • Unit price
    • Total cost per task
    • Result quality achieved per unit of cost

    Leaving out any one of these factors can lead to a misleading conclusion.

    2. Breaking Down the Billing Structure

    The pricing of mainstream model services usually includes the following components:

    • Input tokens: The total length of the prompt, context, conversation history, and additional reference material.
    • Output tokens: The content generated by the model. The unit price is usually higher than that of input tokens.
    • Cache-related charges: Repeated prompt prefixes may be billed at a lower rate by some services. The exact rules depend on the provider’s documentation.
    • Reasoning-related usage: Some modes generate internal reasoning tokens before producing the final output. These tokens may also count toward output usage.

    The cost of a single call can be estimated with this formula:

    1. Single-call cost = Input tokens × Input price + Output tokens × Output price

    A task usually requires multiple calls, and failed attempts must also be included. If a task requires an average of N calls and has a success rate of p, the average cost per successful result is:

    1. Cost per successful task = Total task cost ÷ Success rate

    The following example uses hypothetical figures for illustration only and does not represent the pricing of any real service.

    Assume a task requires an average of 20,000 input tokens and 10,000 output tokens per round. The input price is 2 yuan per million tokens, and the output price is 8 yuan per million tokens.

    The cost of one round is:

    1. 0.04 + 0.08 = 0.12 yuan

    If the task requires an average of three rounds, the cost per task is:

    1. 0.12 × 3 = 0.36 yuan

    If the success rate is 80%, the cost per successful task is approximately:

    1. 0.36 ÷ 0.8 = 0.45 yuan

    This example shows that success rate can affect cost as much as unit price. A low-priced model with a 50% success rate may have a higher cost per successful task than a more expensive model with a 90% success rate.

    3. Measuring Speed and Latency

    “Fast” is a vague description. It should be broken down into measurable metrics:

    • Time to first token (TTFT): The time from sending a request to receiving the first token. This strongly affects the perceived responsiveness of interactive applications.
    • Output throughput: The number of tokens generated per second. This determines how long the model takes to produce long documents or large code outputs.
    • End-to-end latency: The total time including queueing, inference, and network transfer. This is the actual waiting time experienced by the user.

    Different scenarios prioritize different metrics. For interactive applications, TTFT and end-to-end latency are usually more important. For batch or offline processing, throughput and cost per task are often more important.

    Measurements should be repeated at different times. Record the median, or P50, as well as a high-percentile value such as P95, rather than relying on a single result. One measurement can be heavily affected by network fluctuations and service load.

    Fast responses do not necessarily indicate higher quality. A shorter response time may result from a smaller model or a different reasoning strategy. Speed metrics must therefore be interpreted together with quality metrics.

    4. Dimensions for Evaluating Task Quality

    Evaluating a single question-and-answer exchange is relatively straightforward. Evaluating an end-to-end deliverable is much more complex.

    For example, suppose the task is to generate a small, runnable interactive application from a natural-language description. The evaluation should cover the following dimensions:

    1. Runnability: Can the generated result start directly, or does it require manual fixes?
    2. Feature completeness: Are all requested features implemented? This can be measured by calculating the pass rate for individual requirements.
    3. Interaction correctness: Do user actions, state transitions, and decision rules behave as described?
    4. Details and presentation: Are interface elements, wording, and feedback effects consistent with the requirements?
    5. Difficulty and playability: If the task involves an intelligent opponent or levels, are the parameters reasonable? Do tester responses fall within an appropriate range?
    6. Stability: When the same prompt is executed multiple times, how often does it succeed, and how much do the results vary?

    Each dimension should have explicit scoring criteria. For example, a 0-to-2 scale can be used, with clear descriptions of how each score is assigned. The more specific the criteria, the more consistent the results will be across reviewers.

    5. Building a Small Internal Evaluation Set

    Public leaderboards cannot fully represent the requirements of a specific business. Teams should therefore maintain an internal evaluation set.

    A recommended process is:

    1. Extract 20 to 50 representative tasks from real business workflows, including both common and edge cases.
    2. Define the input, acceptance criteria, and conditions that can be checked automatically for each task.
    3. Fix the evaluation environment, including model parameters, prompt templates, and retry policies, so that all models are compared under the same conditions.
    4. Record the cost, latency, pass or fail status, and manual score for every call.
    5. Re-evaluate regularly. Providers may update model versions or change pricing rules, so earlier conclusions must be validated again.

    The following pseudocode illustrates the basic evaluation process:

    1. function evaluate(model, tasks, N):
    2. records = []
    3. for task in tasks:
    4. for trial in 1..N:
    5. start = now()
    6. output = model.generate(task.prompt, params=FIXED_PARAMS)
    7. latency = now() - start
    8. cost = calc_cost(output.usage, model.price)
    9. passed = run_checks(output, task.checks)
    10. records.append({task, trial, latency, cost, passed})
    11. return summarize(records)
    12. // Output: pass rate, P50/P95 latency, cost per successful task

    The run_checks function should be automated wherever possible. Examples include validating the output format, running a generated program, and checking whether required fields are present.

    Automated checks can substantially reduce the workload for human reviewers and improve reproducibility.

    When aggregating the results:

    1. Pass rate = Number of passed trials ÷ Total number of trials
    2. Cost per successful task = Total cost ÷ Number of passed trials

    6. Making Subjective Evaluation More Reliable

    Some dimensions, such as visual quality, interaction feel, and content style, are difficult to measure with automated metrics. That does not mean they cannot be evaluated rigorously.

    Common practices include:

    • Blind evaluation: Reviewers do not know which model produced an output. This reduces the influence of brand perception or prior expectations.
    • Independent scoring by multiple reviewers: Assign at least three reviewers to score samples independently, then calculate inter-rater agreement, such as Cohen’s kappa. If agreement is low, revise the scoring criteria before continuing.
    • Observable scoring items: Break down vague judgments such as “looks good” into checkable questions, including whether all interface elements are present and whether button states provide appropriate feedback.
    • Preserving original outputs: Keep the evaluated samples available for later review, verification, and dispute resolution.

    Results from subjective evaluations should state the sample size and number of reviewers. This allows readers to assess the reliability of the conclusion rather than treating it as an absolute fact.

    7. Interpreting Public Leaderboards Correctly

    Public leaderboards can provide useful references, but they should be interpreted carefully.

    1. Rules and versions: Are the scoring rules public? Can the version number and change history be verified? Changes to the rules can directly affect rankings, so results should only be compared within the same version.
    2. Data coverage: Could the test data overlap with training data? Does the task distribution reflect your business scenarios?
    3. Uncertainty ranges: If two models differ by only a fraction of a point and no confidence interval is provided, the scores should not be treated as evidence that one model is definitively better.
    4. Explaining changes: Is there a reasonable technical explanation for a ranking change? If the rules were modified after results were published, the basis for the change should be disclosed.
    5. Capability coverage: Different leaderboards measure different capabilities. No single leaderboard can represent a model’s full capability profile.

    A simple thought experiment can help test the credibility of a leaderboard. Suppose a leaderboard ranks a model first even though that model performs poorly across most independent evaluations. The first step should be to inspect the leaderboard’s methodology, data, and record of rule changes rather than immediately accepting the ranking.

    Conversely, if a leaderboard’s results are consistent with multiple independent evaluations, its reference value is higher.

    A private leaderboard that does not disclose its dataset, scoring method, or reproduction steps should be treated only as an internal reference. It should not be the sole basis for model selection.

    8. A Practical Model-Selection Process

    1. Define the business scenario: Interactive question answering, batch processing, code generation, and content understanding emphasize different metrics.
    2. Set minimum requirements: Establish a minimum quality level, maximum acceptable latency, and maximum budget. Eliminate candidates that exceed any of these limits.
    3. Run an initial screening with the internal evaluation set: Evaluate all candidates in a standardized environment and retain only those that meet the quality threshold.
    4. Conduct a small-scale production trial: Test the shortlisted models with real traffic and record end-to-end cost and failure cases.
    5. Make a combined decision: Use cost per successful task as the primary comparison metric while also considering quality, stability, and latency.
    6. Establish a re-evaluation process: Repeat the evaluation whenever the model version, pricing, or service terms change.