Model Selection Guide: Match Model Capabilities to the Task
Choosing the right model is no longer about availability but about fit. This guide shows how to build an engineering model selection system based on a multi-model catalog, task profiling, routing policies, and an evaluation loop. It covers a six-dimension task profile, a capability matrix, two worked scenarios (long-document reading with cross-verification, and dirty data cleaning with visualization), rule- or classifier-based routing with fallback, evaluation metrics, and governance controls. The core principle: decompose the task first, then match capabilities; leave precise computation to programs; segment long inputs instead of forcing a single pass; and route instead of applying one model to everything.
Model Selection Guide: Match Model Capabilities to the Task
As multi-model services become more common, the question teams face is no longer “do we have a model available?” but “which class of model should handle this specific task?” Requirements differ sharply across tasks: context length, structured output, tool calling, code execution, multimodal understanding, latency, and cost. Sending every request to a single “do-everything” model usually produces three problems: simple tasks cost too much, complex tasks fall short on quality, and long-chain tasks are unstable. A more sound approach is an engineering selection system built on a multi-model catalog, task profiling, routing policies, and a closed evaluation loop.
1. Profile the Task First, Not the Leaderboard
The first step in model selection is not comparing parameters but breaking the task down clearly. Build a task profile along six dimensions:
- Input scale and structure: Is the input short text, a multi-page document, a table, an image, or a mix of modalities? Does it require cross-file comparison? Does the context exceed a single window?
- Output constraints: Is the output free text, fixed JSON, a table, a chart, or executable code? Does it require per-item citations, page numbers, or an audit trail?
- Reasoning depth: Does the task need summarization and classification, or multi-step reasoning, contradiction detection, causal analysis, and cross-verification?
- Tool and execution needs: Must the model call retrieval, databases, code execution, chart rendering, or file parsing? If the task involves precise calculation, prefer a “model generates + program executes” combination.
- Latency and throughput: Is this offline batch processing, online Q&A, or urgent work? What latency, concurrency, and per-call cost are acceptable?
- Compliance and security: Is the data sensitive? Are masking, permission isolation, audit logs, private deployment, or regional processing required?
Only when the task profile is clear enough does capability matching have a basis. Otherwise, selection degrades into swapping models on a hunch.
2. Build Capability Dimensions and a Selection Matrix
Organize candidate models into a selection matrix using capability tags. Common dimensions include:
- Long context and document understanding: multi-page report reading, contract review, cross-document comparison, long meeting notes summarization.
- Structured data and table processing: data cleaning, field mapping, anomaly detection, SQL generation, metric calculation.
- Code and tool calling: script generation, API orchestration, automated testing, data visualization pipelines.
- Multimodal understanding: images, scanned documents, charts, UI screenshots.
- Reasoning and planning: complex task decomposition, multi-step validation, strategy generation.
- Speed and cost tiers: the same capability tier usually offers different throughput and cost options, used to separate online interaction from offline batch processing.
In a multi-model service environment such as Baidu AI Cloud, selection information should focus on general dimensions: capability tags, context length, modality support, throughput tiers, and billing model. The point is not to chase the “strongest model” but to match task requirements to a capability tier.
3. Scenario One: Long-Document Reading and Cross-Verification
Long-document tasks look like simple “summarization” but actually contain several subtasks: document parsing, section location, conclusion extraction, page-level sourcing, consistency checking, format constraints, and de-duplicated restatement. Such tasks should favor models with strong long-context capability, stable instruction following, and structured output support, combined with retrieval augmentation and segmented validation.
A practical pipeline:
- Parse and build anchors: split the document by page or section, preserving page numbers, heading levels, and table positions to form traceable text blocks.
- Separate table of contents from body: state explicitly in the prompt “do not restate the table of contents,” and require conclusions to come only from body evidence.
- Two-pass reading: the first pass extracts candidate conclusions and evidence; the second pass cross-checks key figures, and on conflict outputs the original value, the conflict location, and a suggested correction.
- Structured output: require each conclusion to include “conclusion, evidence summary, page number, confidence” to support human review.
- Programmatic validation: apply rule checks to numbers, dates, units, and percentages; the model explains contradictions, the program performs exact comparison.
This kind of task is not suited to a short-context model handling everything in one pass, because the model may lose earlier constraints before it reaches the appendix. A safer approach is “long-context model + retrieval recall + segmented verification + structured output.” If latency requirements are high, pick a higher-throughput configuration within the same capability tier; if quality is the priority, pick a configuration with steadier reasoning and more consistent output. Speed and quality are not either/or; they are balanced through task tiering.
4. Scenario Two: Dirty Data Cleaning and Visualization
The core of data cleaning is not writing a nice description but producing executable, reproducible, and inspectable processing logic. Such tasks suit models with table understanding, code generation, and tool-calling ability, and key computations should be handed to programs.
Recommended flow:
- Identify fields and quality issues: missing values, duplicate records, inconsistent units, messy notes, out-of-range dates, outliers.
- Generate cleaning rules: have the model output cleaning rules and pseudocode, confirm them manually, then execute.
- Keep anomalies in a separate table: do not delete anomalies outright; retain an anomaly table with reasons and actions taken to satisfy audit needs.
- Chart generation: the model produces chart configuration or query statements; the rendering service produces the charts.
- Result review: sample-check key metrics to avoid errors that merely “look reasonable.”
Illustrative pseudocode:
Read the sales detail tableValidate fields: store, month, sales amount, notesMissing month -> mark as missing, exclude from year-over-yearDuplicate records -> deduplicate by primary key and log conflictsOutlier amounts -> apply percentile rules and list in a separate anomaly tableProduce cleaned detail table + anomaly list + metric summaryCall the chart rendering service to output trend and distribution charts
The key principle here: the model explains and generates rules; the program executes them precisely. For finance, sales, and operations data tasks, avoid letting the model “mentally compute” summary results.
5. Replace One-Size-Fits-All with Routing
Once task types are stable, add a model routing layer. Routing policies can be rule-based or classifier-based. For example:
routes:- name: long_document_reviewwhen:input_type: documentpages: "> 20"need_citation: truetarget: long_context_modelfallback: segmented_retrieval_pipeline- name: dirty_data_cleaningwhen:input_type: tableneed_code: truetarget: table_code_modelpost_process: execute_and_validate- name: simple_faqwhen:input_tokens: "< 2000"need_realtime: truetarget: fast_modelcache: true
The routing layer should support timeout fallback, cost caps, sensitive-data interception, and output format validation. Set a “high-quality tier” for high-value tasks and an “economy tier” for batch summarization and classification. A single task can also use a “fast then slow” strategy: a fast model drafts, then a high-quality model reviews key sections.
6. Build an Evaluation Loop, Not a One-Time Decision
Model selection is not a static decision. Build a small evaluation set for each task type covering normal, boundary, and adversarial samples. Metrics should include at least task completion rate, factual consistency, citation accuracy, format compliance rate, average latency, per-call cost, and human rework rate. After launch, keep recording route hits, fallback counts, abnormal outputs, and user feedback, and re-evaluate periodically.
Avoid judging from a few demo cases. For long-document tasks, check whether page numbers are accurate and whether appendices are missed; for data tasks, check whether cleaning rules are reproducible and anomalies are listed separately; for online tasks, check P95 latency and cache hit rate. Only when quality, speed, and cost sit in the same table does selection carry engineering meaning.
7. Governance and Risk Control
Multi-model selection also requires governance: masking of sensitive data and permission isolation; audit of prompts and output logs; model call quotas and cost alerts; schema validation for structured output; allowlists for external tool calls; and human review for high-impact tasks. Model output should be treated as a candidate result, not an unverified final fact.
In short, matching models to tasks means: decompose the task first, then match capabilities; do not make the model compute what a program can compute; do not force a single pass over what can be segmented; do not apply one model to everything when routing is possible. With a multi-model catalog, task profiles, routing policies, and an evaluation loop, teams can achieve a more stable balance among quality, speed, and cost.
