LLM Evaluation and Selection: How to Assess Newly Released Models
A new model release is a reason to evaluate, not an automatic reason to migrate. This article outlines a reproducible, business-aligned approach to LLM evaluation, covering task requirements, layered metrics, private datasets, automated testing, statistical rigor, and staged deployment. The goal is to turn model comparisons into reliable decisions about quality, cost, performance, and risk.
1. Define the Problem: Evaluation Is About Reducing Decision Risk
The first question after a new model release is not “How powerful is it?” but “Does it fit this workflow?”
The same model can perform very differently on long-document summarization, structured extraction, multi-turn tool use, and code completion. Rankings without application context offer little value for model selection.
Start by translating business requirements into a measurable task profile:
- Task types: Generation, extraction, classification, rewriting, reasoning, and function calling.
- Input characteristics: Average and long-tail input lengths, the presence of tables or code, and language distribution.
- Output constraints: Format validity, field completeness, length limits, and parse success rate.
- Business metrics: Human acceptance rate, rework rate, and end-to-end task success rate.
- Engineering constraints: Latency budget, peak concurrency, maximum cost per call, and data residency requirements.
Document these constraints in a one-page evaluation brief. Use it to anchor all subsequent metrics rather than drawing conclusions from a single run on a public leaderboard.
2. Build a Four-Layer Metrics Framework
Use a layered framework to narrow down candidate models:
- Capability: Task accuracy, factual consistency, instruction adherence, and effective use of long context. To test long-context performance, place key information at different positions in a long input and measure whether recall declines.
- Engineering: Time to first token, output-token throughput, rate-limit and retry behavior, structured-output reliability, and the practically usable context length.
- Cost: Average cost per task, cache hit rate, and additional costs from failed requests and retries.
- Risk: Harmful-content blocking rate, resistance to prompt injection, likelihood of sensitive-information leakage, and output traceability.
The capability layer eliminates candidates that do not meet requirements. Engineering and cost metrics guide trade-offs among qualified models. The risk layer can disqualify a model regardless of its other scores.
3. Build a Private Evaluation Dataset
Public benchmarks are useful as sanity checks, not as the final basis for deployment decisions. A custom evaluation dataset is what determines whether a model will work in your production environment.
Key considerations include:
- Size: Start with at least 100–200 examples per task type, covering frequent cases, long-tail cases, and adversarial examples.
- Sources: Sample de-identified production logs to preserve the real-world task distribution.
- Annotation: Provide reference answers and scoring rubrics. Rubric-based criteria are often more suitable for generation tasks than a single reference answer.
- Versioning: Store dataset and model versions together so that every conclusion can be traced back to its inputs.
- Separation: Reserve a held-out set that is not used for prompt tuning to reduce overfitting.
Use programmatic checks for criteria that can be evaluated deterministically. For subjective criteria, combine model-based judging with human spot checks.
Control judge bias by fixing the evaluation prompt, randomly swapping candidate order, judging each pair of outputs multiple times and taking the majority result, and retaining a 10%–20% human review rate.
4. Automate the Evaluation Pipeline
Evaluation must be repeatable. The following pseudocode illustrates the structure:
async def run_eval(model_client, dataset, judge):tasks = [asyncio.create_task(evaluate_one(model_client, judge, c)) for c in dataset]results = await asyncio.gather(*tasks, return_exceptions=True)scores, errors = [], []for r in results:if isinstance(r, Exception):errors.append(r) # Track failed examples separately; never silently discard themelse:scores.append(r.score)return {"n": len(scores),"mean": statistics.mean(scores),"ci95": bootstrap_ci(scores), # Report a confidence interval"error_rate": len(errors) / len(dataset),}
Three engineering requirements are especially important:
- Control concurrency and use exponential-backoff retries.
- Retain requests and responses for offline recalculation, with raw data in object storage and execution logs in a logging service.
- Send metric changes through monitoring and alerting, and run evaluation jobs on a container platform for elastic scaling.
5. Make Conclusions Statistically Sound
A two- or three-point difference on a small sample may be noise rather than a meaningful improvement.
For more reliable conclusions:
- Repeat each configuration at least three times and report the average.
- Report confidence intervals rather than only point estimates.
- Use paired statistical tests for matched examples to assess whether differences are significant.
- Distinguish statistical significance from business significance. Define the latter through thresholds tied to business metrics.
Migration is worth considering only when the improvement exceeds the business’s acceptable margin of error and justifies the migration cost.
6. Use Staged Rollouts and Continuous Regression Testing
Begin with shadow traffic. The new model receives real requests, but its outputs are not returned to users. Compare its results with those of the production model.
Then increase user-facing traffic in stages: 1% → 10% → 50%. At each stage, monitor acceptance rate, latency, and error rate.
Finally, establish persistent regression tests. Any model or prompt change should trigger a full evaluation run.
For this type of workflow, Baidu AI Cloud typically provides general-purpose components such as object storage, message queues, container platforms, logging services, and monitoring and alerting. These support evaluation data storage, task scheduling, and metric observation. Consult the official documentation for specific specifications and regional availability.
7. Avoid Common Evaluation Mistakes
- Looking only at aggregate scores: Overall results can hide regressions in critical task types.
- Using production data without de-identification: This creates compliance risks.
- Tuning prompts separately for candidate models: Unequal optimization can make comparisons unfair.
- Ignoring failures: Excluding timeouts and parsing failures distorts the results.
- Treating evaluation as a one-time exercise: Model-side updates can cause performance drift without changes to your application.
Conclusion
When a new model launches, a professional team’s advantage is not being first to try it. It is having a stable, reproducible evaluation system aligned with business requirements.
Make task profiles, layered metrics, private datasets, automated pipelines, and staged rollouts part of your infrastructure. With that foundation, a newly released model can enter the candidate pool and produce quantitative evidence for a selection decision within hours.
