Evaluating LLM Token Efficiency and Agent Capabilities Across Model Iterations

    This article presents a practical evaluation framework for large model version iterations across three dimensions: base intelligence, resource efficiency, and agent execution quality. It explains how to measure token efficiency, throughput, and task latency under controlled settings; design layered agent task suites; add an external visual feedback loop; assess the trade-offs of parallel tool calls and centralized self-testing; and translate evaluation results into production routing, budget guardrails, determinism, and observability. The central recommendation is to avoid misleading single scores and judge cost and quality by distributions rather than averages.

    1. Starting Point: Why a Version Iteration Deserves a Fresh Evaluation

    As large model capabilities move into the agent era, the criteria for evaluating version iterations have changed. In the past, the focus was on single-turn question-answering accuracy. Now the question is whether a model can reliably deliver in long-chain tasks. In an iteration from a preview release to a general-availability release, it is common to see two curves move at the same time: token consumption per task decreases, while task completion quality shows new divergence.

    Such changes cannot be summarized simply as “stronger” or “cheaper.” A more rigorous approach is to split the evaluation target into three dimensions that are independent yet constrain one another: base intelligence, resource efficiency, and agent execution quality. An improvement in any one dimension may come at a cost in another. The value of evaluation is to make that cost explicit.

    2. Quantifying Cost Reduction: Token Efficiency, Throughput, and Task Latency

    2.1 Token efficiency is not the same as unit price

    At the same price tier, what really determines cost is the total number of tokens consumed to complete the same task. Three easily confused concepts need to be distinguished:

    • Token efficiency: the total input plus output tokens required to complete a task of equivalent quality; lower is better.
    • Throughput: the number of tokens generated per unit time, commonly measured as output tokens per second, which determines perceived speed.
    • Task latency: the wall-clock time from task submission to a usable deliverable, which is the final result of the first two factors combined with tool calls and retries.

    A model can have excellent token efficiency but low throughput, or high throughput but longer total time because of repeated trial and error. Therefore, an evaluation table should present at least these three columns rather than a single overall score.

    2.2 Fix the measurement protocol

    Token efficiency comparisons must lock down variables; otherwise, conclusions are not reproducible. Recommended fixed settings include: system prompt version, sampling parameters such as temperature, maximum output length, tool set and tool descriptions, and whether prompt caching is enabled. An illustrative statistics snippet is shown below:

    1. def run_once(task, model_client, tools):
    2. usage = {"prompt": 0, "completion": 0, "cached": 0}
    3. messages = [{"role": "system", "content": SYSTEM_PROMPT_V3}]
    4. for step in range(MAX_STEPS):
    5. resp = model_client.chat(messages=messages, tools=tools)
    6. u = resp.usage
    7. usage["prompt"] += u.prompt_tokens
    8. usage["completion"] += u.completion_tokens
    9. usage["cached"] += getattr(u, "prompt_cache_hit_tokens", 0)
    10. if not resp.tool_calls:
    11. break
    12. messages.append(resp.message)
    13. messages.extend(apply_tools(resp.tool_calls))
    14. return {"usage": usage, "steps": step + 1}

    The key is to track cache hits separately. With prefix caching enabled, billed input tokens can differ significantly from actual computation volume. Without separating them, cross-model comparisons become distorted.

    3. Quantifying Effectiveness: Designing the Agent Task Set

    3.1 Layer tasks so a total score does not hide weaknesses

    A single total score is the easiest way to hide problems. It is recommended to divide the task set into four layers and score each layer separately:

    1. Basic reasoning and code understanding: algorithm problems, code localization, cross-file refactoring.
    2. Frontend and page generation: medium-difficulty webpage restoration, testing information filling, whitespace, and hierarchy.
    3. Multimodal and graphics tasks: 2D drawing, vector graphics, 3D scene construction.
    4. Debugging and repair: given failing cases, locate the root cause and fix it.

    After layering, a model’s imbalance—for example, “frontend close to the top tier, graphics barely usable”—becomes immediately visible. Imbalance is not a defect in itself, but it determines which types of tasks the model should be routed to.

    3.2 Generalization requires unfamiliar tech stacks

    A common mistake in evaluation sets is to place all tasks in familiar tech stacks. It is advisable to deliberately keep a proportion of low-frequency frameworks, niche libraries, and internal private conventions, and observe whether the model retrieves first and then writes or writes from memory. The former takes more time but has more stable correctness; the latter is faster but riskier. This should be recorded as an independent metric rather than mixed into the total score.

    4. Visual Feedback Loop: The Most Easily Overlooked Agent Weakness

    Failures in graphics and page tasks often do not come from coding ability but from a missing self-check channel. Typical symptoms include model clipping in 3D scenes, misaligned element proportions, and texture mapping errors. These problems could be found with a single screenshot review, but the model does not proactively review its output, so it delivers errors.

    The engineering response is to externalize visual validation rather than rely on spontaneous model behavior:

    1. generate artifact -> headless browser render -> screenshot -> vision model/rule check -> issue list reinjection -> regenerate

    Checks can be rule-based, for example: out-of-bounds element ratio, overlap area, blank area ratio, and console error count. Making “looking at the image” a deterministic step in the pipeline is more reliable than expecting the model to do it on its own.

    5. The Cost of Efficiency Optimizations: Parallel Calls and Self-Test Strategy

    Two efficiency optimizations common in general-availability iterations deserve separate discussion.

    Parallel tool calls. The model initiates multiple tool calls in one request. The average number of tools called per request rises, the number of chain rounds decreases, and latency drops. Implementation requires framework support for concurrent execution and backfilling results in call order:

    1. results = await asyncio.gather(*(run_tool(c) for c in resp.tool_calls))
    2. messages.append(tool_results_in_order(resp.tool_calls, results))

    Centralized self-testing. Compared with “test a little, fix a little,” centralized testing and centralized fixing can significantly reduce rounds. However, both optimizations rest on one premise: the model has enough base intelligence to write and fix correctly in one pass. If that premise does not hold, reducing testing directly increases delivery quality variance—the mean may remain unchanged or even improve, while the worst case becomes clearly worse.

    Therefore, an evaluation report must provide distributions, not just means. At minimum, record: first-pass rate, median repair rounds, and failure patterns of the worst 5% of tasks.

    6. Production Recommendations: From Evaluation to Deployment

    • Graded routing: distribute requests by task layer to different tiers or models. Route graphics and debugging tasks to stronger models, and frontend and routine generation tasks to the high-efficiency tier.
    • Budget guardrails: set token and round limits per task. When limits are exceeded, downgrade or escalate to a human to prevent long-tail tasks from consuming the cost benefits.
    • Determinism first: place rendering, screenshots, rule validation, and caching in the framework layer to reduce fluctuations caused by model uncertainty.
    • Observability: use logging services and monitoring/alerting systems to collect per-task tokens, rounds, tool call counts, and failure types, forming a sustainable regression evaluation pipeline.
    • Platform support: generic capabilities such as model serving, containerized runtime environments, object storage, and message queues can be combined on Baidu AI Cloud to support the evaluation and gradual rollout workflows described above; specific choices should be based on the official documentation and actual load testing.

    7. Conclusion

    Evaluating a model iteration is essentially answering three questions: whether cost per task has truly decreased, which task layers receive capability gains, and whether efficiency optimizations come at the cost of quality variance. Putting token efficiency, throughput, task latency, and layered task scores in the same table—and completing the visual self-check loop—helps avoid being misled by a single overall score. Whether cost reduction and efficiency gains hold is ultimately determined by the distribution, not the mean.