Large Model Selection and Deployment: A Practical Guide to Routing, Evaluation, and Cost Control

    A practical guide to selecting and deploying large language models beyond benchmark rankings. It explains how to tier tasks, build a three-level evaluation set, define verifiable routing configurations, enforce structured outputs, handle failures, control costs, and roll out upgrades with canary releases and feedback loops.

    When a new generation of general-purpose large models is released, developers care less about leaderboard positions and more about a simple question: “Which model should handle my task?” This article breaks down how to split work across general chat, complex reasoning, and code generation, and lays out a deployment-ready workflow covering selection, prompting and structured output, retry and cost-control strategies, quality evaluation, and canary rollout. The goal is to build a model routing and evaluation system that matches your own workload, avoid chasing every release, and turn model upgrades into real gains in delivery speed and stability.

    1. Why a Version Update Sparks “Failure” Discussions

    A recent version update of a general-purpose large model drew heated discussion in the community, focused on two points: a small increase in overall benchmark scores, and obvious errors in generated output where the subject’s action did not match the scene—dubbed a “failure” by users.

    From an engineering perspective, these two observations are not contradictory. An aggregate benchmark score reflects average performance across a broad task distribution, while a specific generation task often falls in the tail of that distribution. A few points of improvement in the average does not guarantee the tail scenarios improve in step. Treating a leaderboard score as equivalent to production readiness is a classic inference bias.

    A more reasonable reading is that a version update raises the overall capability baseline and changes the inference cost structure. Whether a specific task benefits must be verified against your own evaluation set.

    2. Capability Tiering: Splitting “One Model” into Three Task Tiers

    A useful practice is to tier tasks by complexity first, then decide the calling strategy.

    • Tier 1: General chat and routine text processing. Includes summarization, rewriting, classification, information extraction, and format conversion. Characteristics: short context, clear constraints, higher fault tolerance.
    • Tier 2: Complex reasoning and multi-step analysis. Includes long-document comparison, metric attribution, tradeoff analysis, and math or logic derivation. Characteristics: long chains, many intermediate steps, errors accumulate.
    • Tier 3: Code generation and engineering tasks. Includes cross-file changes, interface implementation, test completion, and defect localization. Characteristics: heavy dependence on context completeness and toolchain integration, high cost of errors.

    The value of tiering is that each tier has a completely different sensitivity to model capability, context length, latency, and unit price. Assigning Tier 1 tasks to the strongest model is a waste; assigning Tier 3 tasks to a lightweight model invites rework.

    3. Evaluation Criteria: Why Score Gaps Do Not Equal Experience Gaps

    Scores from different evaluation systems cannot be compared directly across the board, for three reasons:

    1. Different question distributions. A benchmark weighted toward knowledge recall and one weighted toward multi-step reasoning can produce opposite rankings.
    2. Different scoring methods. Multiple-choice metrics and human preference evaluation differ greatly in sensitivity to “expression style.”
    3. Different versions and parameters. Sampling temperature, system prompts, and whether tool calling is enabled all change results significantly.

    The recommendation is a three-level evaluation setup:

    1. L1 Smoke set (20–50 items): must run before release; covers core scenarios and known failure cases
    2. L2 Business set (200–500 items): sampled to match real traffic distribution; scored by both human and rule-based tracks
    3. L3 Adversarial set (continuously accumulated): online failure cases flow back in; specifically covers edge and long-tail cases

    Only when L2 aligns with your own business distribution do the scores carry decision-making value.

    4. Selection Method: From Chasing Releases to Verifiable Routing

    A four-step method is recommended:

    1. Task profiling. Measure the call share of each tier, average input length, acceptable latency, and the per-request cost ceiling.
    2. Candidate narrowing. Keep 2–3 candidates per capability tier; comparing too many at once adds noise to the conclusion.
    3. Same-condition evaluation. Unify the prompt template, temperature, and maximum output length to control variables.
    4. Routing consolidation. Write the conclusion into configuration rather than hard-coding it in business logic.

    Illustrative routing configuration:

    1. routing:
    2. chat: { tier: light, timeout_ms: 3000, max_tokens: 1024 }
    3. reason: { tier: strong, timeout_ms: 12000, max_tokens: 4096 }
    4. code: { tier: strong, timeout_ms: 15000, max_tokens: 8192, tools: true }

    The benefit of configuration is that a new version only requires a canary switch, with no changes to business logic.

    5. Prompting and Structured Output: Stability Over Style

    The first requirement in production is stable, parseable output. Three lessons:

    • Define an explicit output contract. Constrain the return structure with fixed fields to reduce post-processing branches.
    1. { "summary": "string", "risks": ["string"], "confidence": 0.0 }
    • Decompose long tasks. Split “analyze and conclude” into three steps—extract facts → compute → conclude—and validate each step separately.
    • Prioritize factual constraints. Ask the model to flag uncertain items rather than forcing a definitive answer.

    For multi-step reasoning, add a “self-check” step: have the model list key assumptions before giving a conclusion, then have the program verify whether the assumptions match the input. This significantly reduces accumulated error.

    6. Failure Handling and Cost Control

    • Tiered retries. Apply exponential backoff only to retryable errors (timeouts, rate limits); do not retry semantic errors—fall back to a stronger tier or escalate to a human.
    • Cache first. Apply semantic caching to high-frequency repeated requests; hit rates typically come from a small set of hot questions.
    • Context trimming. Retrieve first and then assemble for long documents instead of stuffing in the full content indiscriminately; this saves money and reduces distraction.
    • Budget guardrails. Set call quotas and alert thresholds per business line to prevent abnormal traffic from inflating costs.

    7. Rollout and Observability: Canary, Feedback, Closed Loop

    1. Canary. Ramp traffic gradually by percentage and keep one-click rollback available.
    2. Observability. Log input summaries, output structure validation results, latency, and failure-reason categories, with data desensitization in mind.
    3. Feedback. Online failure cases automatically enter the adversarial set, forming an evaluation closed loop.
    4. Review. Compare win rates and costs of each tier on the real distribution on a weekly basis, and adjust routing dynamically.

    8. Common Pitfalls

    • Replacing your own evaluation with an aggregate leaderboard.
    • Routing all tasks to the strongest model and losing control of cost.
    • Skipping output structure validation and breaking downstream parsing.
    • Skipping canary on version upgrades, leaving the failure scope uncontrollable.
    • Tracking only success rate, not rework rate or human takeover rate.

    Conclusion

    Model version updates are the norm; the variables that are truly controllable in engineering are the evaluation system and the routing strategy. Tier the tasks, make evaluation solid, and turn routing into configuration; combined with canary rollout and failure feedback, this balances capability upgrades against cost stability. If you need managed model services, logging and monitoring alerts, or containerized deployment as foundational capabilities, you can build them with general-category products on Baidu AI Cloud, but the specific selection should still be based on your own evaluation results.