Choosing a New LLM Version: A Developer's Guide to Evaluation and Rollout

    When a model provider releases a new version, leaderboard rankings, personal impressions, and price changes rarely tell a product team whether to switch. This guide shows how to turn that decision into a repeatable engineering process. It covers evaluation dimensions for task quality, latency, cost, format stability, and compliance. It also explains how to build a private evaluation set, estimate monthly costs, roll out a model with canary traffic, and avoid common mistakes.

    1. Why a New Model Version Needs Re-evaluation

    When a new model version is released, community discussion usually focuses on leaderboard rankings, personal experience, and price changes. These signals have value, but they are hard to apply directly to business decisions.

    First, public leaderboards often use test sets that do not match real business scenarios. Leaderboards mostly cover academic knowledge, mathematical reasoning, and code benchmarks. Tasks such as customer support Q&A, ticket classification, and key clause extraction from contracts have their own input distributions and output format requirements. A model that ranks first on a leaderboard may not perform best on a specific business task.

    Second, personal experience is highly random. A few conversations cannot reveal the overall error rate distribution or show whether a model stays stable on long-tail inputs.

    Third, prices and rate limits change between versions. Unit prices, billing rules, concurrency limits, and caching policies can all be adjusted. A small change in unit price can become a noticeable monthly cost difference in a system with a large daily request volume.

    The practical approach is to treat “whether to switch” as a reproducible engineering problem. Define metrics, measure them with your own data, and then combine the results with cost and risk to make the decision.

    2. Evaluation Dimensions

    2.1 Task Quality

    Quality is the core of model selection. Start by breaking your business into task types, such as information extraction, classification and tagging, multi-turn dialogue, long-document question answering, and code generation. Then define a separate scoring standard for each type.

    • Accuracy: whether the output matches the reference answer. Measure it with exact match, field-level match, or human scoring.
    • Completeness: whether key information is missing. For example, an extraction task may leave out required fields.
    • Hallucination rate: whether the facts, numbers, and clauses cited in an answer can be found in the input material.

    2.2 Latency and Throughput

    For interactive applications, time to first token and total completion time directly affect user experience. For batch jobs, throughput per unit time determines how long a job takes to finish. Record the following metrics during evaluation:

    • Time to first token (TTFT)
    • Output tokens per second
    • P95 and P99 latency under high concurrency
    • Share of timeout and rate-limit errors

    2.3 Cost

    Break down cost by request structure. Input and output tokens are usually priced differently, and many applications send much longer inputs than outputs, so input cost often makes up the larger share. If the service offers caching, also evaluate the cache hit rate for fixed prefixes, such as system prompts and knowledge base snippets.

    2.4 Stability and Format Compliance

    Stability has two parts. First, outputs should follow the agreed format, such as valid JSON structure and consistent field names. Second, behavior should not drift between versions. In other words, the same input should not produce systematically different outputs on the old and new versions. Format errors break downstream parsing directly, and they are often harder to debug than a drop in quality.

    2.5 Compliance and Data Policies

    For scenarios involving personal information or trade secrets, confirm where data is stored, how long it is retained, whether it is used for training, and whether it meets applicable industry regulations. If this check fails, strong quality and cost results cannot justify choosing the model.

    3. Building Your Own Evaluation Set

    The evaluation set is the foundation of model selection. It should come from real business data and cover three types of samples: normal, edge, and adversarial.

    The steps are as follows:

    1. Sample production logs by task type, making sure to cover both high-frequency scenarios and low-frequency hard cases.
    2. Desensitize sensitive information, for example by replacing phone numbers, ID numbers, and customer names.
    3. Have domain experts label reference answers, and document the labeling rules to keep labels consistent.
    4. Stratify samples by difficulty. Routine samples measure baseline performance. Edge cases, such as missing fields, ambiguous wording, and overly long inputs, measure robustness. Adversarial samples, such as misleading questions and format traps, measure safety boundaries.
    5. For scale, use at least several hundred samples per task type to reduce misjudgments caused by random variation.

    Below is a simplified evaluation framework. call_model represents the unified function that calls the model service. Its implementation depends on the interface your team uses.

    1. import json
    2. from dataclasses import dataclass
    3. @dataclass
    4. class EvalResult:
    5. sample_id: str
    6. correct: bool
    7. format_ok: bool
    8. latency_ms: float
    9. def check_format(raw_output: str, required_keys: list[str]) -> bool:
    10. """Validate that the output is valid JSON and contains all required fields."""
    11. try:
    12. data = json.loads(raw_output)
    13. except json.JSONDecodeError:
    14. return False
    15. return all(key in data for key in required_keys)
    16. def evaluate(model_id: str, samples: list[dict], call_model) -> dict:
    17. results: list[EvalResult] = []
    18. for sample in samples:
    19. output, latency_ms = call_model(model_id, sample["prompt"])
    20. correct = output.strip() == sample["expected"].strip()
    21. format_ok = check_format(output, sample.get("required_keys", []))
    22. results.append(EvalResult(sample["id"], correct, format_ok, latency_ms))
    23. total = len(results)
    24. latencies = sorted(r.latency_ms for r in results)
    25. return {
    26. "accuracy": sum(r.correct for r in results) / total,
    27. "format_pass_rate": sum(r.format_ok for r in results) / total,
    28. "p95_latency_ms": latencies[int(total * 0.95) - 1],
    29. }

    In practice, accuracy judgments usually cannot rely on exact match alone. For open-ended answers, you can add rule-based checks, keyword coverage, or scoring by another model combined with manual spot checks. Whichever method you use, validate the scoring method on a small sample and confirm that it agrees with human judgment.

    4. Estimating the Cost Model

    Estimate cost before running quality tests. Cost determines whether a quality gain is worth its price.

    The basic formula for monthly cost is:

    Monthly cost = daily requests × 30 × [average input tokens × input price + average output tokens × output price] ÷ 1,000,000

    Prices are quoted per million tokens. Wrapping the formula in a function lets you compare the cost of different versions or options quickly:

    1. def monthly_cost(
    2. daily_requests: int,
    3. avg_input_tokens: int,
    4. avg_output_tokens: int,
    5. input_price_per_m: float,
    6. output_price_per_m: float,
    7. cache_hit_ratio: float = 0.0,
    8. cached_price_ratio: float = 0.1,
    9. ) -> float:
    10. """Estimate the monthly token cost. cache_hit_ratio is the input cache hit ratio."""
    11. effective_input = avg_input_tokens * (
    12. 1 - cache_hit_ratio + cache_hit_ratio * cached_price_ratio
    13. )
    14. per_request = (
    15. effective_input * input_price_per_m
    16. + avg_output_tokens * output_price_per_m
    17. ) / 1_000_000
    18. return daily_requests * 30 * per_request

    Cache discount ratios, billing rules, and minimum billing units must be confirmed against the provider’s latest documentation. The numbers in this example only illustrate the calculation structure.

    Beyond token fees, include retry costs, manual review costs, and extra processing costs caused by format errors. A cheaper option with a high format failure rate can end up costing more overall.

    5. Canary Rollout and Rollback

    Even when offline evaluation looks good, switching production traffic carries risk. A safe approach is to roll out in stages and set clear pass criteria for each stage.

    A typical rollout process is:

    1. Shadow mode: the new version receives requests in parallel, but its outputs are not shown to users. Results are only logged for comparison.
    2. Small traffic split: route 1% to 5% of traffic to the new version, and monitor error rate, latency, and user feedback.
    3. Gradual ramp-up: once metrics are stable, increase the share in steps of 10%, 30%, 50%, and 100%.
    4. Full switch: after the full switch, keep the old version available for a period so you can roll back quickly.

    The configuration below shows how to route traffic by ratio and set rollback thresholds:

    1. routing:
    2. stable_model: "model-v1"
    3. candidate_model: "model-v2"
    4. candidate_traffic_ratio: 0.05
    5. rollback_rules:
    6. max_error_rate: 0.02
    7. max_p95_latency_ms: 3000
    8. min_format_pass_rate: 0.99
    9. evaluation_window_minutes: 30

    Define rollback rules before launch, and have the monitoring system execute them automatically. Manual rollback decisions usually react too slowly. Route logic should also be controlled by a feature flag, so switching and reverting do not require a new code deployment.

    6. Common Mistakes

    These problems come up often in model selection:

    • Relying only on public leaderboards and ignoring how business data differs.
    • Drawing conclusions from a few trial conversations instead of building an evaluation set of adequate size.
    • Reusing old prompts without adapting them to the new version’s output style, which makes the new version look worse than it is.
    • Comparing only unit prices while ignoring input-output ratios, caching, and the hidden cost of format failures.
    • Stopping monitoring after launch, so behavior drift between versions goes unnoticed.

    Avoiding these problems depends on treating the model as a dependency that you measure continuously, rather than a product you buy once. Repeat the same evaluation process with every version update, and keep a traceable record of the results.

    7. Launch Checklist

    Before deciding to switch, confirm each item:

    • Business scenarios are split by task type, and each type has a defined scoring standard.
    • The private evaluation set has been desensitized, labeled, and stratified, and its size is sufficient for statistical analysis.
    • Accuracy, format pass rate, latency, and cost have been measured separately for the old and new versions.
    • The cost model includes caching, retries, and manual review.
    • Data storage and retention policies have passed compliance review.
    • The rollout plan, rollback thresholds, and monitoring alerts are configured.
    • The old version stays available within the rollback window.

    Only when all of these conditions are met is a model switch a controlled engineering change. The final basis for choosing a model should be your own team’s measurements on real data, not a leaderboard ranking from a discussion or a rum