Evaluating and Selecting LLMs for Real-World Scenarios: A Practical Guide

    This article explains why "it depends on what you're doing" is not a sufficient answer to model selection, and presents a structured methodology for evaluating and choosing large language models. It covers decomposing model capabilities into observable dimensions, building a three-tier evaluation system from public benchmarks to scenario-specific tests and human review, constructing high-quality evaluation datasets, selecting key metrics, applying scenario-based weighting for model selection, and engineering practices such as abstracting model calls, regression testing, observability, and cost control. Readers will learn how to turn LLM selection from guesswork into a measurable, reproducible, and iterative engineering process.

    Why “It Depends on What You’re Doing” Is Not an Answer

    In model selection discussions, the most common conclusion is: “It depends on what you’re doing—just pick the one with the strongest overall performance for work tasks.” This statement isn’t wrong, but it pushes the most critical judgment onto the reader and avoids the truly valuable question: how do you define “strong,” and how do you measure “fit”?

    A model that tops general leaderboards does not necessarily perform best on your specific task. Real-world performance is shaped by multiple factors: task type, input distribution, context length, latency budget, cost constraints, and more. The scientific approach, therefore, is not to search for the “strongest model,” but to build an evaluation and selection methodology oriented around your own scenarios.

    Structuring Capability Dimensions

    Before evaluation, the vague notion of “strong capability” needs to be broken down into observable dimensions. Widely recognized capability dimensions include:

    • Logical reasoning: multi-step reasoning, mathematical calculation, causal analysis, and constraint satisfaction. These can be examined through questions requiring chain-of-thought reasoning.
    • Coding and engineering: code generation, bug localization, refactoring, and cross-language migration. These should be tested with runnable test cases rather than judging only surface-level correctness.
    • Natural language writing: long-form organization, style control, instruction following, and factual consistency.
    • Multimodal understanding: extracting and reasoning over information from images, documents, and charts, including cross-modal reasoning.
    • Long-context processing: locating key information in very long inputs while maintaining consistency across the context.
    • Stability and consistency: output variance across repeated calls with the same input, and robustness against boundary-case inputs.

    Making capability dimensions explicit is the first step in avoiding “selection by gut feeling.”

    Evaluation Design: From Benchmarks to Scenarios

    A Three-Tier Evaluation System

    1. General benchmark tier: Use industry-recognized public capability benchmarks for initial screening, quickly eliminating clearly unsuitable candidates.
    2. Scenario-specific evaluation tier: Build evaluation sets from real business data. This is the core of the selection process.
    3. Human review tier: For highly subjective outputs (such as copywriting or proposals), introduce human scoring to compensate for blind spots in automated metrics.

    Building a High-Quality Evaluation Set

    The quality of the evaluation set directly determines the credibility of the conclusions. Follow these principles:

    • Cover the real distribution: sample from actual online requests rather than fabricating examples.
    • Set difficulty tiers: include easy, medium, and hard samples to observe how performance curves behave across difficulty levels.
    • Define clear scoring criteria: pre-define reference answers or scoring rules for every sample to ensure reproducibility.

    The following illustrative evaluation framework code shows how to organize the evaluation process (pseudocode used to explain the structure, not a specific interface):

    1. # Illustrative evaluation framework showing process structure
    2. def evaluate_model(model_client, dataset, scorer):
    3. results = []
    4. for sample in dataset:
    5. output = model_client.generate(sample["prompt"])
    6. score = scorer(output, sample["reference"])
    7. results.append({
    8. "id": sample["id"],
    9. "difficulty": sample["difficulty"],
    10. "score": score,
    11. "latency_ms": sample.get("latency_ms"),
    12. })
    13. return aggregate(results)
    14. def aggregate(results):
    15. # Aggregate average scores and latency by difficulty
    16. summary = {}
    17. for r in results:
    18. key = r["difficulty"]
    19. summary.setdefault(key, []).append(r)
    20. return {
    21. k: {
    22. "avg_score": sum(x["score"] for x in v) / len(v),
    23. "avg_latency": sum(x["latency_ms"] for x in v) / len(v),
    24. }
    25. for k, v in summary.items()
    26. }

    Key Metrics

    • Accuracy / pass rate: the core metric for objective tasks.
    • Human preference win rate: for subjective tasks, use pairwise comparisons to reduce scoring noise.
    • Latency and throughput: focus on P50/P95 latency rather than averages.
    • Unit cost: estimate per-task cost based on call volume.

    Scenario-Based Selection Strategy

    Different tasks weight capability dimensions very differently, so selection should be weighted accordingly:

    • Programming and engineering: prioritize coding ability, long-context handling, and tool-calling stability; higher latency is tolerable.
    • Content creation: prioritize writing quality, style control, and instruction following; human evaluation carries greater weight.
    • High-concurrency online services: latency and cost become hard constraints; choose a lighter solution within an acceptable capability range.
    • Document and multimodal scenarios: focus on information-extraction accuracy and cross-modal consistency.

    A practical approach is to build a weighted scorecard: multiply each dimension’s score by its business weight and sum the results. This turns selection from guesswork into calculation.

    Engineering Recommendations

    1. Abstract the call layer: wrap model calls in a unified interface to hide differences, making it easy to swap models and run A/B comparisons.
    1. class ModelClient:
    2. def generate(self, prompt: str) -> str:
    3. raise NotImplementedError
    1. Establish regression evaluation: every time you switch or upgrade models, run the fixed evaluation set to catch capability regressions.
    2. Build observability: use logging services and monitoring alerts to continuously collect online latency, failure rates, and user feedback.
    3. Control costs: optimize unit cost through caching, batching, and tiered routing (route simple requests to lighter solutions).

    Conclusion

    “It depends on what you’re doing” is only a starting point. The real engineering capability lies in translating that phrase into measurable dimensions, reproducible evaluations, and calculable selection. When you can answer with data which model performs better on your tasks and at what cost, model selection stops being a black art and becomes an iterative, verifiable engineering practice.