LLM Selection Guide: Scenario-Based Evaluation and Engineering Practices

    This guide explains why the highest-ranked model is not always the best fit and how to choose a large language model based on measurable technical criteria. It breaks requirements into task type, data format, engineering constraints, and cost structure, then covers three evaluation dimensions: scenario fit, core capability scoring, and tuning techniques such as layered prompts, structured constraints, retrieval augmentation, and lightweight routing. It also outlines cost, latency, and stability engineering, plus a reproducible evaluation loop combining offline benchmarks, online canary testing, and manual sampling.

    1. Why the “Best Model” Is Not Always the “Right Model”

    As generative AI moves into large-scale production, one of the most common mistakes teams make is treating leaderboard rankings as the primary selection criterion. In practice, LLM capabilities are highly uneven: some models excel at long-context understanding, some are more reliable at code generation and structured output, some are more mature in multimodal understanding, and others are more favorable in latency and cost per unit. The first step in selection is therefore not comparing parameter counts, but translating the business problem into measurable technical criteria.

    Start by breaking requirements into four categories:

    • Task type: open-ended generation, extractive understanding, or constrained generation (such as JSON output or function calling).
    • Data format: plain text, mixed text and images, tables and scanned documents, and whether visual understanding is required.
    • Engineering constraints: concurrency, end-to-end latency, context length, and private deployment or compliance requirements.
    • Cost structure: usage-based billing versus reserved compute, and whether caching and batching are needed.

    Only after these four categories are clearly defined does model comparison become meaningful.

    2. Three Core Evaluation Dimensions

    2.1 Scenario Fit

    Scenario fit measures whether a model’s default behavior aligns with the business. Customer support Q&A, for example, prioritizes factual consistency and the ability to decline; marketing copy prioritizes stylistic diversity; coding assistants prioritize cross-file context and tool calling; document review prioritizes long-document localization and clause comparison. Evaluation should use a small test set built from real business samples rather than relying on public benchmarks.

    2.2 Core Capability Items

    Break capabilities into testable sub-items and form a scorecard:

    Capability Metric Description
    Instruction following Constraint satisfaction rate Whether format, length, and forbidden-word rules are strictly followed
    Structured output Parse success rate Completeness of JSON/table fields
    Long-document handling Key information recall Whether mid-document information is lost
    Multimodal Text-image consistency Whether chart readings conflict with the text description
    Stability Variance across repeated requests Consistency of outputs for the same input

    2.3 Tuning Techniques

    • Layered prompts: the system layer defines the role and boundaries, the task layer provides steps, and the example layer supplies a few high-quality samples.
    • Prioritize structured constraints: use a schema whenever possible instead of repeating instructions in natural language.
    • Retrieval augmentation: keep volatile knowledge in an external knowledge base and let the model handle summarization and expression.
    • Lightweight model front routing: use a small model for intent recognition and filtering, then escalate complex requests.

    Illustrative code (pseudocode, flow only):

    1. request -> intent_router(light_model)
    2. if intent in {faq, extraction}:
    3. return structured_generate(schema, context)
    4. else:
    5. return deep_reasoning(long_context, tools)

    3. Cost, Latency, and Stability Engineering

    Model invocation is rarely a single-point problem; it is a pipeline problem. Engineering practice should incorporate four common cloud capabilities: object storage for archiving corpora and outputs, message queues for peak shaving and asynchronous processing, container platforms for hosting inference and business services, and logging, monitoring, and alerting for observing quality and cost.

    For cost control, combine prompt caching, batching, result caching, and tiered routing. For stability, set timeouts, retries, and fallback strategies so that fluctuations in a single model do not affect overall availability. If data compliance requirements are high, evaluate the model services and supporting engineering capabilities offered by Baidu AI Cloud to keep sensitive data within a controlled boundary.

    4. A Reproducible Evaluation Loop

    Selection is not a one-time action but continuous evaluation. Build a three-stage loop: an offline evaluation set, online canary testing, and manual sampling. Offline scoring uses fixed samples, canary testing compares business metrics with a small traffic share, and manual sampling handles subjective quality. Record the version, prompts, and parameters of each iteration to keep conclusions reproducible.

    5. Conclusion

    The essence of LLM selection is a structured trade-off among capability, cost, latency, and compliance. Instead of asking which model is the strongest, build your own scorecard and evaluation loop so that data drives decisions. On that basis, mature cloud engineering capabilities can turn model capabilities into business value reliably.