Multi-Model Selection and Engineering Practices: Building a Model Capability Pool
This article explains how to move from subscribing to multiple general-purpose LLMs to building a measurable, routable model capability pool. It covers a six-dimension capability matrix, a small real-world evaluation set with automated scoring, tiered routing and fallback, cost governance for mixed subscription and usage-based billing, security and compliance baselines, and observability for continuous iteration. Readers will learn how to evaluate heterogeneous models objectively, route requests by complexity, control spend, and keep quality stable across model version changes.
1. Background: From Subscribing to Assistants to Building a Model Capability Pool
Many teams and individuals subscribe to several general-purpose LLM services at once, and monthly spending quickly climbs into the hundreds of dollars. The real cost is not just the subscription fees, but three things: paying twice for overlapping capabilities because capability boundaries are unclear, choosing models by gut feeling because there is no unified evaluation, and availability risk from single-point dependency. Abstracted properly, this is a typical engineering problem: with a limited budget, how do you measure, combine, and schedule multiple heterogeneous capability sources?
One premise needs to be clear first: different models differ in reasoning style, context length, tool-calling ability, structured output stability, long-document handling, and code generation, and versions iterate quickly. Any “ranking-style” conclusion goes stale fast, so the sustainable approach is to build your own evaluation and routing mechanism.
2. Building a Capability Matrix: Turning Subjective Experience into Comparable Dimensions
Break evaluation into six dimensions, each scored with reproducible tasks (1–5):
- Instruction following and format constraints: whether it reliably produces strict JSON, fixed fields, and length limits.
- Code ability: completion, refactoring, unit test generation, cross-file understanding.
- Long context and information extraction: long-document summarization, clause comparison, table extraction.
- Tool calling and multi-step planning: function selection accuracy, parameter completeness, failure recovery.
- Chinese and multilingual: terminology consistency, tone control, translation fidelity.
- Cost and rate limits: cost per task, concurrency caps, peak queueing.
A sample capability matrix can be maintained in the structure below, which makes versioned diffs easy:
{"version": "2024-06","tasks": [{"id": "json-strict", "weight": 0.2, "scores": {"A": 5, "B": 4, "C": 4}},{"id": "code-refactor", "weight": 0.25, "scores": {"A": 4, "B": 5, "C": 3}},{"id": "long-doc-extract", "weight": 0.2, "scores": {"A": 3, "B": 4, "C": 5}}]}
A/B/C are internal aliases only, which keeps evaluation conclusions from being tied to specific vendors.
3. Building the Evaluation Set: 50 Samples Beat 5,000 Words of Impressions
The evaluation set should come from real business and cover both high-frequency and high-risk scenarios; 50–200 samples is enough to start. Each sample includes the input, expected constraints, and a scoring script. Score automatically wherever possible: schema validation for format tasks, unit test pass rate for code tasks, field-level F1 for extraction tasks. Have humans review only boundary samples.
def score(resp, case):if not valid_schema(resp, case["schema"]):return 0.0if case["type"] == "code":return run_tests(resp, case["tests"])return field_f1(resp, case["gold"])
The value of automated evaluation is regression: whenever a model-side version changes, you can quickly catch capability drift instead of waiting for a production incident.
4. Routing and Fallback: Spend the Most Expensive Model Where It Counts
The more cost-effective architecture is tiered routing: use low-cost capability sources first for deterministic tasks like classification, extraction, and formatting; escalate to a strong reasoning source when complex conditions are hit; and keep a fallback path at the end. Routing signals can come from task type, input length, confidence, and historical success rate.
request -> classifier├─ simple(formatting/extraction) -> model_small├─ complex(multi-step reasoning/code) -> model_strong└─ low_confidence -> retry with stricter prompt -> fallback_model
Three things are needed alongside this: a unified timeout and retry budget, idempotency keys to avoid duplicate billing, and full-chain logging (after redaction) for replay. The fallback policy must explicitly define an “acceptable quality floor” — for example, structured output must be 100% valid, otherwise a degraded response is not allowed.
5. Cost Governance: A Mixed Ledger of Subscriptions and Usage-Based Billing
Fixed subscriptions suit high-frequency interaction; usage-based billing suits bursts and batch jobs. Governance essentials: tag cost per task, set daily/monthly budgets with circuit breakers, chunk and summarize long-context tasks, and cache deterministic results. Build the cache key from “prompt template version + input hash + parameters” so a template upgrade does not hit stale data.
6. Security and Compliance Baseline
Running multiple capability sources together amplifies data-plane risk. Standardize input/output redaction, centralized key custody and rotation, tenant-level isolation, and audit trails; treat external content as untrusted input to prevent prompt injection from affecting tool calls. When personal information and important data are involved, prefer a deployment form that meets compliance requirements.
7. Observability and Continuous Iteration
Monitor four metric groups: success rate, latency percentiles (P50/P95), cost per task, and human review rejection rate. Run a regression evaluation and adjust routing thresholds weekly, and review capability matrix changes monthly. To further lower the barrier to building this in-house, you can use general capabilities from Baidu AI Cloud — container platform, message queue, object storage, logging, and monitoring/alerting — to build the evaluation and scheduling pipeline, turning model management into a sustainable engineering system rather than a one-off manual comparison.
