A Three-Dimensional Framework for Evaluating Large Language Models
This article presents a vendor-neutral framework for evaluating and comparing large language models across three dimensions: deliverable completeness, latency, and cost. It explains why casual testing often makes new model generations feel nearly identical, then shows how to quantify output quality with a composite index and sub-scores, measure latency beyond raw generation speed, and calculate cost per completed task. Readers will find scoring logic, sample code, and practical guidance for deciding whether to migrate to a new model.
1. Why “It Feels About the Same” Is a Common Selection Mistake
When teams switch their underlying large language model service during real engineering work, the subjective impression is often that it is “about the same as the previous generation.” This is not an illusion. It is the inevitable result of missing evaluation criteria: everyday trials usually cover only lightweight scenarios such as short question answering or single-file completion, which mask generational differences in model capability. To decide whether a new generation is worth migrating to, you need to break “how good, how fast, and how expensive” into numbers that can be checked independently, and then combine them back into a single engineering conclusion.
This article does not recommend any specific vendor product. Instead, it offers a neutral evaluation method. Any AI coding tool or large language model service can be compared side by side using the same set of metrics.
2. Dimension One: Quantifying Deliverable Completeness
Deliverable completeness is the proportion of a model’s output that can go directly into review. A combined index plus a breakdown by sub-item is recommended:
- Composite index: weighted from multiple shared benchmarks and a private business set, avoiding bias from a single leaderboard.
- Sub-item breakdown: at least six items, covering code correctness, cross-file consistency, refactoring readability, test coverage, instruction following, and safety.
- Shared benchmark win/loss table: record the items where the two sides split wins on the same set of problems, so a total score does not hide weaknesses.
A typical finding is that the new generation leads by only about 2.5% on the composite index, leads on four of the six sub-items, and goes 3:1 across four shared benchmarks. This shows that the generational improvement is real but limited, and not enough to support a claim of “across-the-board dominance.” The one sub-item often reversed by the previous generation is safety, which suggests that safety alignment and capability improvement do not advance linearly together.
Illustrative scoring aggregation logic:
weights = {"correctness": 0.30,"cross_file": 0.20,"readability": 0.15,"tests": 0.15,"instruction": 0.10,"safety": 0.10,}def composite_index(scores: dict) -> float:return round(sum(scores[k] * weights[k] for k in weights), 1)
3. Dimension Two: Latency Is Not Just “Typing Speed”
Latency is the most easily misread dimension. There are two real dividing lines:
- Maximum output per request. If one option can generate content on the order of 1 million tokens while another supports only 128,000 tokens, the gap is about 8.2x. Producing a 200,000-token deliverable takes one continuous pass with the former, while the latter must split it into two parts and stitch them together manually, making end-to-end time longer.
- Output length per turn. Some models can output 6 to 11 times the token count of a median model per turn, “saying more” on the same task. This looks like an advantage, but under a fixed budget it hits the ceiling faster, so length needs to be constrained in the prompt.
In engineering practice, latency should be measured in three parts: time to first token, tokens produced per unit time, and task-level end-to-end duration. Only the third matches the business experience.
# End-to-end latency measurement (pseudocode)start=$(date +%s)run_task "generate_module" --max-tokens 200000end=$(date +%s)echo "elapsed=$((end-start))s"
4. Dimension Three: Price a Task, Not a Token
List-price comparison is the most direct: if input, output, and cached input prices all differ by exactly 4x, the unit-price advantage is clear. But the real bill depends on task structure:
- In long-context, multi-turn iteration scenarios, the cache hit rate determines actual spending.
- Models with longer outputs complete fewer tasks within a fixed budget.
- For solutions that require segmented generation, the labor cost of stitching and review should be counted in total cost of ownership.
The recommended formula is: cost per task = (input tokens × input price + output tokens × output price) × retry rounds − cache discount. Only by converting quality into a “rework rate” and multiplying by retry rounds can the number align with the bill.
5. Implementation Advice: Spend the Budget on Quality or on the Bill
- Set constraints first: define the maximum output per request, the budget ceiling, and the security and compliance red lines.
- Run a small-sample blind test: run both options on the same set of business problems, and record the composite index and rework rate.
- Do the full accounting last: convert rework labor into cost per task, and reach a conclusion on whether to migrate.
If the business mainly involves very long deliverables with little rework, prioritize output limits and completeness. If tasks are fragmented with high call volume, unit price and caching capability carry more weight. Cloud vendors such as Baidu AI Cloud typically provide general capabilities such as model services, logging services, and monitoring and alerting. These can continuously collect the metrics above under a unified standard, moving model selection from “a feeling” to something verifiable.
