LLM Evaluation Framework: A Three-Dimensional Approach to Model Selection

    Choosing between large language models is often reduced to a single benchmark score, but that number hides the trade-offs that actually matter in production. This article breaks model selection into three independent dimensions—output quality, latency, and cost—and shows how to measure each one with verifiable numbers. It covers a fitness-based scoring method, why single-response output limits and token verbosity affect end-to-end latency, and how cache hit rates and retries shape the real bill. The takeaway is a reusable decision order for allocating budget between quality and cost, supported by continuous regression testing rather than one-off leaderboards.

    1. The Real Problem Hidden Behind Marketing Hype

    Whenever a new model is released, technical communities and newsletters tend to publish heavily promotional descriptions. The experience of developers is often the opposite: after switching to the new version, the quality of generated output does not improve in any meaningful way. This gap is not an illusion. The root cause is that evaluation dimensions have been compressed into a single leaderboard score.

    When you put two different LLMs side by side, what you actually need to answer are three independent questions: Is the delivered output good enough? How long do you have to wait? What does it cost in total? These three factors always pull against each other in any evaluation—higher scores usually mean higher prices, and cheaper options usually require you to revise the output for a couple more rounds. The goal here is to break these three things into numbers that can be checked independently, then reassemble them into a statement that is usable in engineering.

    2. Dimension One: Quantifying Output Quality

    “Quality” cannot be equated with leaderboard ranking. A practical approach is to break the task into several sub-items—such as requirement understanding, code runnability, edge-case coverage, refactoring soundness, documentation completeness, and security—score each one, and then combine them into an aggregate index using a consistent methodology.

    The reference data from the original document is as follows: an aggregate index of 57.8 versus 56.4, a lead of about 2.5%; one side leads in four of the six sub-items, with a 3:1 win/loss ratio on the shared baseline; the only sub-item where it is overtaken is security (30.7 versus 26.6). The engineering implication of these numbers is clear: a 2.5% aggregate gap falls within the noise range and is not enough to support a conclusion of a “generational leap,” whereas the deficit in the single security sub-item is worth adding to the model-selection risk list.

    The recommended decision logic is as follows:

    1. def choose_by_fitness(items, weights, noise=3.0):
    2. # items: normalized scores for each sub-item; weights: business weights
    3. total = sum(items[k] * weights[k] for k in weights)
    4. if total - baseline_total < noise:
    5. return "Treat as equivalent; decide by cost and latency"
    6. return "Prioritize quality"

    3. Dimension Two: Latency Is Not Typing Speed

    Latency is the most easily misread dimension. There are two real dividing lines: how much a single response can deliver, and how long each round of conversation runs.

    The first is the single-response output limit. 1.05M versus 128K is an 8.2x difference, which means that for a 200,000-token deliverable, one side can write it in a single pass, while the other has to split it into two segments and take on an extra round of context rebuilding and concatenation checks. The second is the token deviation per response round: for one side it is 6–11x that of the median model in its class, so the same work is described at greater length, and end-to-end wait time is naturally stretched out.

    Therefore, latency evaluation should record three quantities: the single-response output limit, the number of rounds a task requires, and the median output tokens per round. Comparing only “time to first token” will lead to the opposite conclusion.

    4. Dimension Three: Calculate Cost by Bill Structure

    At the list-price level, input is 8 versus 2, output is 40 versus 10, and cached input is 0.40 versus 0.10—all three happen to be exactly 4x. But the real bill also depends on cache hit rate and number of retries:

    1. Cost per task ≈ input tokens × input price + output tokens × output price
    2. + cached-hit tokens × cache price + failed retries × cost per round

    In long-context, multi-round iterative coding scenarios, the cache hit rate often influences the final amount more than the unit price does.

    5. Reassembling the Three Dimensions into Plain Terms

    This is not a contest of “who is stronger,” but a question of budget allocation: whether to spend the margin on quality or on the bill. A reusable decision order is—first use the noise threshold to judge whether quality is equivalent; if equivalent, compare the single-response output limit and per-round cost; if still equivalent, choose the cheaper side. A more robust engineering practice is to build a small-scale regression set and re-test continuously, rather than relying on a one-off leaderboard. If you need elastic compute and supporting capabilities, you can build an evaluation pipeline on a general-purpose cloud environment such as Baidu AI Cloud, which offers container platforms, object storage, log services, and monitoring and alerting, so that the three-dimensional data is verifiable and traceable.