How to Evaluate and Select a New Large Language Model
A new model release does not necessarily mean a better fit for your application. Learn how to compare large language models using reproducible tests of task quality, multimodal and coding capabilities, output stability, cost per successful task, and integration effort—and how to turn those results into deployment decisions and ongoing monitoring.
1. Why Release Announcements Are Not Enough
When a new large language model launches, its announcement typically highlights training methods, benchmark rankings, and pricing changes. These details can help explain the direction of technical progress, but they rarely answer the practical question: “Is this model right for my application?”
Published rankings usually reflect specific evaluation datasets and model versions. Your production workloads may be very different. Model selection therefore requires an independent, reproducible evaluation process grounded in your own data rather than promotional claims.
2. What to Evaluate
2.1 Task Performance
General-purpose benchmarks can help create an initial shortlist, but check two things before relying on them:
- Could the evaluation dataset have been included in the model’s training data?
- Does the model version on the leaderboard match the service version you plan to use?
A more reliable approach is to build a test set organized around real tasks, such as support-ticket summarization, code completion, report interpretation, and image-and-text understanding.
For each task category, include normal inputs, edge cases, and invalid or unexpected inputs. Use enough examples to support meaningful statistical comparisons.
2.2 Vision and Multimodal Capabilities
A single metric is rarely sufficient to evaluate visual tasks. Blind evaluation is a useful approach: remove model identifiers from outputs generated for the same input, then ask reviewers to score them.
Scoring criteria should include:
- Factual accuracy
- Information completeness
- Consistency with layout and style requirements
Use at least three reviewers to reduce individual bias, and calculate an inter-rater agreement measure. Low agreement suggests that the scoring rubric needs more precise definitions.
2.3 Coding Capabilities
Evaluate coding performance across three subtasks:
- Generating code from requirements
- Fixing defective code
- Adding unit tests for existing functions
Use test pass rate as the primary metric for each subtask, while also recording static analysis results and the number of revision rounds.
A single-generation success rate alone can give a misleading picture of overall coding capability. Results from a defined, multi-round repair workflow better reflect how developers actually use models.
2.4 Output Stability and Long-Context Handling
Run the same prompt repeatedly and check whether output structure remains consistent and required fields are present.
For structured-output workflows, format compliance should be a core metric: downstream software may be unable to process an otherwise useful answer if its format is invalid.
For long-document tasks, gradually increase input length and measure how well the model retrieves key information. Identify the point at which quality begins to decline substantially, then use that threshold to guide document-splitting decisions.
2.5 Cost per Successful Task
Model services typically charge by input and output usage. Listed unit prices alone are not enough for a meaningful comparison. Instead, calculate the cost per successful task:
Cost per successful task = Cost per call × Average calls per task ÷ Task success rate
Consider this hypothetical example, with all costs in Chinese yuan (CNY):
| Model | Cost per call | Task success rate | Average calls per task | Cost per successful task |
|---|---|---|---|---|
| Model A | CNY 0.020 | 80% | 1 | CNY 0.025 |
| Model B | CNY 0.012 | 50% | 2 | CNY 0.048 |
Although Model B has a lower per-call price, its cost per successful task is higher.
2.6 Engineering Integration
Integration effort is often underestimated. Evaluate the following areas:
- API compatibility: This determines migration effort. Add a common abstraction layer between business logic and model services so that application code does not depend directly on one provider’s response structure.
- Rate limits and concurrency: Estimate the quota required to handle peak traffic.
- Timeouts and retries: Set appropriate timeouts for long-running requests. Account for idempotency when retrying to avoid duplicate charges or writes.
- Logging and observability: Record request latency, token usage, error codes, and sampled output-quality results to support troubleshooting.
- Data compliance: Establish whether the service retains submitted data, and redact sensitive fields before making requests.
3. Build a Reproducible Evaluation Workflow
A complete evaluation workflow has five steps:
- Prepare the test dataset.
- Fix the model-call parameters.
- Run the tests in batches and save the raw outputs.
- Combine automated scoring with manual spot checks.
- Summarize cost and latency.
The key is to keep test conditions consistent. Otherwise, the results will not be directly comparable.
The following simplified benchmark script illustrates the process. The model-calling function is a placeholder and should be replaced with your team’s own wrapper. The scoring function uses exact matching for demonstration only; real tasks generally require more flexible semantic scoring or human review.
import jsonimport timefrom statistics import meandef run_benchmark(call_model, models, cases, judge):"""Run the same test cases across multiple models.Return success rates and average latency.call_model: Function with signature (model_name, prompt) -> strmodels: List of model names to evaluatecases: List of test cases containing prompt and expected fieldsjudge: Scoring function with signature (output, expected) -> 0 or 1"""report = {}for model in models:scores, latencies = [], []for case in cases:start = time.perf_counter()output = call_model(model, case["prompt"])latencies.append(time.perf_counter() - start)scores.append(judge(output, case["expected"]))report[model] = {"success_rate": round(mean(scores), 3),"avg_latency_s": round(mean(latencies), 3),}return reportif __name__ == "__main__":cases = [{"id": 1,"prompt": "Translate into English: Il fait beau aujourd'hui.","expected": "The weather is nice today.",},]# Placeholder: replace with your team's model-calling wrapperdef call_model(model, prompt):return "placeholder"# Exact-match scoring for demonstration onlydef judge(output, expected):return 1 if output.strip() == expected else 0result = run_benchmark(call_model, ["model-a", "model-b"], cases, judge)print(json.dumps(result, ensure_ascii=False, indent=2))
When running evaluations:
- Fix sampling parameters such as temperature so that repeated runs are comparable.
- Record the version information returned by the model service for traceability.
- Save the raw input and output for every call so results can be reviewed and rescored.
4. Turn Results into a Selection Decision
Summarize the results using a decision table, then assign weights based on business priorities.
| Dimension | Key question | Evaluation method |
|---|---|---|
| Task quality | What is the pass rate on the business test set? | Automated scoring and manual spot checks |
| Cost per successful task | What is the average cost of a successful task? | Calculate using the formula above |
| Response latency | Does tail latency meet user-experience requirements? | Measure P95 latency under load |
| Output stability | How often do structured outputs meet requirements? | Repeated-call testing |
| Integration effort | How much migration and maintenance work is required? | Engineering assessment and effort estimation |
Weights should reflect the workload. For real-time, user-facing conversations, latency and stability deserve greater emphasis. For offline batch processing, cost per successful task is often more important.
After setting the weights, first eliminate models that fail the minimum quality threshold. Then compare weighted scores among the remaining candidates.
5. Common Evaluation Mistakes
- Treating a single demonstration as evidence of consistent performance. Demos are often selected examples. Batch testing is needed to reveal the actual distribution of outcomes.
- Comparing only unit prices. Ignoring success rates and the number of calls can reverse the apparent cost advantage, as the example above shows.
- Overlooking overlap between evaluation and training data. Public benchmark scores may overstate performance on unseen tasks. Your own test set provides a more relevant basis for comparison.
- Ignoring server-side version changes. A model service may update its weights without changing its API, shifting the output distribution. Run regression tests regularly, not just during initial selection.
6. Put Evaluation into Production Practice
Start with a Limited Rollout
Release the new model to a small share of traffic first. Maintain a fast rollback path to the previous solution, and compare production metrics between the old and new approaches.
Establish Logging and Retention Rules
Keep sampled inputs and outputs for review. Redact sensitive information before storing it, and define a clear retention period.
Add Benchmarks to Continuous Integration
Run the benchmark suite automatically whenever the model version or prompts change. Generate trend reports to track performance over time.
Monitor Cost and Quality Continuously
Use cloud object storage to retain evaluation samples, and use logging and monitoring services to track cost per successful task, error rates, and latency. Configure alerts so that unexpected changes can be investigated promptly.
