How to Evaluate LLM Capabilities: Dimensions, Methods, and Token Efficiency

    Choosing between large language models requires more than a single benchmark score. This article explains why aggregate rankings are noisy and insufficient, how to interpret public leaderboards, and why Token efficiency (intelligence per token) matters for cost, latency, and context budget. It also covers building a separate evaluation set for coding agents, handling long-context and structured-output failures, tiered pricing by input length, and a practical six-step selection workflow that moves from public benchmarks to internal test sets and production canary testing.

    1. Why “Which Model Is Better” Cannot Be Answered by a Single Score

    When model capabilities iterate quickly, the common debate is which of two models is stronger. From an engineering standpoint, a single aggregate score can hardly support a selection decision, for three reasons:

    1. Evaluation goals differ: general knowledge Q&A, long-context understanding, code generation, and agentic tasks probe very different capability dimensions. One aggregate score compresses those dimensions into a single scalar and loses critical information.
    2. Cost structures differ: to complete the same task, different models may consume nearly twice as many input and output tokens. Comparing scores directly ignores output efficiency per unit of cost.
    3. Stability differs: truncation and failure rates in structured output, long tool-call chains, and very long context scenarios often determine the production experience more than the average score does.

    A more reasonable approach is to split evaluation into three layers: public benchmarks (horizontal positioning) → a self-built evaluation set (close to your business) → production canary testing (real distribution).

    2. What Public Leaderboards Can and Cannot Tell You

    The value of public evaluations (such as aggregated intelligence-index style leaderboards) is that they are reproducible and horizontally comparable. They normalize and then weight-sum multiple tests covering math, reasoning, code, and instruction following. The original text describes a phenomenon: two flagship models from the same generation differed by a very small margin in total score, 54 versus 52, and the 54 score tied for first place with another domestic flagship model.

    The correct way to read such results:

    • A gap within 2 points usually falls in the noise band. Different evaluation dates, sampling parameters, and prompt templates can all produce fluctuations of the same magnitude, so it is not sound to claim an “across-the-board win.”
    • A leaderboard is a necessary but not sufficient condition. It can show that a model has reached a certain capability level, but not that it performs better on your business data.
    • You must pay attention to the cost basis of the evaluation. On the same test set, if model A outputs about 92M tokens and model B outputs about 190M tokens, then A’s cost per point is significantly lower. This is the meaning of token efficiency (intelligence per token): it puts capability and consumption in the same coordinate system.

    A practical move is to build your own comparison table with at least these fields: total score, per-category scores, total output tokens, average latency, failure rate, and cost per task.

    1. Model tier Total score Output tokens Avg latency Failure rate Cost per task
    2. Flagship A 54 92M Low Low Low
    3. Flagship B 52 190M Higher Low Higher

    3. Token Efficiency: The Underrated Engineering Metric

    Token efficiency refers to the token consumption required to complete an equivalent task. It directly affects three things:

    • The bill: output tokens are usually billed at a higher unit price, so doubling output volume means nearly doubling cost.
    • Latency: thinking models generate a long reasoning process first; the longer the output, the higher the time to first token and the completion latency, and the worse the interactive experience.
    • Context budget: with a 1M-level context window, redundant output eats into the usable window and lowers the success rate of long-document tasks.

    Engineering means of improving token efficiency include: constraining the thinking budget, requiring “conclusion first, then evidence,” using strict mode for structured output, and summarizing long documents in segments before passing them in. Example:

    1. SYSTEM = "State the conclusion first, then support it with no more than 3 bullet points. Do not restate the question."
    2. def build_messages(question, context):
    3. return [
    4. {"role": "system", "content": SYSTEM},
    5. {"role": "user", "content": f"Context:\n{context}\n\nQuestion:{question}"},
    6. ]
    7. # Key parameters (generic naming; refer to the official documentation of the platform you use)
    8. params = {
    9. "max_output_tokens": 1024, # cap output length to suppress redundant reasoning
    10. "temperature": 0.2, # reduce randomness in evaluation scenarios
    11. }

    4. Coding Agent Capability Must Be Evaluated Separately

    One valuable observation in the original text is that when several vendors built their own coding evaluation sets, they all found that their models still lagged behind the strongest industry closed-source models in the “coding agent” scenario. This suggests that code completion and agentic coding are two different things.

    The difficulty of agentic coding lies in the long chain: understand the repository structure → locate relevant files → draft a modification plan → call tools to execute → run tests → iterate based on errors. A failure at any step causes the whole task to fail, so the evaluation set must include a runtime environment and human grading criteria.

    A reference process for building your own evaluation set:

    1. Task collection: gather tasks from real development workflows, covering four categories: new feature development, bug fixing, refactoring, and failure diagnosis.
    2. Difficulty filtering: keep high-difficulty cases that require cross-file reasoning and runtime verification; remove tasks whose answers can be retrieved directly.
    3. Environment pinning: provide each task with a repository snapshot, dependencies, and run scripts to guarantee repeatable execution.
    4. Scoring design: use a dual track of “test pass rate + human review (correctness, maintainability, minimal change).”
    5. Dimension breakdown: repository understanding, build success, code review, structured artifact generation, task planning, and software engineering conventions.
    1. task:
    2. id: refactor-auth-07
    3. category: refactor
    4. repo_snapshot: repo@a1b2c3
    5. setup: ["install_deps", "run_migration"]
    6. checks:
    7. - unit_tests_pass
    8. - lint_pass
    9. - diff_lines_le_200 # cap the change size to suppress large rewrites
    10. human_review: [correctness, maintainability]

    5. Long Context and Structured Output: Two Frequent Failure Points

    With 1M context and complex generation tasks, the most common failure is not a wrong answer but truncated output or an incomplete structure. For example, when asked to generate a creative 3D voxel scene in a single file that opens directly in a browser, you may see:

    • the body truncated after the thinking phase, with closing tags missing;
    • only a fragment of explanation, with no complete file;
    • dependence on external resources, causing failure when opened offline.

    Corresponding engineering safeguards:

    1. import re
    2. def is_complete_html(text: str) -> bool:
    3. return bool(re.search(r"<html[\s\S]*</html>", text)) and text.count("<script") == text.count("</script>")
    4. def robust_generate(client, prompt, retries=2):
    5. for _ in range(retries + 1):
    6. out = client.chat(prompt, max_output_tokens=4096)
    7. if is_complete_html(out):
    8. return out
    9. prompt += "\nThe previous output was incomplete. Output only the complete file content, with no explanation."
    10. raise RuntimeError("Structured output incomplete after multiple attempts")

    The service layer should also provide output completeness checks, automatic retry on failure, timeout fallback, and a budget circuit breaker based on token consumption.

    6. Pricing and Context Length: Do the Math by Tier

    Long-context models are usually priced in tiers: one unit price applies when input length is within a threshold (such as 256K), and the unit price rises above that threshold. So “which is cheaper” must be calculated against the real input distribution rather than the list price. A practical estimate uses actual business samples:

    1. Monthly cost ≈ Σ(input tokens_i × input unit price_i) + Σ(output tokens_i × output unit price_i)
    2. where the unit price changes by input-length tier and must be determined per request.

    The conclusion is often counterintuitive: a model with longer output can end up costing more in total even with a lower list price.

    7. A Selection Workflow You Can Actually Run

    1. Use public leaderboards to define the candidate pool (treat a gap within 2 points as the same tier).
    2. Run an offline evaluation on 100–300 business samples, recording score, tokens, latency, and failure rate.
    3. Build a separate evaluation set for the coding agent scenario, with mandatory execution and human review.
    4. Simulate cost using the real input-length distribution, calculating tier by tier per request.
    5. Run a small-traffic production canary, monitoring truncation rate, retry rate, and cost per task.
    6. Establish a quarterly re-evaluation mechanism: after a model iteration, rerun the same evaluation set to keep results comparable over time.

    8. Conclusion

    “Which one is stronger” is a question that lacks constraints. A more rigorous formulation is: under the same test set and the same cost basis, on which dimensions is a given model better, does the advantage exceed the noise band, and does it meet the engineering requirements for stability and budget. Moving evaluation from “leaderboard ranking” to a reproducible, layered evaluation system is what a technical team actually needs as a decision basis.