A Three-Dimensional Framework for Evaluating Large Language Models: Quality, Latency, and Cost
Choosing a large language model is rarely a debate about which one is "the strongest." Once a real project is involved, that question splits into three competing concerns: whether the output is good enough, how long you have to wait, and what the total bill looks like. This article proposes a three-dimensional evaluation framework that can be independently checked and recomputed, replacing gut feeling with numbers and turning those numbers back into an engineering decision. It covers how to measure output completeness, why latency depends on output length limits rather than typing speed, how to model cost across input, output, and cached input pricing, and a reproducible selection workflow with hard gates for security and compliance.
A Three-Dimensional Framework for Evaluating Large Language Models: Quality, Latency, and Cost
1. Why “Which Model Is Stronger” Is the Wrong Question
When teams adopt AI coding tools or general LLM capabilities, the most common argument is over which model is stronger. Put a real project into the discussion and that question immediately breaks into three sub-questions that pull against each other: is the deliverable good enough, how long do we wait, and what does it cost in total. The three always trade off in any evaluation. Higher scores usually cost more, cheaper models usually need another round of edits, and a more verbose model is slower per turn but may finish more in a single pass.
The core argument of this article is therefore: do not evaluate the “strongest model.” Build a three-dimensional evaluation framework that can be checked independently and recomputed, replace impressions with numbers, and then assemble those numbers into one sentence an engineer can act on.
2. Dimension One: Measuring Deliverable Completeness
Deliverable completeness is not the same as a leaderboard score. It should be broken into at least three layers:
- A like-for-like composite index: a weighted score produced under the same prompts, the same temperature, and the same evaluation set, used for horizontal comparison.
- A per-category win/loss table: break capability into individual categories (code correctness, refactoring quality, documentation completeness, test coverage, instruction following, security, and so on) and record which model wins each one. When composite indices are close, this table carries more information than the total score.
- Shared-benchmark consistency: compare only on the same set of tasks, so results stay comparable instead of each model being tested on its own suite.
A typical finding: two leading models may differ by only about 2%–3% on the composite index (for example 57.8 vs. 56.4), with one ahead in four categories and a shared-benchmark win/loss ratio of roughly 3:1. In engineering terms, this small lead means: use the wrong scenario and the advantage drops to zero; use the right scenario and 2% can decide whether a delivery needs rework.
Note that security is often an independent category whose ranking does not necessarily match the composite index. For scenarios involving permissions, keys, or data handling, treat the security category as a hard gate rather than letting it be averaged away by the total score.
3. Dimension Two: Latency Is Not Typing Speed, It Is How Much Fits in One Pass
Latency is the most easily misread dimension. What actually determines waiting time is usually not per-token generation speed but two structural parameters:
- Maximum output per request: for example 1.05M vs. 128K, roughly an 8x difference. A 200,000-token deliverable is written in one pass by the higher-limit model and in two segments by the lower-limit one. The extra cost is not only time but also the work of maintaining consistency across segments.
- Answer length per turn: if a model’s output tokens per turn are significantly above the median (say 6–11x), it “says more” on the same task, is slower per turn, but may reduce the number of round trips.
Latency should be expressed as something computable:
Total latency ≈ turns × per-turn generation time + segment assembly and validation costPer-turn generation time ≈ output tokens / effective throughputTurns ≈ task complexity / deliverable length per request
So: the output limit determines the number of turns, and answer length determines per-turn time. During selection, first ask “how long does my task need to deliver in one pass,” then ask “how long does it speak in one turn.” That is more useful than arguing about who is faster.
4. Dimension Three: Separate List Pricing from Caching in Cost
Cost cannot be judged by unit price alone. Break it into at least four items: input, output, cached input, and the repeated-context overhead caused by segmentation. A common situation is that three list prices sit at a fixed multiple of each other (for example input 8 vs. 2, output 40 vs. 10, cached input 0.40 vs. 0.10, all 4x). In that case the cost difference is structural and will not disappear through prompt optimization.
A recomputable cost model:
Cost per task = input tokens × input price + output tokens × output price+ cache-hit tokens × cache price + uncached repeated context × input price
When a low output limit forces segmentation, the second segment usually has to replay the context, and repeated context inflates input cost — something frequently overlooked on long tasks.
5. Putting the Three Dimensions Back into One Sentence
Placing the three dimensions side by side, the conclusion is usually not “which is stronger” but a budget allocation choice:
| Dimension | Leading side (example basis) | Key evidence |
|---|---|---|
| Deliverable completeness | Slight lead (about 2.5%) | Like-for-like composite index and per-category win/loss table |
| Security category | The other model takes the lead | Highest security index overall |
| Time to first complete pass | Higher output limit | Maximum output per request differs by about 8x |
| Answer length per turn | Lower-output side saves turn time | Deviation in per-turn tokens |
| Cost list price | Lower-price side, about 4x advantage | Input/output/cached input list prices |
In one sentence: quality buys down the rework rate, cost buys the bill, and latency buys delivery cadence.
6. Putting It into Practice: A Reviewable Selection Process
- Build an evaluation set: pull 50–100 tasks from real repositories, covering generation, refactoring, bug fixing, test writing, and documentation.
- Standardize the setup: fix prompts, temperature, context window, and evaluation scripts, and record the version number of every run.
- Produce three tables: the composite index table, the per-category win/loss table, and the cost/latency table. None is optional.
- Set gates: make security, license compliance, and data residency hard gates.
- Canary and regression: start with a small traffic canary, then run weekly regressions to catch model or prompt drift.
- Make it observable: use logging and monitoring alerts to record turn counts, token usage, and rework rate, closing the loop.
7. Common Pitfalls
- Looking only at the total score, ignoring categories and security gates.
- Overlooking segmentation caused by the maximum output per request, and the repeated context it creates.
- Inferring “low total cost” from a “cheap unit price,” ignoring turns and rework.
- An evaluation set disconnected from real business, making conclusions non-transferable.
8. Conclusion
Rewriting “which is stronger” as “is the deliverable good enough, how long do we wait, what does it cost” turns model selection from an argument into a reviewable engineering decision. The value of the three-dimensional framework is not crowning a permanent winner, but making every decision testable against data, recomputable by the team, and verifiable over time.
