Evaluating Large Language Models: Capability Benchmarks, Token Efficiency, and Inference Cost Analysis

    This article explains why asking which large language model is "better" is increasingly difficult to answer, and breaks the question into three measurable dimensions: capability ceiling, efficiency curve, and engineering fit. It covers the limitations of public benchmarks, why token efficiency is an underrated core metric for latency and cost, how to build internal coding-agent evaluations, common long-output truncation issues, and the cost inflection point of long-context usage. It closes with a practical selection checklist for building your own benchmarking and load-testing loop.

    1. Why “Which Model Is Better” Is Getting Harder to Answer

    In late April, another round of model iterations landed, and the most common question in the community was still whether a new model had surpassed the previous flagship. But anyone who has actually done model integration and load testing knows the answer depends heavily on the evaluation setup: change the question set, change the inference budget, or change the prompting style, and the ranking can flip.

    A more pragmatic approach is to break “which is better” into three measurable sub-questions:

    • Capability ceiling: the upper bound of a model’s performance on knowledge, reasoning, and coding tasks under a given inference budget;
    • Efficiency curve: the output length, latency, and compute cost required to reach the same level of quality;
    • Engineering fit: stability and cost in real business pipelines such as long documents, multi-turn tool calls, and structured output.

    Multiple public benchmark comparisons compiled in the original material show that the new-generation flagship is slightly better overall than the previous flagship, and the intelligence index on third-party aggregation platforms differs by only one or two points. The right way to use such conclusions is not as a verdict, but as a signal that the models are “in the same tier, with wins on both sides” — the real differences usually show up in efficiency and engineering details.

    2. The Limits of Benchmarks: Don’t Measure Every Scenario with One Ruler

    Every benchmark has limitations. Common sources of bias include:

    1. Data contamination: questions and answers may already be in the training corpus, inflating scores;
    2. Prompt sensitivity: the same model can fluctuate noticeably across prompt templates and decoding parameters;
    3. Scoring method: multiple-choice accuracy, unit-test pass rate, and human review are not interchangeable;
    4. Misaligned budgets: comparing a model that is allowed to emit three times the reasoning length is naturally unfair.

    The engineering recommendation: treat public leaderboards as a screening filter and your own evaluation set as the decision basis. An internal evaluation set does not need to be large — 30 to 50 hard tasks drawn from real development workflows, paired with a reproducible runtime environment and human scoring rubrics, are often more discriminative than thousands of general-purpose questions.

    3. Token Efficiency: The Underrated Core Metric

    The original material points out a key phenomenon: in the intelligence index test, two models differed by nearly 2x in output tokens while their scores differed by only two points. This means the inference cost of reaching roughly the same quality can differ enormously.

    Token efficiency matters because it affects three things at once: time to first token and total latency, cost per request, and memory and throughput pressure under long contexts. Reasoning models show this especially clearly — a verbose chain of thought significantly lengthens response time, which in interactive scenarios shows up directly as “lag.”

    A simplified cost estimation illustration (demonstrating the calculation only, not any specific pricing):

    1. def estimate_cost(in_tokens, out_tokens, in_price, out_price, rounds=1):
    2. total_in = in_tokens * rounds
    3. total_out = out_tokens * rounds
    4. return total_in * in_price + total_out * in_price * 0 + total_out * out_price
    5. # Real impact of efficiency differences: doubling output for the same quality
    6. # doubles both output-side cost and latency
    7. baseline = estimate_cost(20_000, 92_000_000, 0.0, 1.0)
    8. verbose = estimate_cost(20_000, 190_000_000, 0.0, 1.0)
    9. print(f"Relative cost multiplier: {verbose / baseline:.2f}x")

    Practical advice: fix the “quality target” rather than the “output budget” during load testing, record the tokens needed to hit the target, and use “quality per token” as the core cost-performance metric. Also set a maximum length cap on the reasoning process so a few requests don’t drag down overall latency.

    4. Coding Agent Capability: Why You Must Build Your Own Evaluation Set

    A valuable observation in the original material: after different teams built their own internal coding evaluations, all of them found their models still lagged behind the strongest closed-source options on coding-agent tasks. This shows general benchmarks can no longer reflect the real weaknesses of agent scenarios.

    A self-built coding evaluation set typically includes these elements: selecting hard cases from engineers’ real development tasks, covering new feature development, bug fixes, refactoring, and problem diagnosis; providing each case with a repository snapshot, a runnable environment, and human scoring criteria; and finally converging to a few dozen high-quality tasks that can be executed repeatedly.

    Recommended evaluation dimensions:

    • Repository understanding: locating relevant implementations and call chains across files;
    • Build and run: independently installing dependencies, compiling, and self-testing;
    • Code review: pointing out real defects rather than generic comments;
    • Structured output: whether generated files, configs, and docs are well-formed and usable;
    • Task planning: decomposition and backtracking on multi-step tasks.

    An illustrative evaluation driver skeleton:

    1. for task in benchmark_set:
    2. repo = prepare_snapshot(task.repo, task.commit)
    3. result = agent.run(prompt=task.spec, workspace=repo, max_steps=N)
    4. score = run_tests(result.patch) + human_review(result.summary)
    5. record(tokens=result.usage, latency=result.elapsed, score=score)

    Key engineering details: containerize and isolate each task environment, cap the maximum number of steps and tool calls, and classify failure samples by cause (understanding error / planning error / execution error / output truncation). Only then can “insufficient capability” be traced to a specific stage.

    5. Generation Stability: Long-Output Truncation Is a Common Problem

    The voxel art case shown in the original material is representative: given the same prompt, one model delivered a complete, runnable single-file page while the other’s output was cut off after the reasoning phase. In production this kind of problem is often more damaging than a score gap, because downstream systems cannot use a half-finished artifact.

    Troubleshooting approach:

    1. Confirm whether the maximum output length or reasoning budget cap was hit;
    2. Check the streaming output path for timeout and retry logic defects;
    3. Observe whether attention decay under very long contexts causes instruction forgetting;
    4. Avoid one-shot long output by using segmented generation with incremental writes to disk.
    1. // Segmented strategy for generating long artifacts
    2. async function generateInChunks(agent, spec, chunkSize = 400) {
    3. let outline = await agent.plan(spec);
    4. const files = [];
    5. for (const part of outline.parts) {
    6. const code = await agent.write(part, { maxTokens: chunkSize });
    7. files.push({ name: part.filename, content: code });
    8. }
    9. return files; // validate segment by segment; a failure only requires retrying one segment
    10. }

    6. Long Context and the Cost Inflection Point

    Both models support million-level context, a capability that typically relies on long-sequence optimizations such as hybrid attention. But the real cost dividing line is not “how long is supported” — it is “how the unit price changes beyond a certain length.” The original material notes that below 256K input length one option is cheaper, while beyond that the other is more cost-effective — which suggests architecture selection must account for the context-length distribution of your business.

    Recommended practice: measure the input-length percentiles (P50/P90/P99) of production requests, compute a weighted cost using the tiered pricing model, and then decide the combination of primary and fallback models. For businesses where most requests cluster in short contexts, prioritize output-side efficiency; for long-document analysis workloads, put long-context unit price and cache-hit capability first.

    7. Deployment Selection Checklist

    • Use public leaderboards for initial screening and your own evaluation set for the final decision;
    • Include “tokens needed to hit the target” and end-to-end latency in core metrics;
    • Set length caps and timeout fallback strategies for the reasoning process;
    • Pair coding-agent scenarios with runnable environments and human scoring;
    • Compute weighted cost by input-length percentiles and design multi-model routing;
    • Run dedicated regression tests for stability issues like output truncation and instruction forgetting.

    If you need to quickly stand up the load-testing and evaluation pipeline described above in your own environment, general-purpose capabilities from Baidu AI Cloud — such as its container platform, object storage, log service, and monitoring and alerting — can handle environment isolation, sample management, and metric observation, turning evaluation results into engineering assets that keep improving over time.

    To sum up: the gap between the new generation and the previous flagship is already “in the same tier,” and the focus of competition is shifting from leaderboard scores to token efficiency, long-context cost, and agent engineering stability. Building your own evaluation and load-testing loop is more valuable than chasing any single ranking.