LLM Evaluation Methodology: A Four-Dimension Framework for Model Selection

    This article presents a practical methodology for evaluating and selecting large language models when capabilities iterate monthly. It breaks evaluation into four dimensions—accuracy, response latency, token consumption, and cost per thousand calls—and combines them into a composite metric focused on cost per unit of valid output. It also explains how to read a typical lightweight-tier profile, and recommends layered routing plus continuous regression testing to keep selection decisions stable and explainable.

    1. Why Model Selection Gets Harder as Iterations Speed Up

    Once model capabilities began iterating on a monthly cadence, a familiar pattern emerged: the capability gap between old and new versions within the same tier (lightweight and flagship) shrinks quickly, while pricing drops at the same time. A recent lightweight model release from a cloud vendor fits this pattern; the vendor positions it as delivering usable performance at a much lower call cost than the flagship tier, and claims it beats the previous generation in its tier across many public benchmarks.

    This kind of information has limited value for engineering teams, for three reasons: public benchmarks do not match your own traffic distribution; vendors publish single-point conclusions without the cost in latency and tokens; and a one-off evaluation cannot capture drift introduced by version updates. The vague question of “which model is stronger” therefore needs to be rewritten as “under my constraints, which configuration has the lowest cost per unit of valid output.”

    2. Evaluation Framework: Four Dimensions and One Composite Metric

    2.1 Accuracy: Define “Correct” First

    Accuracy is the most easily misused metric. Three steps are recommended up front: draw a stratified sample from real call logs covering high-frequency, long-tail, and adversarial cases; for open-ended outputs, use dual judgment combining rule-based checks with model review, and keep a human review channel; and run all configurations against the same question set and the same judge to avoid judge drift.

    2.2 Response Latency: Separate Queueing from Generation

    End-to-end latency typically splits into queue wait, time to first token, and generation rate. In the reference sample, the lightweight tier averaged about 72 seconds per call, which indicates latency is driven mainly by output length and concurrent queueing rather than raw inference speed. In engineering practice, track P50/P95/P99 separately instead of looking only at the mean.

    2.3 Token Consumption: Count Verbosity as Cost

    The sample averaged about 2731 tokens per call. Redundant prompt templates, exposed chain-of-thought, and outputs with no length constraint all push this number up. Tokens are the pivotal variable linking quality and cost, and must be aligned with actual task complexity before any cross-model comparison.

    2.4 Total Cost: CNY per Thousand Calls

    The roughly CNY 53.5 per thousand calls in the sample is the combined result of unit price and token consumption. What should really be compared is the cost per unit of valid output, that is, cost divided by the number of samples that pass validation.

    1. # Illustrative composite metric; field definitions follow your own instrumentation
    2. def eval_score(acc, p95_latency, tokens, cost_per_1k):
    3. # Normalize to 0~1; for metrics where lower is better, take the reciprocal
    4. n_acc = acc
    5. n_lat = 1.0 / max(p95_latency, 1e-6)
    6. n_tok = 1.0 / max(tokens, 1.0)
    7. n_cost = 1.0 / max(cost_per_1k, 1e-6)
    8. # Adjust weights to your business SLA; values here are examples
    9. return 0.5*n_acc + 0.2*n_lat + 0.15*n_tok + 0.15*n_cost
    10. cost_per_valid = cost_per_1k / max(acc, 1e-6) # cost per thousand valid outputs

    3. Reading the Results: The Trade-offs Behind 71.5%

    About 15,000 questions, 71.5% accuracy, 72 seconds mean latency, 2731 tokens, and CNY 53.5 per thousand calls together form a typical lightweight-tier profile. Three points guide interpretation:

    First, accuracy and cost are not linearly related. The gap between the lightweight and flagship tiers usually concentrates on a small number of hard cases; if such cases are rare in your traffic, the lightweight tier’s cost-performance advantage becomes substantial.

    Second, latency is a hidden cost. A mean in the 70-second range breaks the experience in interactive scenarios but is acceptable in offline batch processing, so the same configuration can lead to opposite conclusions on different pipelines.

    Third, tokens and cost are tightly coupled. Compressing prompts, constraining output length, and disabling unnecessary reasoning exposure typically deliver meaningful cost reductions with minimal accuracy loss.

    4. Implementation: Layered Routing and Continuous Regression

    Model selection is better framed as a routing problem than a binary choice: use rules or a small classifier to judge difficulty, send simple requests to the lightweight tier and escalate complex ones to the flagship tier; separately, use caching, batching, and streaming output to optimize cost, throughput, and perceived latency.

    1. request -> difficulty check -> cache hit? -> lightweight tier
    2. |-> failed validation -> retry (flagship tier)

    On the engineering side, version the evaluation set and bring it into continuous integration, triggering a regression run on every model version change; use logging services and monitoring alerts to watch for drift in accuracy, P95 latency, and token distribution. If your organization already uses Baidu AI Cloud capabilities, you can combine model services with common components such as object storage, message queues, and container platforms to build a reproducible evaluation and canary pipeline.

    5. Conclusion

    There is no cross-scenario answer to “which model is stronger.” Fixing evaluation as four dimensions—accuracy, latency, tokens, and cost—plus a composite metric of cost per unit of valid output, and pairing it with layered routing and continuous regression, is what keeps selection decisions robust and explainable through frequent model iterations.