How to Choose a General-Purpose LLM Service: A Practical Evaluation Framework
Choosing between two general-purpose LLM services on a limited budget is less about picking the highest ceiling and more about controlling tail risk. This article breaks down five evaluation dimensions—hallucination and defensive accuracy, structured output and tool-calling stability, code execution for numerical tasks, multimodal and Chinese-context understanding, and quota, rate-limit, and cost predictability—along with a one-week evaluation workflow and architecture patterns such as a unified routing layer and fallback chains that keep model selection replaceable, observable, and resilient to upstream policy changes.
1. Reframing the Problem: What You Are Actually Choosing Under a Budget Constraint
When the budget only allows two options, most teams’ instinct is to pick the one with the strongest overall capability. In engineering practice, that instinct often fails: the capability ranking of general-purpose LLM services is reshuffled every month or two. Today’s leader can be matched tomorrow. What actually determines whether a project succeeds is whether the one capability you genuinely depend on stays stable.
A more rigorous framing is this: under a budget constraint, choose the option with the highest floor and the smallest variance, not the highest ceiling. The floor refers to whether the worst-case output quality is acceptable on the task category you use most.
Shifting the goal from “chasing the peak” to “controlling tail risk” also changes how you evaluate: stop looking at demo quality, and start looking at what failure samples look like, whether failures are detectable, and how expensive they are to fix.
2. Dimension 1: Hallucination Rate and “Defensive Accuracy”
In scenarios like querying specialized reference material, verifying medical and regulatory text, and citing data, the cost of fabricated content is far higher than the cost of an incomplete answer. Two failure modes need to be distinguished:
- Exposed failure: the model explicitly states “not found” or “insufficient evidence”; the task halts, but the conclusion remains trustworthy.
- Hidden failure: the model returns well-formatted, confidently phrased content with no supporting source, and downstream processes accept it as-is.
The second type is what is genuinely dangerous in engineering. Evaluation should measure the “proportion of unsupported statements” and whether “refusals or downgrades are appropriate,” rather than only how complete the answers look. A healthy system should answer less rather than fill in gaps off the cuff.
The practical approach is to move validation into the pipeline instead of relying on the model’s self-restraint:
def grounded_answer(question, retrieved_docs, model, threshold=0.6):context = "\n".join(retrieved_docs)prompt = f"""Answer the question based only on the material below.If the material is insufficient, you must answer "insufficient material". Speculation is forbidden.Material:{context}Question: {question}"""ans = model(prompt)if ans.strip().startswith("insufficient material"):return {"answer": None, "need_more_docs": True}# Second-pass self-check: tag each sentence with a source numbercheck = model(f"Tag each sentence of the following answer with a source number; write 0 if there is no source:\n{ans}")if check.count("0") / max(ans.count("."), 1) > threshold:return {"answer": None, "need_more_docs": True}return {"answer": ans}
3. Dimension 2: Structured Output and Tool-Calling Stability
In enterprise deployments, models rarely output directly to humans. More often they are one link in a chain, producing output consumed by programs. The key metrics here are format compliance rate and tool-call correctness: whether fields are complete, whether enum values are out of range, whether parameter types are correct, whether a tool is called when it should be, and whether the model refrains when it should not.
It is worth defining machine-checkable acceptance assertions for each task category, turning subjective impressions into objective metrics:
import jsondef validate(schema, raw):try:obj = json.loads(raw)except json.JSONDecodeError:return False, "invalid_json"missing = set(schema) - set(obj)if missing:return False, f"missing:{missing}"for k, t in schema.items():if not isinstance(obj[k], t):return False, f"type_error:{k}"return True, "ok"schema = {"drug": str, "dose_mg": (int, float), "evidence": list}
In batch evaluation, also record the “pass rate after retries.” If an option needs three retries to become compliant, its real cost must be multiplied by the retry factor.
4. Dimension 3: Do Not Make the Model Do Arithmetic in Its Head
For tasks involving statistics, unit conversion, and numerical fitting, the correct approach is to have the model generate code and execute it in a sandbox, rather than having the model produce numbers directly. This principle is independent of any specific product and is a general engineering consensus.
# Have the model produce executable code, then run it in the sandbox and return the resultplan = model("Write a function that computes the difference in means and the 95% confidence interval for two samples. Return code only.")result = sandbox.run(plan) # Limit CPU, memory, and execution time; no external networkfinal = model(f"Summarize the following execution result {result} in Chinese. Do not modify the numbers.")
Supporting requirements include sandbox isolation, no outbound network access, execution timeouts, a dependency allowlist, and a second-pass check of returned numbers. Without a sandbox, it is better to downgrade the task to “provide the calculation method” than to accept a direct conclusion.
5. Dimension 4: Multimodal and Chinese-Context Understanding
For image generation and understanding needs, evaluation focuses on three areas: instruction following (whether the specified region is modified as constrained while the rest stays unchanged), fidelity of Chinese and local-context semantics, and consistency across multiple rounds of edits. It is advisable to build a fixed test set of 30–50 cases covering local edits, text rendering, style transfer, and multi-object counting, run a regression after every change, and record pass rates with double-blind human scoring to avoid being misled by a single demo.
6. Dimension 5: Predictability of Quotas, Rate Limits, and Cost
Long-term cost is determined not only by unit price but also by quota policy and rate-limiting behavior. What needs to be confirmed in advance: whether rate limits exist, concurrency caps, context-length tiers, peak-hour throttling, and whether changes are announced ahead of time. The original text mentions that a certain AI coding tool adjusted its quota without any note in the version changelog, and this was later confirmed by the vendor as intentional—this kind of risk is an upstream policy risk in engineering terms, and can only be hedged with architectural redundancy.
Hedging measures include: abstracting a unified invocation layer so models are replaceable; setting up fallback chains and local caching; and applying budget control to prompt length.
class ModelRouter:def __init__(self, primary, fallback):self.p, self.f = primary, fallbackdef call(self, prompt, budget=4000):prompt = prompt[:budget] # Context budget trimmingtry:return self.p(prompt)except (RateLimitError, TimeoutError):return self.f(prompt) # Automatic fallback
7. Evaluation Workflow: Trustworthy Conclusions Within a Week
- Build an evaluation set of 100–200 cases from real business samples, covering high-frequency and edge scenarios.
- Define machine-checkable metrics: format compliance rate, unsupported-statement rate, tool-call correctness, and average retry count.
- Use double-blind human scoring, enabled only for multimodal and writing-style tasks.
- Cluster failure samples to determine whether failures are “detectable” or “hidden.”
- Run a small-traffic canary in parallel, tracking real invocation cost and the number of rate-limit hits.
- Run a regression every quarter, because capability rankings keep changing.
8. Enterprise Deployment: Putting Uncertainty in a Cage
If an enterprise wants more controllable model capabilities in its own environment, it can consider the relevant general-purpose capability combination from Baidu AI Cloud: a container platform hosting inference services, object storage holding evaluation sets and artifacts, a message queue for peak shaving, and logging plus monitoring and alerting for continuous observation of rate-limit and quality metrics. What matters is not which vendor is used, but whether the three points—replaceable, observable, degradable—are actually implemented.
9. Conclusion
When the budget only allows two options, prioritize the one that is more restrained on specialized Q&A, more stable in structured output, and more transparent about quota policy; at the same time, eliminate single-point dependency with a unified invocation layer and fallback chains. Model selection is not a one-time decision but an engineering process that requires quarterly regression—only by accumulating evaluation sets, assertions, and monitoring can you keep holding the floor while the landscape is repeatedly reshuffled.
