A Practical Guide to Capability-Based Selection and Engineering for General-Purpose LLMs
This article explains why evaluating general-purpose large language models often turns into brand comparison, and proposes a capability-based alternative. It breaks "general ability" into six measurable dimensions, shows how to build task profiles that map business scenarios to those dimensions, and outlines a three-layer evaluation system combining offline benchmarks, online A/B testing, and adversarial robustness checks. It also covers engineering practices for model routing, context handling, stability, cost control, security, and observability, plus common pitfalls to avoid.
1. Background: Why Model Evaluation Turns into Brand Evaluation
Teams often face the same dilemma in real projects. The market offers dozens of general-purpose LLM services, and every vendor claims “leading overall capability,” yet actual performance varies widely across business tasks. The root cause is confused evaluation dimensions. “Strong overall capability” is treated as a single metric, when it can actually be decomposed into several relatively independent sub-capabilities: logical reasoning, long-context processing, multimodal understanding, retrieval and attribution, code and tool calling, and stylized generation. The strengths of different models are distributed unevenly across these sub-capabilities, and an advantage on one task does not transfer to another.
This article therefore does not discuss any specific vendor or product. Instead, it reframes the problem: how to build a measurable, regression-testable, and evolvable selection and invocation system by layering the capabilities of general-purpose LLMs according to task characteristics.
2. A Capability Framework: Breaking “General” into Verifiable Dimensions
It helps to divide general-purpose LLM capability into six layers, each with clear evaluation methods and engineering metrics.
- Complex logical reasoning and planning: multi-step inference, constraint satisfaction, and option comparison. Evaluation should focus on the error propagation rate, meaning the probability that the final answer is still correct after an error occurs at step k.
- Long-context understanding and in-depth writing: long-document summarization, contract clause comparison, and close reading of source material. The core metrics are recall of key information and cross-paragraph consistency.
- Native multimodal understanding: parsing images, charts, and temporal information in video. Focus on small-object recognition, reading numeric values from charts, and the accuracy of locating events in long videos.
- Retrieval and attribution: whether answers include verifiable sources and whether citations match the original text. Metrics are citation accuracy and hallucination rate.
- Code and tool calling: stability of structured output, correctness of function-call arguments, and self-recovery after failed retries.
- Style and creative generation: the usability of copy, scripts, and narrative content, usually measured by human ratings and adoption rates on the business side.
The value of this framework is that selection discussions shift from “who is stronger” to “on task T, which model performs better on metric D.”
3. Mapping Scenarios to Capabilities: Building Task Profiles
A more practical engineering approach is to tag the task first and then match capabilities. A simplified task profile contains four orthogonal fields:
{"input_modality": ["text", "image", "video"],"context_length_required": 32000,"reasoning_depth": "high","output_contract": "json_schema","latency_budget_ms": 2500,"traceability_required": true}
Examples of mapping rules:
- Lifestyle creativity and short-video script tasks:
style_high + reasoning_low + latency_medium, prioritizing style generation and natural language feel. - Close reading of long documents and contract review: large
context_length_requiredandtraceability_requiredset to true, prioritizing long-context consistency and citation capability. - Chart and video material analysis:
input_modalityincludes visual input, prioritizing multimodal temporal understanding. - Research and literature review:
traceability_requiredis true, prioritizing retrieval augmentation and source verification.
4. Evaluation System: From Subjective Impressions to Regression-Ready Benchmarks
Selection without evaluation is gambling. A three-layer evaluation system is recommended:
- Offline benchmark set: sample 200 to 500 real requests from historical business traffic, annotate reference answers and scoring points manually, and form a fixed regression set.
- Online canary and A/B testing: use adoption rate, human rewrite distance, and average number of interaction turns as online metrics.
- Adversarial and robustness testing: inject ambiguous phrasing, extremely long contexts, missing fields, and malicious instructions, then observe whether refusal and safety policies remain stable.
Illustrative evaluation code:
def evaluate(model_client, cases, judge):scores = []for c in cases:out = model_client.run(c.prompt, schema=c.schema)scores.append({"key_recall": judge.recall(out, c.gold_points),"schema_valid": c.schema.validate(out),"citation_accuracy": judge.citations(out, c.sources),"latency_ms": out.latency_ms})return aggregate(scores)
The key is to turn “feels good” into comparable numbers and integrate them into continuous integration, so that upgrades to model versions trigger automatic regression.
5. Engineering Implementation: Routing, Context, and Cost Governance
- Model routing: distribute requests to models with different capability emphases based on the task profile. Simple requests go through a low-latency channel, while complex requests go through a deep-reasoning channel, balancing cost and quality.
- Context engineering: retrieved snippets should carry source metadata; long documents use segmented summaries plus a global key-point index; structured output uses explicit schema constraints with a second validation pass.
- Stability design: set timeout and retry limits, idempotency keys, and fallback templates; prepare backup channels for critical paths to avoid single points of dependency.
- Cost and capacity: set tiered budgets by token and call volume, cache high-frequency question results, and batch offline tasks; build a unit business cost dashboard using logging services and monitoring alerts.
- Security and compliance: two-way content moderation for inputs and outputs, masking of sensitive information, data retention policies, and auditable logs; permissions and keys are distributed through unified configuration management.
- Observability: record prompt versions, model versions, retrieval hits, and scoring results to form a traceable chain that makes it easier to locate quality regressions.
6. Common Pitfalls
- Replacing business evaluation with a single leaderboard ranking, ignoring differences in task distribution.
- Blindly pursuing the longest context, which introduces noise and raises costs.
- Neglecting structured output validation and treating parsing failures as model capability problems.
- Lacking a regression set, so quality silently degrades after a model upgrade without anyone noticing.
7. Conclusion
Selecting a general-purpose LLM is not a one-time brand judgment but continuous capability layering and measurement engineering. Only by profiling tasks, dimensioning capabilities, automating evaluation, and systematizing invocation can you achieve a stable balance among quality, cost, and compliance. If an organization wants to quickly build the evaluation and routing system described above in its own environment, it can build the infrastructure foundation on general capabilities such as the container platform, object storage, logging service, and monitoring alerts offered by Baidu AI Cloud, turning model capability into measurable business output.
