How to Evaluate New LLMs: Capability Testing and Engineering Practices
Evaluate newly released large language models with tests that reflect real engineering requirements, rather than relying on launch claims alone. This guide covers coding benchmarks, long-context testing, agent sandboxes, latency and cost measurement, domain-specific evaluation, and building an internal test suite for reliable model selection.
1. Why Launch Announcements Are Not Enough for Model Selection
When a new model launches, its provider typically announces capability improvements, benchmark results, and intended use cases. This information is useful, but it answers the provider’s questions—not necessarily yours. To interpret launch claims, first establish three things: which training stages the model underwent, whether the benchmarks are public and reproducible, and whether comparisons were made under equivalent conditions.
Greater compute investment during post-training often translates into improvements in instruction following, tool use, and multistep tasks. However, those gains are not distributed evenly across domains. Coding and mathematics tasks can provide clear reinforcement learning signals, while improvements in open-ended writing and domain-specific question answering are harder to quantify. Claims of “across-the-board improvements” therefore need to be verified task by task.
Evaluation data generally falls into three categories:
- Public benchmarks: Useful for comparing models, but vulnerable to test-data leakage, benchmark-specific tuning, and score saturation.
- Provider-internal benchmarks: Often closer to application requirements, but difficult for third parties to verify independently.
- Real-world workflow replays: The most persuasive evidence of practical performance, but also the most expensive to run.
For model selection, use all three sources to cross-check the results.
2. Evaluating Coding and Engineering Tasks
Coding capability is often reduced to a single pass rate. That metric can conceal important differences. Engineering evaluation should cover at least four dimensions:
- Standalone code generation: Given a function signature and specification, does the generated code pass unit tests?
- Bug fixing: Can the model locate and repair a defect in a real repository, turning failing tests into passing tests?
- Multistep execution: Can the model read files, run commands, and adjust its strategy based on the output while maintaining task state?
- End-to-end delivery: Can the model turn requirements into a merge-ready change, including additional tests, documentation updates, and consistent code style?
Long-running tasks fail differently from single-step tasks. A model may forget an earlier constraint by the fifth step or repeatedly execute the same command after a tool returns an error. Evaluation should therefore capture the complete execution trajectory, not just the final outcome.
The following illustrative framework runs an agent task in an isolated environment and records its execution trajectory:
from dataclasses import dataclass, field@dataclassclass TaskResult:task_id: strpassed: boolsteps: inttool_calls: interrors: list[str] = field(default_factory=list)def run_agent_task(agent, task, sandbox, max_steps=30):"""Run an agent task in an isolated sandbox and record its execution trajectory."""trajectory = []state = sandbox.reset(task.repo_snapshot) # Start from the same snapshot each timefor _ in range(max_steps):action = agent.next_action(task.prompt, state, trajectory)if action.type == "finish":breakobservation = sandbox.execute(action)trajectory.append((action, observation))state = observation.statepassed = task.verify(sandbox) # Verify using programmatic tests or state assertionsreturn TaskResult(task_id=task.id,passed=passed,steps=len(trajectory),tool_calls=sum(1 for a, _ in trajectory if a.type == "tool"),errors=[o.error for _, o in trajectory if o.error],)
Because generation is stochastic, run each task multiple times. Report pass rates with confidence intervals rather than presenting a single run as a definitive result.
3. Testing Long-Context Capabilities
An advertised context length describes the maximum input window. It does not establish how effectively a model can use everything within that window.
Common evaluation methods include:
- Needle-in-a-haystack retrieval: Insert a fact at different positions in a long text and measure how recall changes with position and total input length.
- Multihop reasoning: Distribute the information needed to answer a question across multiple passages, requiring the model to combine evidence.
- Cross-file code understanding: Ask questions about dependencies between modules in a large repository to assess understanding of its overall structure.
Plot accuracy against input length instead of testing at only one context size. If accuracy drops sharply beyond a certain length, use chunked summarization or retrieval augmentation rather than placing all the material into a single input.
4. Designing Reliable Agent Evaluation Environments
The reliability of an agent evaluation depends heavily on its environment. Focus on the following requirements:
- Sandbox isolation: Start every run from the same snapshot so that files left by previous runs cannot affect the result.
- Resource limits: Set CPU, memory, network-access, and timeout limits to prevent tasks from waiting indefinitely or consuming excessive resources.
- Deterministic verification: Use programmatic tests or state assertions to reduce the bias introduced by subjective human judgment.
- Error injection: Deliberately return timeouts, permission errors, or malformed responses to assess whether the model’s recovery strategy is reasonable.
For security, the sandbox should block access to production credentials and sensitive external networks. Execute model-generated commands with the minimum necessary privileges, and retain complete logs for later auditing.
5. Measuring Inference Speed and Cost
Different service tiers for the same model may vary in generation speed, queueing delay, and price. Measure these factors separately:
- Time to first token: How long the user waits before output begins.
- Output throughput: Tokens generated per second, which affects the time needed to produce long responses or code.
- Prefill time for long inputs: Input-processing overhead, which becomes more significant as input length increases.
- Tail latency under concurrency: Metrics such as P95 and P99 that reflect the experience during peak demand.
If a provider claims that a faster tier offers the same capability as its standard tier, verify output quality on your own task set.
Faster generation can substantially improve the experience of interactive coding. For offline batch processing, its primary value lies in throughput and cost.
6. Adapting Evaluation to Specific Domains
Different domains place different demands on a model, so evaluation criteria should change accordingly.
- Financial research: Prioritize data provenance. Require sources for every numerical claim and check whether calculations can be independently verified. Model output must undergo human review and should not serve directly as the basis for investment decisions.
- 3D creation and content generation: Test format compliance, including whether downstream tools can parse generated structured descriptions. Measure constraint satisfaction and check consistency across multiple rounds of revisions.
- Long-running business workflows: Measure complete workflow success rather than individual-step accuracy. If each step succeeds 95% of the time, a sequence of ten such steps has an overall success rate of roughly 60%. Step-level metrics can therefore substantially overstate final performance.
7. Building an Internal Evaluation Set
Public benchmarks cannot fully represent a specific business. Teams should build their own evaluation sets using the following process:
- Sample real tasks. Create 100–300 tasks from actual support tickets, historical bug reports, and document-based questions. Cover both frequent and high-value scenarios.
- Define acceptance criteria. Specify what counts as success for each task. Have two engineers label the tasks independently and calculate inter-annotator agreement.
- Run regression tests. Repeat the evaluation after every model upgrade, prompt adjustment, or tool change to confirm that critical tasks have not regressed.
- Sanitize the dataset. Exclude private user information, internal secrets, and nonpublic business details.
- Compare multiple dimensions. Record quality, cost, latency, and failure categories in a comparison table instead of relying on a single aggregate score.
8. Common Evaluation Mistakes
- Treating one leaderboard score as a measure of overall capability. A leaderboard covers particular tasks, not every application.
- Repeatedly tuning prompts or parameters against the same questions. This overfits the evaluation set and reduces the value of its scores.
- Reporting averages without classifying failures. An average can hide a concentration of failures in one important category.
- Comparing models under different conditions. Differences in prompts, sampling temperature, or tool configuration make results difficult to compare fairly.
The purpose of evaluation is to answer a practical question: can the model reliably complete your team’s critical tasks at an acceptable cost and latency? Tests designed around that question provide a stronger basis for selection than launch-day numbers.
