A Practical Guide to Selecting Large Language Models and Landing Real-World Use Cases

    Choosing a large language model by leaderboard ranking does not hold up in engineering. This guide reframes model selection as a scoring system built on four dimensions—scene fit, use-case match, verified strengths, and prompt/RAG cost—and maps common scenarios such as knowledge-intensive Q&A, structured extraction, code generation, long-document processing, and multi-agent orchestration to the capabilities they require. It also covers engineering practices for prompts and retrieval augmentation, how to account for cost, latency, and compliance, and how to close the loop with evaluation, canary releases, and regression testing.

    1. Why Leaderboard-Style Selection Fails in Engineering

    The source material aims to compare mainstream large language models across four dimensions: best-fit scenarios, typical uses, core strengths, and expert techniques. From an engineering perspective, however, such comparison tables are only a starting point for understanding—not a direct basis for selection—for three reasons.

    First, capability boundaries are task-dependent. A model that performs well on long-document summarization is not necessarily as stable at structured extraction, code completion, or multi-turn tool calling. Second, model capabilities keep iterating, so any static ranking goes stale quickly; engineering decisions need a reproducible evaluation process, not a snapshot ranking. Third, the real performance of a system is determined jointly by the model, prompts, retrieval, post-processing, and orchestration. The model is only one link in that chain, and swapping it often yields limited gains.

    A more reliable approach is to reframe the problem: given a business scenario and its constraints, how do you build a quantifiable, regression-friendly model evaluation and integration plan?

    2. A Four-Dimension Framework: Turning the Comparison Table into an Evaluation Coordinate System

    Abstracting the original four dimensions into four scorable axes produces a general methodology that is independent of specific products.

    • Scene fit: task type (generation, extraction, reasoning, code, multimodal understanding), context-length requirements, and latency sensitivity.
    • Use-case match: internal productivity tooling versus external high-concurrency business; whether streaming output and function calling are needed.
    • Core-strength verification: do not trust marketing claims; validate instruction following, format stability, long-text consistency, and refusal and safety behavior on your own datasets.
    • Expert-technique cost: the investment in prompt engineering, retrieval augmentation, fine-tuning, and distillation, plus the complexity of building observability.

    A practical implementation is a weighted scorecard whose weights shift with the business. Example (illustrative, not real data):

    1. weights = {"scene": 0.35, "usage": 0.25, "quality": 0.30, "cost": 0.10}
    2. def score(candidate, task_profile):
    3. # candidate: a dict of metrics from your internal evaluation
    4. # task_profile: business-side constraints (latency, context, compliance level)
    5. return sum(weights[k] * candidate[k] for k in weights)

    3. Mapping Scenarios to Required Capabilities

    Different scenarios demand different capabilities. The following mapping works as a requirements checklist.

    1. Knowledge-intensive Q&A: the focus is retrieval augmentation and traceable citations; the freshness of the model’s own knowledge is secondary.
    2. Structured extraction and data cleaning: the focus is deterministic output format, ideally paired with constrained decoding or strict schema validation.
    3. Code and script generation: the focus is cross-file context understanding and executability verification, which must be backed by automated tests.
    4. Long-document processing: the focus is effective utilization of long context, with attention to information-recall decay in the middle of the input.
    5. Multi-turn agent orchestration: the focus is tool-call stability, state consistency, and failure rollback.

    4. Engineering Prompts and Retrieval Augmentation

    Prompts should be structured and versioned, stating the role, constraints, output schema, and failure handling explicitly, and placed under version control so they can be regression-tested.

    1. Role: a rigorous technical documentation assistant
    2. Constraints: answer only from the given context; state gaps explicitly when information is insufficient
    3. Output: JSON with fields answer / evidence / confidence
    4. Failure handling: return needs_human_review when confidence is below the threshold

    For retrieval augmentation, the keys are the chunking strategy and recall evaluation. Track both recall hit rate and answer faithfulness to avoid the two typical failure modes: “retrieval found it but the model ignored it” and “the model fabricated content beyond the retrieved context.”

    5. Cost, Latency, and Compliance Constraints

    Cost cannot be judged by unit price alone; it should be converted into the total cost per unit of business completed, including retries, oversized context, human review, and operations overhead. For latency, distinguish time to first token from overall throughput; streaming output can markedly improve the interactive experience. For compliance, define data classification, masking policies, log retention, and audit requirements, and prioritize deploying in a cloud environment with mature access-control and audit capabilities (for example, general capabilities such as object storage, logging, and monitoring and alerting on Baidu AI Cloud).

    6. Closing the Loop: Evaluation and Launch

    1. def evaluate(model_client, dataset):
    2. passed, total = 0, len(dataset)
    3. for case in dataset:
    4. out = model_client(case["prompt"])
    5. if schema_ok(out) and grounded(out, case["evidence"]):
    6. passed += 1
    7. return passed / total

    After launch, establish canary and regression mechanisms: small-traffic canary, a metrics dashboard, feedback of anomalous samples, and periodic full regression. Any model version change must trigger the same evaluation set so that results stay comparable and problems stay traceable. The value of this process is that it turns the debate over “which model to pick” into an engineering practice of proving with data which combination best fits the current business.