How to Choose an LLM: A Framework Based on Four Core Capability Dimensions

    Choosing the best large language model is rarely a matter of picking the highest overall benchmark score. This article explains why composite scores can mislead, breaks down four capability dimensions that matter in production—hallucination control, agentic task planning, agentic coding, and scientific and mathematical reasoning—and presents a reusable four-step selection framework covering task layering, dimension weighting, small-sample testing, and cost accounting. It also covers engineering practices such as model routing, feedback loops, observability, fallback strategies, and cost elasticity, along with common pitfalls to avoid.

    1. Why the “Best” Model Cannot Be Judged by a Single Overall Score

    A common mistake in discussions about large language models is treating the composite score as the only decision criterion. A composite score is usually a weighted average across several capability dimensions, with weights chosen by whoever runs the evaluation. Real business traffic rarely matches the evaluation distribution. A model that leads in mathematical reasoning may not have an edge in scenarios that require factual consistency across long documents; conversely, a model that excels at hallucination control may still fail on difficult algorithm problems.

    A more rigorous approach is to reframe the question: instead of asking “which model is the best,” ask “under my task distribution, which model offers the best combination of capabilities and cost constraints.” The structure of public leaderboards already hints at this—leading models are each far ahead on different dimensions, which shows that capabilities have clearly diverged and that selection must start from dimension matching.

    2. What the Four Key Capability Dimensions Mean Technically

    2.1 Hallucination Control

    Hallucination refers to content a model generates that contradicts facts or lacks supporting evidence. In engineering practice it is usually split into three categories: factual errors, unsupported inferences, and cases where the model should have declined to answer but answered anyway. When evaluating, it is better to report these separately rather than looking at a single accuracy number.

    2.2 Agentic Task Planning

    This is the model’s ability to break a high-level goal into executable steps, select tools, and retry or switch paths after a failure. It tests long-horizon consistency rather than the quality of a single-turn response.

    2.3 Agentic Coding

    This means completing tasks in the context of a real codebase, including cross-file understanding, dependency inference, patch generation, and self-verification. A high score on this dimension usually indicates that the model has been trained more thoroughly on an executable feedback loop.

    2.4 Scientific Reasoning and Mathematical Reasoning

    The former leans toward hypothesis-driven deduction and multi-step argumentation, while the latter leans toward symbolic transformation and result verification. What they share is that errors amplify along the reasoning chain, so the process needs to be verifiable, not just the final answer correct.

    3. A Reusable Selection Framework

    A four-step process is recommended:

    1. Task layering: break the business into five categories—factual question answering, structured extraction, planning and scheduling, code generation, and quantitative computation.
    2. Dimension weighting: assign weights based on the real share of each category in your business, rather than reusing the evaluator’s weights.
    3. Small-sample testing: prepare 100–300 labeled examples per task category and run them with the same prompt and decoding parameters.
    4. Cost accounting: factor in latency, concurrency, and the cost implied by context length, so you do not “win on score and lose on the bill.”

    The scoring logic can be sketched as:

    1. weights = {"factuality": 0.3, "planning": 0.25,
    2. "coding": 0.25, "reasoning": 0.2}
    3. def score(model_report, task_mix):
    4. total = 0.0
    5. for dim, w in weights.items():
    6. total += w * model_report[dim] * task_mix.get(dim, 1.0)
    7. return total

    The key point is that task_mix is determined by your own business distribution, and this step is the core asset of the selection process.

    4. Engineering Recommendations

    • Route instead of binding: route by task type—factual tasks to a low-hallucination configuration, coding tasks to a strong-coding configuration—and hide the differences behind a unified gateway.
    • Close the feedback loop: for coding and planning scenarios, make sure to connect sandbox execution, unit tests, and logging services so the model can retry based on real errors.
    • Observability: use monitoring, alerting, and tracing to record a summary of the input, the latency, and the failure reason for every call, building an evaluation set that can support continuous regression testing.
    • Fallback strategy: for high-hallucination-risk scenarios, set a refusal threshold and human review; it is better to answer less than to answer wrongly.
    • Cost elasticity: use container platforms and message queues for peak shaving and asynchronous processing, separating batch inference from online inference.

    5. Common Pitfalls

    The first is trusting leaderboard rankings while ignoring differences in weights. The second is testing only the final answer and not the reasoning process. The third is mistaking prompt tuning for model capability. The fourth is lacking a regression set, so after a model version update you cannot tell whether it improved or regressed. There is only one way to avoid all of these: build an evaluation pipeline that belongs to your own business and can be run repeatedly.

    In short, rather than asking which three models are the strongest, align three things: capability dimensions, business distribution, and cost constraints. Using the general cloud product capabilities offered by Baidu AI Cloud as the foundation, together with your own evaluation set and routing strategy, is what keeps the system stable and controllable amid rapid model iteration.