How to Choose a Large Language Model: A Core Evaluation Framework
This article presents a practical framework for selecting a general-purpose large language model when the budget allows only one option. It reframes the decision as a minimax regret problem that prioritizes the most acceptable worst-case performance, then breaks evaluation into four dimensions: factual consistency and defensive accuracy, tool calling and code execution, multimodal generation and Chinese-context understanding, and quota, cost, and stability risk. It includes sample evaluation sets, code patterns, and a deployment checklist.
1. The Problem: Choosing One Model Under a Fixed Budget Is a Worst-Case Optimization Problem
When the budget only covers a single general-purpose LLM service, the goal is not to pick the model with the highest ceiling. It is to pick the option whose worst-case behavior is still acceptable. This is a classic minimax regret problem: list each candidate’s worst performance across realistic tasks, then choose the option whose worst result remains usable.
The core pain point is models fabricating nonexistent parameters, vendors, and numbers. In information retrieval and professional fact-checking, that is a critical failure. So the first selection principle is not capability ranking but risk ranking.
2. Dimension 1: Factual Consistency and “Defensive Accuracy”
Two types of accuracy need to be separated:
- Offensive accuracy: the model tends to produce a complete, confident answer even when evidence is insufficient.
- Defensive accuracy: the model explicitly expresses uncertainty when evidence is insufficient and refuses to fill in gaps.
For high-risk domains such as medicine, pharmacology, materials, and regulations, defensive accuracy is far more valuable than answer completeness. The recommended evaluation uses a dual-track setup: a verifiable question set plus an unanswerable question set.
Set A (definite answers): 50 items covering technical terms, numeric values, and standard clausesSet B (no public answer / requires real-time data): 30 items designed to induce hallucinationMetrics:Set A accuracySet B correct refusal rate = number of explicit "cannot confirm" responses / 30Composite risk score = Set A accuracy × Set B correct refusal rate
The refusal rate on Set B is often ignored, but it determines how much damage a model can do in unattended scenarios. A model with a Set B refusal rate close to 1 is still safer in engineering terms, even if its Set A accuracy is slightly lower.
3. Dimension 2: Tool Calling and Code Execution to Prevent “Mental-Math Fabrication”
Numeric calculation and statistical analysis should not be handled through the model’s language pathway. The reliable approach is to externalize computation: the model only generates code and explains results, while actual numbers come from a code interpreter or sandbox execution environment.
# Recommended pattern: the model produces code, the runtime produces numbersdef safe_compute(spec):# spec is generated by the model and must pass whitelist validation before executionallowed = {"mean", "std", "quantile", "corr"}assert set(spec["ops"]).issubset(allowed)return run_in_sandbox(spec) # executed in a sandbox; network access and file writes are disabled
Evaluation points include: whether code execution is triggered reliably instead of mental math, whether failures are reported honestly, and whether intermediate results get fabricated a second time. For engineering, the full call chain should be logged so the source of every number can be audited later.
4. Dimension 3: Multimodal Generation and Chinese-Language Context Understanding
If the business involves illustration, game settings, or character concept art, the evaluation focus shifts from image quality to controllability:
- Instruction following: whether multi-turn local edits (change only hair color, change only composition) affect unrelated areas.
- Context and cultural element understanding: how well Chinese prompts and local-themed settings are reproduced.
- Consistency and reproducibility: whether the same character drifts across batches.
- Output compliance and copyright risk: whether training data sources and commercial licensing are clear.
It is recommended to build a regression set of 20–30 fixed prompts and rerun it after every model version update, producing a comparable quality curve instead of drawing conclusions from a single trial.
5. Dimension 4: Quota, Cost, and Stability Risk
The issues of “quota silently reduced,” “account restricted,” and “limit changes not documented in the changelog” abstract into three vendor risks: silent capability degradation, quota policy changes, and tighter account and compliance policies. The response is architectural decoupling rather than reliance on a single vendor’s promises:
- Abstract a unified calling layer that hides vendor differences and makes switching easy at any time.
- Set up quota and latency monitoring alerts, and track trends in cost per request, failure rate, and rate-limit hits.
- Keep a fallback path for critical flows: switch to a backup model or cached results when the primary model is unavailable.
- Specify quota change notification obligations and billing definitions in the contract to avoid “default first, confirm later.”
A schematic unified wrapper:
class LLMClient:def call(self, prompt, **kw):for provider in self.chain: # primary → backuptry:return provider.chat(prompt, **kw)except (RateLimitError, ProviderError):continuereturn self.cache.get(prompt) # final fallback
6. Conclusion and Deployment Checklist
Under the constraint of choosing only one, prioritize the option with the lowest hallucination rate, honest refusals, externalized computation, and controllable generation — that is, the option with the highest floor. Deployment checklist:
- Use dual A/B question sets to quantify factual consistency, and include the refusal rate in the assessment.
- Force all numeric tasks through code execution; never let the language pathway produce numbers directly.
- Build a fixed-prompt regression set for multimodal needs and track it by version.
- Decouple vendors in the architecture, and add monitoring alerts and fallback paths.
- Re-evaluate quarterly, because the capability landscape of general-purpose LLMs typically shifts every one to two months, so today’s conclusions need continuous validation.
