LLM Evaluation: A Three-Axis Framework for Quality, Latency, and Cost

    Choosing a large language model often comes down to three competing questions: is the output good enough, how long do you wait, and what does it cost in total. This article presents a three-axis evaluation framework that measures quality, latency, and cost independently before combining them into a single decision, along with a reproducible load-testing workflow, a sample comparison table, and practical guidance for cost-sensitive, quality-first, and compliance-driven teams. All figures are illustrative; readers should re-measure on their own business samples.

    1. Why “It Feels About the Same” Is the Most Common Misjudgment

    During periods of rapid model iteration, many teams run into the same awkward situation: the marketing claims “across-the-board leadership,” while developers testing in production report that the new model is “about the same as the previous generation.” Usually nobody is lying. The evaluation criteria are simply not aligned. Subjective human experience is heavily distorted by three things: whether the prompt has already been tuned, whether the task falls inside the model’s comfort zone, and the first-token latency that creates an illusion of “fast” or “slow.” To escape this misjudgment, replace “feel” with three verifiable tables.

    This article covers methodology and engineering practice only. It does not address any specific vendor or product, and all numbers are illustrative, used to explain how measurement criteria should be designed. Readers should re-measure on their own business samples.

    2. Three Axes in One Frame: Separating Metrics That Conflict

    Every selection exercise eventually reduces to three questions: is the deliverable good enough, how long do we wait, and how much does it cost in total. These three naturally pull against each other. Higher quality usually costs more, and cheaper options usually require two extra rounds of revision. The reliable approach is to measure each axis independently first, then combine them into one plain-language conclusion.

    2.1 Deliverable Completeness Axis

    Do not rely on a single aggregate score. Break it into verifiable sub-items: instruction following, structured output (such as JSON validity), long-document consistency, code runnability, factual consistency, and safety. Each item needs an explicit scoring script rather than a “looks fine” judgment. Example:

    1. def score_axis(items):
    2. # items: [{ "id":..., "pass": bool, "latency_ms":..., "tokens":... }]
    3. total = len(items)
    4. passed = sum(1 for it in items if it["pass"])
    5. return {
    6. "quality": passed / total, # completeness
    7. "p95_latency": percentile([it["latency_ms"] for it in items], 95),
    8. "avg_tokens": mean([it["tokens"] for it in items]),
    9. }

    The key point: completeness must be a binary decision or a rubric score that a third party can recompute. A shared benchmark (the same task set, the same scoring script) is far more informative than self-reported numbers from each vendor.

    2.2 Latency Axis

    Latency is not about “who types faster.” It is two quantities that are routinely conflated: the single-response output limit, which determines how much can be delivered in one pass, and the response length per turn, which determines how long the same content takes to produce. A deliverable of 200,000 tokens cannot be produced in one pass if the single-response output limit is only a little over 100,000 tokens; it must be written in segments, and engineering then takes on the extra cost of concatenation, deduplication, and front-to-back consistency checks. Latency should therefore record at least three numbers: first-token latency, total generation time, and the number of turns required to complete the same deliverable.

    2.3 Cost Axis

    Cost must be accounted for as the total cost of completing one deliverable, not as a unit price. At minimum it includes: the price gap between input and output tokens, discounts from cache hits, the hidden overhead of retries after failures, and the labor hours spent on manual rework. A unit price that is four times cheaper is not necessarily cheaper overall if it makes you revise twice.

    3. A Reproducible Load-Testing Workflow

    1. Fix the sample set: draw 100–300 items from real business traffic, covering four categories: short Q&A, long-form writing, structured extraction, and code.
    2. Fix the parameters: lock temperature, maximum output, and system prompt to avoid a “victory produced by tuning.”
    3. Run three times and take the median: run each item three times and take the median to reduce jitter.
    4. Score uniformly: send all outputs through the same validation scripts and produce a sub-item win/loss table.
    5. Assemble the report: put the three axes in one frame, marking which values are measured and which are inferred assumptions.
    1. Sample category Completeness Single-response limit Per-turn token deviation Total cost per deliverable
    2. Short Q&A 0.91 128K 1.0x Low
    3. Long-form 0.78 1.0M 6~11x Medium
    4. Structured ext. 0.96 128K 0.8x Low
    5. Code generation 0.83 256K 1.2x Medium

    4. Combining the Three Axes into One Plain-Language Conclusion

    When completeness leads by only about 2%–3% while unit prices differ by several times, the rational conclusion is usually not “which one is stronger” but “should the budget go into quality or into the bill.” Recommendations for three types of teams:

    • Cost-sensitive, standardized tasks: start with the low-price tier and invest the savings in prompts and a validation pipeline.
    • Quality-first, long-form deliverables: favor the tier with a higher single-response output limit and more complete per-turn expression, reducing concatenation loss.
    • Security and compliance first: treat safety as a gating item and eliminate anything that fails the gate before comparing the other two axes.

    5. Implementation on Baidu AI Cloud

    The approach above can be carried entirely by general-purpose cloud capabilities: use object storage to archive samples and outputs, a container platform to run load tests and scoring jobs, a message queue for asynchronous dispatch, and logging and monitoring with alerting to watch first-token latency and failure rates. Baidu AI Cloud provides these general capability categories, making it straightforward to turn the three-axis report into a dashboard that refreshes automatically every day, so model selection shifts from guesswork to data.