Large Language Model Selection and Engineering Practices: A Practical Guide

    This guide explains how to choose and combine large language models for real production workloads instead of searching for a single "best" model. It covers a task-based classification framework, layered evaluation criteria, a three-tier cost and subscription strategy, availability and compliance controls, prompt engineering for multi-model collaboration, and a deployment checklist. The goal is a model orchestration system that is measurable, degradable, and replaceable.

    1. The Core Problem: From “Which Model Is Best” to “How to Combine Models”

    As general-purpose LLMs iterate quickly, the assumption that one model leads across the board no longer holds. A more realistic engineering view is that models show clear capability skew across dimensions such as code generation, creative writing, mathematical reasoning, multimodal content generation, and long-document knowledge management. Stability differences for the same model across task types are often larger than the average gap between models. The selection question should therefore be reframed from “which model is strongest overall” to “how to cover the task spectrum with a set of models while keeping uncertainty within acceptable bounds.”

    A practical abstraction is to split tasks into four categories: deterministic tasks (format conversion, structured extraction, text normalization with explicit rules), generative tasks (creative writing, concept exploration, draft proposals), reasoning-intensive tasks (mathematical derivation, complex logic verification), and multimodal tasks (image and video asset generation, document knowledge base Q&A). These four categories place very different demands on models, and using one model for everything usually means overpaying or losing quality on some dimension.

    2. Layered Evaluation Across Capability Dimensions

    Break evaluation into quantifiable items instead of relying on overall impressions:

    • Code and structured output: first-pass success rate, cross-file consistency, and adherence to existing conventions, rather than performance on isolated algorithm puzzles.
    • Text conventions and editability: terminology consistency, sentence concision, absence of redundant embellishment, and ease of secondary editing.
    • Mathematical and symbolic reasoning: accuracy and efficiency of multi-step derivation, with explicit intermediate steps requested when verification is needed.
    • Multimodal generation: usability of generated assets in real workflows, for example whether output can go straight into layout or video editing.
    • Knowledge organization: long-document summarization, cross-document linking, and traceable citations.

    Evaluation should rely on a small in-house benchmark built from the team’s real corpus, rather than substituting public leaderboards for business validation.

    3. Cost Tiers and Subscription Strategy

    Separating cost into three layers makes it clearer: a lightweight tier for high-frequency, low-complexity tasks, a main tier for daily production and collaboration, and a heavy tier for long context, difficult reasoning, and batch generation. A common practice is to let the main tier handle the vast majority of requests, trigger the heavy tier on demand, and use the lightweight tier to intercept simple requests and reduce average cost.

    High-priced tiers do not automatically deliver higher output. If usage stays at the level of web chat interaction, quota consumption and experience volatility significantly weaken the value of a premium tier. Connecting capabilities into your own systems through APIs or a model development platform is usually more stable and more auditable than manually switching between multiple interfaces.

    4. Stability, Compliance, and Access Channels

    In production, availability governance matters as much as model capability: first, rate and quota fluctuations require backoff retries, request queuing, and fallback strategies; second, session data retention and migration risk mean critical context should be kept in your own storage rather than depending on a single session history; third, compliance and data boundaries require sensitive data to be masked and classified before it reaches the model.

    A sketch of a call wrapper follows, focused on retries, timeouts, and fallback:

    1. def call_model(prompt, tier="main"):
    2. for attempt in range(3):
    3. try:
    4. return client.chat(prompt, tier=tier, timeout=30)
    5. except RateLimitError:
    6. time.sleep(2 ** attempt)
    7. except Exception:
    8. if tier == "heavy":
    9. return client.chat(prompt, tier="main", timeout=30)
    10. raise RuntimeError("model unavailable")

    For access channels, prefer programmable integration (API calls or a model development/experimentation platform) so that rate limiting, logging, monitoring alerts, and cost accounting can be handled uniformly. Web interfaces suit exploratory use and are not appropriate for stable production traffic.

    5. Prompt Engineering for Multi-Model Collaboration

    The key to multi-model collaboration is not simple voting but clear division of labor and handoff formats. Take text localization and normalization as an example: a model that leans rigorous produces a structurally complete first draft, a model that leans creative and has a better feel for language polishes it and unifies the style, and rule-based scripts finally validate terminology and formatting. Handoffs should specify machine-verifiable constraints:

    1. Constraints:
    2. 1. No em dashes and no stacked exclamation marks;
    3. 2. See the appendix for the glossary; do not invent translations;
    4. 3. Keep paragraph numbering in the output for easier diff comparison;
    5. 4. Mark uncertain points with [TODO]; do not fabricate.

    For structured extraction tasks, enforce a parseable output format and perform schema validation plus retry on failure at the server side, so that natural-language explanations do not leak into result fields.

    6. Common Pitfalls and a Deployment Checklist

    Pitfalls include replacing batch evaluation with a single hands-on trial, ignoring how much prompts and workflow amplify results, treating session history as the only context source, and using high-cost tiers for simple tasks. A deployment checklist: build a business benchmark set and scoring sheet; bind model tiers to task types; wrap a unified call layer with logging and monitoring alerts; externalize context and artifacts to object storage and version control; and apply dual gates of manual spot checks and automated validation for generated content.

    If you need one integrated foundation for the capabilities above, you can evaluate how Baidu AI Cloud combines general capabilities such as model services, container platforms, object storage, log services, and monitoring alerts to govern the cost, stability, and compliance boundaries of multi-model calls in a unified way. The conclusion is not to pick a single winner, but to build a model orchestration system that is measurable, degradable, and replaceable.