Why LLM Model Selection Should Go Beyond Leaderboards: A Practical Guide to Scenario-Based Evaluation

    Public leaderboards are useful for narrowing down candidates, but they rarely reflect how models perform in real development workflows. This guide explains how to build an internal evaluation set, define measurable metrics, run fair model trials, assess long-context performance, calculate effective cost, and reduce migration risk.

    1. Why Public Leaderboards Are Not Enough for Model Selection

    Public leaderboards provide a useful comparison under standardized conditions, but they cannot replace judgment based on your own business scenarios. There are four main reasons.

    First, benchmark tasks do not match real-world work. Many leaderboards focus on single-turn question answering, multiple-choice questions, or isolated code snippets. Real development often involves clarifying requirements, modifying multiple files, and following an existing codebase’s style and conventions. These capabilities are rarely covered in full.

    Second, evaluation methods can be subjective or superficial. Some evaluations rely on visual inspection of a page or only check whether the output runs. For backend logic, data processing, and API compatibility, “runs successfully” and “is correct” are very different standards.

    Third, model versions change faster than benchmark scores. Model services are often updated more frequently than leaderboards are refreshed. A score published at one point may not represent current performance.

    Fourth, benchmark metrics may not align with business goals. Leaderboards emphasize average scores, while teams usually care about whether a task is completed correctly on the first attempt, how many revision rounds are required, and how much time each correction takes. These factors cannot be inferred from a single score.

    Leaderboards are therefore useful for creating a shortlist, but the final decision should be based on data from your own scenarios.

    2. Three Characteristics of Real Development Work

    Understanding the characteristics of real-world tasks is a prerequisite for designing a useful evaluation.

    Iterative. Requirements are often clarified in stages. A developer may begin with a general direction and then add constraints based on intermediate results. The context continues to accumulate. A model’s performance in the tenth round of a conversation may differ significantly from its performance in the first round, something that single-turn tests cannot reveal.

    Ambiguous. Many requirements are incomplete at the beginning, and the requester may not yet have a clear implementation approach. In these situations, the ability to ask useful questions, identify assumptions, and propose alternatives can be more valuable than immediately generating code.

    Continuous. Structures, naming conventions, and interfaces created in one step are repeatedly referenced later. If a model introduces inconsistent conventions early in the process, the cost of rework can increase substantially.

    Hidden costs. API charges are only one part of the total cost. Time lost due to an incorrect direction, the effort required to review model output, and defects introduced by using incorrect results can cost several times more than the API call itself. This is the practical meaning of trial-and-error cost.

    3. Turn Model Selection into Measurable Metrics

    Before comparing models, define what “good” means for your team. At a minimum, consider the following metrics.

    Metric Meaning Collection method
    First-pass rate The percentage of tasks that meet acceptance criteria without modification Aggregate automated acceptance results
    Average rework rounds The number of interaction rounds required to reach an accepted result Record the number of dialogue rounds for each task
    Effective modification ratio The proportion of manually modified content relative to the total output Use version comparison tools or manual sampling
    End-to-end latency The time from task submission to receiving a usable result Record request and response timestamps
    Effective cost per task Total API and labor costs divided by the number of successfully completed tasks Combine financial data with time records

    Effective cost per task often provides the clearest view of overall value:

    Effective cost per task = (API cost + labor cost for review and fixes) ÷ number of successfully completed tasks

    A model with a lower unit price but frequent rework may have a higher effective cost than a more expensive model with a higher first-pass rate.

    4. Build an Internal Evaluation Set

    An evaluation set should be based directly on your team’s historical work. The following process is recommended.

    1. Sample tasks. Select 30 to 50 tasks from development records from the previous month. Cover the main task types, such as code generation, bug fixing, documentation generation, test-case design, and code review.
    2. Document the inputs. Preserve the necessary context for each task, including relevant code snippets, requirements, and constraints.
    3. Define acceptance criteria. Prefer criteria that can be checked automatically, such as passing unit tests, conforming to an output format, or including required fields. For tasks that cannot be evaluated automatically, create a clear checklist and have at least two reviewers score the results independently.
    4. Record task segments. Group tasks by type and difficulty so that differences between models can be analyzed more precisely.

    The following example shows a provider-independent evaluation framework. The caller implements the model-specific function, while the framework handles retries, timing, and result recording.

    1. from dataclasses import dataclass, asdict
    2. from datetime import datetime, timezone
    3. from typing import Callable
    4. import time
    5. @dataclass
    6. class EvalCase:
    7. case_id: str
    8. category: str # Task type, such as code modification or documentation
    9. prompt: str # Task input
    10. check: Callable[[str], bool] # Automated acceptance function
    11. @dataclass
    12. class EvalResult:
    13. case_id: str
    14. model_name: str
    15. passed: bool
    16. rounds: int
    17. latency_s: float
    18. timestamp: str
    19. def run_case(
    20. call_model: Callable[[str], str],
    21. case: EvalCase,
    22. model_name: str,
    23. max_rounds: int = 3,
    24. ) -> EvalResult:
    25. """Run one task and retry with feedback until it passes or reaches the limit."""
    26. prompt = case.prompt
    27. passed = False
    28. rounds = 0
    29. start = time.perf_counter()
    30. for _ in range(max_rounds):
    31. rounds += 1
    32. output = call_model(prompt)
    33. if case.check(output):
    34. passed = True
    35. break
    36. prompt = (
    37. f"{case.prompt}\n\n"
    38. "The previous output did not pass acceptance checks. "
    39. "Please revise it and try again."
    40. )
    41. return EvalResult(
    42. case_id=case.case_id,
    43. model_name=model_name,
    44. passed=passed,
    45. rounds=rounds,
    46. latency_s=round(time.perf_counter() - start, 3),
    47. timestamp=datetime.now(timezone.utc).isoformat(),
    48. )
    49. def summarize(results: list[EvalResult]) -> dict:
    50. """Calculate basic metrics such as first-pass rate."""
    51. first_pass = [r for r in results if r.passed and r.rounds == 1]
    52. return {
    53. "total": len(results),
    54. "first_pass_rate": round(len(first_pass) / len(results), 3),
    55. "avg_rounds": round(sum(r.rounds for r in results) / len(results), 2),
    56. "avg_latency_s": round(sum(r.latency_s for r in results) / len(results), 2),
    57. }

    The framework records timestamps, making it possible to analyze response speed and stability at different times. Some services may apply different pricing or rate limits depending on usage periods. Preserving test times alongside evaluation results is therefore important for understanding both cost and user experience.

    5. Organize a Fair Comparative Trial

    Leaderboards cannot replace hands-on testing, but switching models based only on personal impressions is also unreliable. A comparative trial should follow these principles.

    Use identical inputs. All candidate models should use the same evaluation set, prompt templates, and context. Even small differences in prompt wording can produce significantly different results, so templates should remain unchanged during comparison.

    Use a consistent time window. Run tests during similar periods whenever possible to reduce bias caused by network fluctuations or changes in service load. Record the timestamp of every call for later analysis.

    Use blind review. Reviewers should score outputs without knowing which model produced them. This can reduce preference for familiar tools.

    Run the trial long enough. A one- to two-week trial is recommended. A test shorter than three days often covers too few task types to reveal performance in iterative workflows. During the trial, record results at a fixed time each day and annotate unusual events.

    Preserve the real workflow. Team members should complete tasks according to their normal working habits rather than solving specially designed benchmark questions. Ambiguous requirements and last-minute changes are exactly the situations that the evaluation should cover.

    6. How Growing Context Affects Model Performance

    In iterative workflows, context length is an important factor affecting output quality. When the context becomes too long, a model may overlook early constraints or produce contradictions across rounds. Three common approaches can help.

    Summary compression. Compress older conversation content into a concise summary that preserves key decisions and constraints while removing small talk and discarded approaches.

    Explicit state files. Store project goals, interface conventions, and completed items in a separate document. Attach this document at the beginning of each task instead of relying entirely on conversation history.

    Segmented execution. Break a large task into smaller subtasks. Use a clean context for each subtask and include only the necessary inputs.

    The following example illustrates the basic idea behind summary compression.

    1. from typing import Callable
    2. def compact_history(
    3. messages: list[dict],
    4. summarize: Callable[[list[dict]], str],
    5. keep_recent: int = 6,
    6. ) -> list[dict]:
    7. """Keep the most recent messages and replace older ones with a summary."""
    8. if len(messages) <= keep_recent:
    9. return messages
    10. old, recent = messages[:-keep_recent], messages[-keep_recent:]
    11. summary = summarize(old)
    12. header = {"role": "system", "content": f"Key conclusions from earlier discussion: {summary}"}
    13. return [header] + recent

    The evaluation should test both long-context and compressed-context conditions. If a model’s performance drops significantly after compression, it may depend heavily on detailed conversation history. The team should then adjust its workflow accordingly.

    7. Manage Switching Costs and Operational Risk

    Model selection does not end once a primary model has been chosen. Switching costs and dependency risks also require attention.

    Prompt dependency. Models differ in how they respond to instructions. Prompts accumulated over time may have been tuned for a specific model and require revalidation when migrated.

    Output format differences. Structured output, code-block markers, and field names may vary between models. The calling layer should perform format validation and normalization where appropriate.

    Adapter-layer design. Encapsulate model calls in an independent module, while business code depends only on an internal interface. When the service changes, modifications are then limited mainly to the adapter layer.

    Balance and usage management. When prepaid balances are distributed across multiple services, some funds may remain unused while another service is used during a high-cost period. Set usage-threshold alerts for each service and review consumption regularly.

    Maintain a fallback path. Critical tasks should have a usable alternative. If a service experiences increased latency or an interface change, the team should be able to switch quickly rather than halt the entire workflow.

    8. Decision Framework and Implementation Recommendations

    The following sequence provides a practical model-selection process.

    1. Define the scenarios. List the five task types your team performs most frequently and assign an importance level to each.
    2. Choose the metrics. Select three or four metrics from the list above as primary decision criteria and assign weights to them.
    3. Build the evaluation set. Generate 30 to 50 test cases from historical tasks and define their acceptance criteria.
    4. Run the trial. Test all candidates under consistent conditions for one to two weeks and record every result.
    5. Calculate effective cost. Combine first-pass rate, rework rounds, latency, and fees to calculate the effective cost per task for each candidate.
    6. Decide and reevaluate regularly. Select a primary model while keeping a fallback option. Rerun the evaluation set every one or two quarters, or whenever the team’s main task types change.

    The goal is to find the solution with the lowest cost and highest reliability for your team’s actual scenarios. Model capabilities continue to change, so a one-time conclusion can become outdated quickly. Turning evaluation into a regular operating process is more valuable than trying to identify the best option at a single point in time.