LLM Selection Evaluation: From Leaderboard Scores to a Custom Eval Set
Choosing a large language model for engineering work can't be reduced to a single "who scores higher" question. This article breaks model capability into independently measurable dimensions, explains what aggregate leaderboard scores do and don't tell you, and treats token efficiency as a first-class criterion alongside raw capability. It then lays out a practical methodology for building a private, coding-focused evaluation set—sourcing tasks from real development events, layering difficulty, freezing reproducible environments, combining automated and human scoring, and running an isolated agent-based pipeline. Readers come away with a repeatable framework for making model-selection decisions grounded in their own workloads rather than in public rankings.
1. Start by decomposing “who is stronger”
Every time a new model ships, the conversation collapses into a single question: whose score is higher? From an engineering-selection standpoint, that question is underspecified. Capability level, response latency, cost per task, tool-calling reliability, and instruction-following under long context are five different things. They rarely move in lockstep within a single model, so any attempt to rank them with one scalar throws away information precisely when you’re trying to make a decision.
The more practical approach is to break “model capability” into dimensions you can measure independently, first establish how sensitive your business is to each one, and then fill in the table with evaluation data. The three most-overlooked dimensions discussed here are aggregate leaderboards, token efficiency, and a custom evaluation set.
2. Aggregate leaderboard scores: what they mean and what they don’t
An aggregate metric like an “intelligence index” is fundamentally a weighted combination of normalized results across several benchmarks. Its value is that it provides a coarse horizontal reference frame—it lets you say something defensible about where a model roughly sits overall. When models in the same leaderboard land in the same score band, it usually means their capability profiles are similar with different weak spots, not that they’re interchangeable.
But it has three inherent limits:
Construction dependence. Weight settings, the choice of benchmarks, and the reference ranges used for normalization all affect the final ranking. When scores differ by only a position or two, the gap often falls within measurement noise and can’t support a “stronger” conclusion.
Task-distribution mismatch. The problem shapes, dependency versions, and code sizes in public benchmarks usually differ systematically from your real production distribution. Leaderboards test whether a model “can do this kind of problem”; your business cares about whether it “can get the job done in my repository.”
Incomplete dimension coverage. Leaderboards rarely capture tool-calling stability, state-keeping across multi-turn tasks, or retrieval-and-localization over very large repositories—which are exactly where agent-style applications tend to fail.
The conclusion is clear: use leaderboards to build a shortlist, not to make the final decision.
3. Token efficiency: a second dimension alongside capability
At the same or comparable capability level, the number of tokens consumed to complete the same batch of tasks directly determines cost per task, end-to-end latency, and concurrent throughput. A common observation: one model has a higher overall score, yet emits close to several times the tokens of another model to complete the same evaluation tasks. This is usually not a capability gap but a reasoning-strategy difference—longer chains of thought and more thorough self-checking, paid for in latency and cost.
For cost-sensitive online services, this dimension often matters more than a percentage point or two of score. You can quantify it with a simplified metric:
# Illustrative metric definitions for horizontal comparison over the same task setdef efficiency(task_scores, output_tokens, input_tokens,price_in_per_mtok, price_out_per_mtok):quality = sum(task_scores) / len(task_scores) # average task scoretokens = output_tokens + input_tokens # total token consumptioncost = input_tokens / 1e6 * price_in_per_mtok \+ output_tokens / 1e6 * price_out_per_mtokreturn {"tokens_per_point": tokens / max(quality, 1e-6), # token cost per score point"cost_per_task": cost / len(task_scores), # average cost per task}
The key constraint is that you must compare under the same task set and the same sampling parameters. If temperature, maximum thinking budget, or retry count differ at all, the “who uses fewer tokens” conclusion can flip. In practice, fix a set of parameters as a baseline and record them alongside the evaluation report; otherwise the data isn’t reproducible.
4. Why build a custom evaluation set
Three reasons, in order of importance:
- Contamination. The problems and answers in public benchmarks have almost certainly entered training corpora, so their scores are systematically inflated.
- Distribution drift. A model’s iteration direction is set by the vendor’s target scenarios, and your tech stack, coding standards, and internal frameworks may not be in their optimization sights.
- High, irreversible cost of a wrong decision. Adopting a model touches your prompt system, tool protocols, cost controls, and regression tests—switching models later costs far more than building an evaluation set once.
One notable industry pattern: several labs have found in internal evaluations that their own models still trail the few frontier systems on agent-style complex coding tasks, while the gap is much smaller on routine Q&A and unit-test generation. This shows that “coding ability” isn’t a monolithic whole and needs to be evaluated in layers by task type.
5. A methodology for building a coding evaluation set
5.1 Task sourcing: start from real development events
Don’t invent problems by hand. A workable approach is to collect material from your team’s recent development workflow: feature requests, bug tickets, code-review comments, refactoring records, and postmortems of production incidents. After desensitization and removal of internal dependencies, these form a candidate pool.
As an example of this practice, the process roughly goes: pre-screen about two hundred high-difficulty candidates from the real development tasks of dozens of engineers, covering four scenarios—feature development, bug fixing, refactoring, and problem diagnosis—then select thirty high-quality samples as the formal evaluation set. The number doesn’t need to be large; quality density matters far more than sample size. Each sample needs a matching repository snapshot, a reproducible runtime environment, and human-written scoring criteria.
5.2 Difficulty layering: give the eval discriminating power
If every task is easy, all models approach a perfect score and the eval loses its ability to distinguish. A three-tier design is recommended:
| Tier | Characteristics | Purpose |
|---|---|---|
| L1 Basic | Single file, local change, clear failure signal | Verify basic usability and format adherence |
| L2 Complex | Cross-module, requires reading multiple files to locate, requires inferring intent | Distinguish primary candidate models |
| L3 Hard | Implicit defects, requires refactoring or architectural judgment, partially missing information | Probe the capability ceiling |
5.3 Environment freezing: reproducibility is the prerequisite
Every task must go from scratch to a verifiable state with one command. It’s best to declare environment dependencies as code, versioned along with the task:
# Specification for a single evaluation task (illustrative)task_id: fix-pagination-offset-001category: bugfixdifficulty: L3repo_snapshot: repos/service-a@a1b2c3dsetup:runtime: "python:3.12"install: "make bootstrap"timeout_seconds: 900acceptance:- type: testcommand: "pytest tests/pagination -q"must_pass: true- type: testcommand: "pytest tests -q --deselect tests/pagination"must_pass: true # guards against "fixed the target but broke something else"human_rubric: rubrics/pagination.mdmax_agent_steps: 80
The must_pass regression gate here is especially important: looking only at whether the target test passes rewards blunt fixes that break other behavior.
5.4 Scoring: combine automated judgment with human rating
Use a two-track approach. Verifiable items (test pass rate, build success, static-check results) are judged automatically; subjective items (whether the change is minimal, whether it follows existing layering and naming conventions, whether leftover debugging code remains) are scored by humans against pre-written rubrics. The human rubric must be finalized before the eval runs, to avoid “tuning the standard to fit the results.”
5.5 Dimensions designed for agents
Coding tasks in an agent setting are a completely different capability from “completing a snippet of code.” It’s worth covering at least these dimensions:
- Repository understanding: locate relevant modules in an unfamiliar codebase and judge call relationships and blast radius;
- Project build: identify the build system, resolve dependencies and environment issues, and take a project from unrunnable to runnable;
- Code review: find real defects and convention violations in a given change, rather than nitpicking mechanically;
- Structured artifact generation: produce strictly format-constrained outputs such as configs, interface definitions, and migration scripts;
- Task planning: decompose a vague requirement into ordered steps and reasonably decide when to converge and when to ask;
- Software-engineering discipline: keep changes restrained and consistent with the existing architecture and code style.
5.6 A minimal evaluation pipeline
def run_eval(tasks, agent, verifier, workers=4):records = []for task in batch(tasks, workers):env = build_env(task) # isolated container/sandbox, fully separated between taskstry:trace = agent.run(task.prompt, env, max_steps=task.max_agent_steps)checks = verifier.run(task.acceptance, env)auto = score_auto(checks) # automated checksexcept Exception as e:trace, auto = None, {"error": str(e)}finally:destroy_env(env) # reclaim resources regardless of success or failurerecords.append({"task_id": task.task_id,"difficulty": task.difficulty,"auto": auto,"tokens_in": trace.usage.input_tokens if trace else 0,"tokens_out": trace.usage.output_tokens if trace else 0,"steps": trace.steps if trace else 0,"trace_path": dump_trace(trace), # keep the trace for human review and attribution})return aggregate(records)def aggregate(records):out = {}for level in ("L1", "L2", "L3"):subset = [r for r in records if r["difficulty"] == level]if not subset:continueout[level] = {"pass_rate": mean(r["auto"].get("pass", 0) for r in subset),"avg_tokens": mean(r["tokens_in"] + r["tokens_out"] for r in subset),"avg_steps": mean(r["steps"] for r in subset),}return out
A few engineering rules are non-negotiable: fully isolate the environment between tasks to avoid cache and state bleeding; keep complete execution traces, because failure attribution is more valuable than the failure rate; set step and time limits, or a single task can drag down the whole run; and fix random seeds and sampling parameters so results are comparable across rounds.
6. How to read the results correctly
Evaluation conclusions should be written as a three-dimensional comparison, not a one-line ranking. A typical output shape: candidate models are generally near-saturated at L1; clear tiers emerge at L2; at L3 most models still trail the small group of strongest systems significantly, with the gap concentrated in planning and self-correction on long-chain tasks. Meanwhile, if one model consumes only half the tokens of the control group at a comparable score, it may actually be the better engineering choice in cost-constrained online scenarios.
This leads to a few selection principles:
- Leaderboards for the shortlist; a custom eval set for the final decision;
- Evaluate capability and token efficiency side by side, with the weight determined by your cost structure;
- Layer the eval set and base the decision on L2/L3, not on the already-saturated L1;
- Treat execution traces as first-class artifacts to preserve—they’re the only reliable basis for later optimizing prompts, tool protocols, and workflow orchestration.
One last point deserves honesty: on agent-style complex software-engineering tasks, an observable gap remains between mainstream Chinese models and the international frontier, a finding independently confirmed in multiple vendors’ internal evaluations. Treating that gap as input for continuous iteration—rather than as an argument over any single ranking—is the posture that genuinely serves technical selection.
