A Three-Dimensional Framework for Evaluating Large Language Models
Choosing between large language models often feels arbitrary because marketing benchmarks rarely match real business results. This article breaks model selection into three verifiable dimensions: output quality, latency, and cost. It explains how to use repeated sampling and confidence intervals to separate real quality gaps from noise, why single-call output limits and per-turn length reshape architecture, and how to calculate cost from token flow and list pricing. Readers get a reproducible evaluation workflow that turns vague impressions into defensible numbers.
1. Reframing the Problem: Turning “They Feel the Same” into Checkable Numbers
Many teams run into the same confusion when they trial a new generation of large language models: the published metrics keep climbing, yet after integration into their own workloads the new model feels “about the same as the previous one.” That gap is usually not a perception error but a missing evaluation methodology. In practice, people are comparing three different things at once: how good the deliverable is, how long you wait for it, and what it costs in total. These three factors always pull against each other in any technical evaluation—higher scores tend to cost more, and cheaper options tend to require two extra rounds of rework.
So this article does not declare a winner. Instead, it splits those three factors into metrics that can be verified independently, then reassembles them into one engineering-grade statement: this is not a capability contest but a budget allocation decision—you either spend money on quality or on the bill.
2. Dimension One: Measuring Deliverable Quality
Deliverable quality is the easiest thing for a single “composite score” to hide. Split it into two layers:
- Composite index: a weighted total produced under the same task set and the same scoring script, used for coarse filtering.
- Per-item win/loss table: break the work into individually judgeable items (code runnability rate, defect density, refactoring fidelity, documentation completeness, security, and so on) and record wins and losses item by item.
The source material gives this order of magnitude: the two candidates score roughly 57.8 and 56.4 on the same composite index, a relative gap of about 2.5%; across six per-item categories one side leads in four, a 3:1 split on the shared baseline. The engineering meaning is clear: the lead falls inside the noise band. When the difference is only two or three percentage points, a single prompt tweak, a temperature change, or a few extra skewed questions in the evaluation set can flip the ranking.
The verifiable approach is to introduce confidence intervals and repeated sampling:
# Illustration: compare means and confidence intervals over multiple runs,# instead of a single scoring passimport statistics as stdef evaluate(candidate, tasks, repeats=5):scores = []for _ in range(repeats):run = [score(candidate, t) for t in tasks] # score is a shared scoring functionscores.append(sum(run) / len(run))m = st.mean(scores)sd = st.stdev(scores) if len(scores) > 1 else 0.0return m, (m - 1.96 * sd, m + 1.96 * sd) # approximate 95% interval
If the intervals of two candidates overlap substantially, the correct conclusion is “indistinguishable in quality,” and the decision should be handed to the other two dimensions.
Another easily overlooked signal is a reversal on the security item. The source data shows the one category where a side is comprehensively beaten is security (30.7 versus 26.6). This tells us a small overall lead does not automatically cover compliance and security requirements. For scenarios involving access control, input validation, or sensitive data handling, security should be set as an admission gate rather than a weighted item—fail it and you are eliminated, rather than letting the composite score average it away.
3. Dimension Two: Latency Is Not “Typing Speed”
The most common misjudgment on latency is treating time-to-first-token as total delivery time. In real engineering, two things determine how long you wait:
- Maximum output per call: how much can be delivered in one shot. The source material’s order of magnitude is 1.05M versus 128K, roughly an 8.2x difference; a 200K-token deliverable is written in one pass by one option and must be split into two segments by the other.
- Length of each response: for the same task, some models emit 6–11x the token count of the median model per turn—they simply say more.
Combined, these two change your architecture, not just your waiting time. When segmented output is required, the engineering side must take on extra work:
- Context continuation: re-inject the end of the previous segment, and handle truncation and duplication.
- State consistency: long artifacts (such as cross-file refactoring) tend to drift in naming and interface signatures once split.
- Retry cost: whether the first k-1 segments are reusable when segment k fails directly determines the price of a retry.
A rough but useful estimate:
end-to-end latency ≈ output length / effective throughput + segments × (continuation overhead + validation overhead)
Here “segments” is determined by the maximum output per call, and “output length” by the model’s expressive habits. Listing these two factors separately explains why two models that “feel about the same” can differ by multiples of time on your long-document generation workload.
4. Dimension Three: Separate List Price from Caching in Cost
Cost comparison has to come down to unit price structure, not a vague “cheaper.” The source material’s list price relationship is input 8 versus 2, output 40 versus 10, cached input 0.40 versus 0.10—all three exactly 4x. The key insight: when all three scale proportionally, the cost ratio is independent of your usage mix, so selection can be done by direct multiplication; once one vendor changes its cache discount or output unit price on its own, you must go back and recompute against your real usage distribution.
Build a ledger organized by token flow:
# Illustration: account for the cost of a single request by token flowdef cost(inp, out, cached, price):return (inp - cached) * price["in"] \+ cached * price["cache_in"] \+ out * price["out"]
There are three real cost levers in engineering: raise the cache hit rate (stable system prompts, reusable retrieval snippets placed first), compress output length (structured output, limiting redundant explanation), and count the rework rate of “two more rounds of edits” into total cost. A single call that is 4x cheaper will see its real bill gap narrow quickly if the rework rate doubles.
5. Putting the Three Dimensions Back into Plain Language
Overall, the reproducible selection workflow is:
- Run the security and compliance gate first; eliminate anything that fails.
- Use repeated sampling to confirm whether the quality difference exceeds noise; if the intervals overlap, treat it as a tie.
- Estimate end-to-end latency with “maximum output per call × length per turn” and decide whether it forces an architecture change.
- Multiply list price by your real usage distribution, and count the rework rate into total cost.
- Pay for quality only when the quality difference is significant and the budget allows; otherwise leave the budget for call volume and cache optimization.
In practice on cloud platforms such as Baidu AI Cloud, this kind of evaluation is usually paired with general-purpose capabilities like logging services, monitoring and alerting, message queues, and object storage: log the token flow, latency, and scoring result of every call into logs and metrics, forming an evaluation pipeline that can be regression-tested continuously. The selection conclusion is therefore no longer a ranking on some leaderboard, but a set of numbers repeatedly verifiable against your own business data.
