Evaluating New-Generation LLMs for Coding and Multimodal Capabilities: A Practical Guide
New model releases often come with aggregate scores, leaderboard rankings, and pricing information, but these do not directly answer how a model will perform in a specific business context. This article outlines an independent, reproducible evaluation approach: understanding model design trade-offs, testing long-context, multimodal, agentic coding, preference, cost, and latency dimensions, and building a repeatable evaluation pipeline while avoiding common pitfalls.
Introduction
New generations of large models are released frequently, and vendors typically provide composite scores, leaderboard rankings, and pricing information. These data points offer directional reference, but they rarely answer the question: “How well does this model perform in my business?” Technical teams need an independent, reproducible evaluation method that turns marketing claims into their own verified results.
This article starts with the design orientations of evaluation targets, then analyzes test methods for each capability dimension, and finally provides an actionable evaluation workflow.
1. Understand Model Design Orientations First
Large models usually make trade-offs in architecture, and there are three common design directions.
- Sparse mixture-of-experts (MoE) structure: The model has a very large total parameter count, but each token activates only some expert sub-networks, keeping the computation per inference under control. This structure has advantages in throughput and cost, but the routing mechanism may cause performance fluctuations in certain specialized domains, which require dedicated testing.
- Ultra-long context windows: The longer the window, the greater the pressure on attention computation and memory usage. A nominal window length only indicates how much input the model can accept, not whether it can effectively use that input.
- Native multimodality: Images, video, and text are modeled together during training. Such models have greater potential for reading images, understanding interfaces, and interpreting temporal frames, but capability boundaries need to be verified separately by modality.
Understanding these orientations helps determine which types of tasks a model is better suited for. For example, a model that excels at long-document retrieval may not be stable in multi-step tool use, and the two need to be evaluated separately.
2. Break Down the Evaluation Dimensions
2.1 Limitations of Composite Benchmarks
A composite intelligence index is usually derived by weighting multiple sets of academic or engineering questions. It is suitable for coarse screening, but it has three problems. First, the question distribution may not match your business scenarios. Second, some benchmark questions may already appear in training data, creating contamination risk. Third, a single total score masks the capability structure: two models with similar total scores may have one strong in reasoning and the other strong in coding.
It is recommended to treat composite scores as a filter for a candidate list, not as the final basis.
2.2 Long-Context Capability
Long-context evaluation should be divided into three levels:
- Retrieval: Locate a specific fact in a long text.
- Reasoning: Integrate information across multiple paragraphs to reach a conclusion.
- Generation: Produce structured output based on long materials, such as generating an API design from a long requirements document.
A common method is to embed a fact at different depths in a long text, run a grid test by text length and insertion position, and observe how accuracy changes with position. If accuracy in the middle is notably lower than at the beginning and end, the model’s use of middle information is deteriorating.
def build_needle_prompt(filler: str, needle: str, total_chars: int, depth: float) -> str:"""depth ranges from 0 to 1 and represents the relative position of the fact in the text."""repeated = (filler * (total_chars // len(filler) + 1))[:total_chars]pos = int(total_chars * depth)text = repeated[:pos] + "\n" + needle + "\n" + repeated[pos:]return text + "\n\nQuestion: What is the project code recorded in the text? Answer only with the code."
2.3 Multimodal Understanding
Image understanding and video understanding should be tested separately.
- Images: Focus on text recognition accuracy, chart value reading, and interface element localization. The test set should include handwritten content, low-contrast screenshots, and complex tables to cover real-world scenarios.
- Video: Focus on the temporal order of events, key-frame selection, and the correspondence between subtitles and frames.
Input resolution and video frame-sampling frequency directly affect results. These parameters must be fixed during testing; otherwise, results across models cannot be compared.
2.4 Long-Horizon Coding and Agentic Tasks
Single-turn code generation accuracy can no longer easily distinguish flagship models. More discriminative are multi-step tasks, such as reading a code repository, locating defects, modifying multiple files, running tests, and iterating based on errors until tests pass.
Recommended evaluation metrics include:
- Final task pass rate;
- Average number of iteration rounds;
- Tool-call error rate;
- Token consumption per task.
For front-end tasks, interface screenshots can be used for fidelity comparison, with visual regression tools or human scoring. Human scoring requires multiple independent raters and calculation of an agreement coefficient to avoid a single rater’s bias dominating the conclusion.
2.5 Blind Voting and Preference Leaderboards
Blind voting reflects human subjective preference on specific tasks. Answer length, formatting, and tone all affect voting results, so it is better suited to observing “whether users are willing to adopt this answer” rather than being directly equated with correctness.
When interpreting leaderboards, pay attention to sample size, task-category distribution, and confidence intervals of scores. For leaderboards with small sample sizes and small score gaps, ranking changes have limited reference value.
2.6 Cost and Latency
API pricing usually distinguishes three categories: cached input, uncached input, and output. Output unit prices are often the highest, so the cost of tasks that generate long text grows quickly. Real cost depends on the business’s cache hit ratio, average input length, and average output length.
Latency also needs to be broken down. Time to first token determines the response speed users perceive, while output tokens per second determines the completion time of long answers. Batch scenarios focus more on total throughput, while interactive scenarios focus more on first-token latency.
The following function estimates monthly cost. The unit prices are hypothetical values for demonstration only and must be replaced with actual quotes:
def estimate_monthly_cost(requests_per_day: int,avg_input_tokens: int,avg_output_tokens: int,cache_hit_ratio: float,price_hit: float, # CNY / million tokens, cached inputprice_miss: float, # CNY / million tokens, uncached inputprice_output: float, # CNY / million tokens, outputdays: int = 30,) -> float:total_input = requests_per_day * avg_input_tokens * daystotal_output = requests_per_day * avg_output_tokens * dayshit_tokens = total_input * cache_hit_ratiomiss_tokens = total_input - hit_tokenscost = (hit_tokens * price_hit+ miss_tokens * price_miss+ total_output * price_output) / 1_000_000return round(cost, 2)# Demonstration: hypothetical unit prices, only to illustrate the calculation methodprint(estimate_monthly_cost(requests_per_day=10000,avg_input_tokens=3000,avg_output_tokens=800,cache_hit_ratio=0.6,price_hit=1.0,price_miss=10.0,price_output=50.0,))
3. Build a Reproducible Evaluation Pipeline
A reliable evaluation pipeline usually includes the following steps.
- Define the task distribution: Sample from real business logs and ensure the task-type proportions in the test set match online traffic.
- Construct the evaluation set: Each sample needs a standard answer or an automatically executable validation function. Samples that cannot be automatically validated need scoring rules annotated.
- Fix inference parameters: Standardize temperature, maximum output length, system prompts, and tool definitions. If parameters are not standardized, results are not comparable.
- Run multiple times and take statistics: Run the same sample at least several times and record the mean and fluctuation range. Single results are easily affected by randomness.
- Record cost and latency alongside results: Record token usage and elapsed time for each sample.
- Manually review samples: Randomly spot-check automatic scoring results and measure the difference between automatic and human judgments.
Below is a minimal evaluation execution framework; the model invocation part is implemented by the user:
from dataclasses import dataclass, fieldfrom statistics import meanfrom typing import Callable@dataclassclass EvalCase:case_id: strprompt: strcheck: Callable[[str], bool]tags: list[str] = field(default_factory=list)def run_suite(model_fn: Callable[[str], str],cases: list[EvalCase],repeats: int = 3,) -> dict[str, float]:scores: dict[str, list[float]] = {}for case in cases:for _ in range(repeats):output = model_fn(case.prompt)passed = 1.0 if case.check(output) else 0.0for tag in case.tags or ["overall"]:scores.setdefault(tag, []).append(passed)return {tag: round(mean(vals), 4) for tag, vals in scores.items()}
Outputting results grouped by task tag helps teams see which types of tasks a model performs better on, so they can choose models by scenario instead of picking a single “overall champion.”
4. Common Pitfalls
- Relying only on leaderboard rankings and treating them as the final decision.
