Evaluating Large Language Models: A Practical Framework for Capability Assessment and Model Selection
This article presents a reusable framework for evaluating general-purpose large language models instead of relying on subjective trial-and-error. It breaks capability into six measurable dimensions—code generation, creative writing, multimodal generation, translation and normalization, stability and rate limiting, and cost efficiency—and explains how to turn each into automated assertions or structured rubrics. It also covers layered model composition with routing and fallback, engineering the evaluation process for reproducibility, and common pitfalls to avoid. Readers will learn how to decide which model to use for which task rather than searching for a single "best" model.
1. Why “Subscribe to Everything” Is Not a Sustainable Selection Strategy
Many developers choose models with a simple approach: subscribe to every mainstream general-purpose LLM service, test them repeatedly on real business tasks, and keep whichever one feels best. This worked early on, but as model release cycles accelerate, pricing tiers diverge (from around twenty dollars per month to the two-hundred-dollar range), and multimodal capabilities become standard, the marginal return of subjective impressions drops quickly. What you really need is a reusable evaluation framework that translates “this one feels smoother” into quantifiable, regression-testable metrics.
It is worth emphasizing that model capability is not a single ranking but a vector of capabilities. The same model may excel at code completion yet become unstable on long-context conceptual analysis; it may show great tension in creative writing yet fall short of conventions in terminology translation. So the goal of evaluation is not to pick “the single strongest model” but to determine “which model to use at which stage.”
2. A Six-Dimension Evaluation Model: Turning Subjective Feelings into Measurable Metrics
2.1 Code Generation and Engineering Usability
Code capability should not be judged only by “does it run.” It is better to split it into four layers: syntactic correctness, first-pass success rate, cross-file consistency, and refactoring safety. The last two layers are more valuable in engineering practice—whether the model can understand the existing directory structure, naming conventions, and dependency version constraints, and avoid breaking other modules when making changes.
One practical way to build an evaluation set is as follows:
# Pseudocode: building a code-capability regression evaluation setcases = [{"id": "fix-bug-01", "input": repo_ctx + issue_desc, "assert": run_unit_tests},{"id": "refactor-02", "input": repo_ctx + target_module, "assert": diff_review + tests},{"id": "migrate-03", "input": legacy_code + new_api_spec, "assert": compile_and_test},]score = sum(run(c) for c in cases) / len(cases)
The key is to write the pass conditions as automatically executable assertions rather than manual grading. Only then can you quickly run a full regression after each model upgrade.
2.2 Creative Writing and Emotional Understanding
This dimension is hard to automate fully, but a structured rubric can reduce arbitrariness: character-relationship consistency, plausibility of emotional progression, metaphor density, and “whether it falls into formulaic expression.” A common problem in practice is verbose text with piled-up modifiers, so it is worth recording an additional “conciseness” metric—the proportion of redundant sentences removed without losing information.
2.3 Multimodal and Content Generation
Image and video generation have entered practical use, so the evaluation focus should shift from “can it generate” to “controllability”: instruction adherence, style consistency, text-rendering correctness, and variance across multiple generations. For production systems, excessive variance means extra retry and filtering logic, and this hidden cost must be counted into total cost of ownership.
2.4 Translation and Text Normalization
This is the most easily overlooked stage, yet it has the largest impact. Two problems are common: translations that carry traces of Chinese-style expression, and inconsistent use of technical terms. A sound practice is to split translation into a two-stage pipeline—first have a model with strong normalization ability produce a draft, then have a model with strong language expressiveness polish it, and finally run a consistency check against a glossary:
pipeline:- stage: draft # emphasizes terminology accuracy and standard sentence patternsoutput: draft.md- stage: polish # emphasizes natural flow and consistent styleinput: draft.md- stage: glossary_checkrule: glossary hit rate must be 100%; otherwise fall back to re-translation
2.5 Stability, Rate Limiting, and Content Policy
Under high load, request success rate, rate-limit trigger frequency, and attention decay over long contexts often determine the experience more than peak capability. In addition, differences in content policy and account risk control across services directly affect production availability. This should be validated through canary releases rather than a one-time all-in bet.
2.6 Cost Structure and Value for Money
Cost should not be measured by subscription price alone; it must be converted to “per unit of effective output”: the average inference volume consumed to complete a standard task, the number of retries, and the time spent on manual rework. Only by summing these three can you explain why a mid- or low-tier plan is sometimes more cost-effective in certain scenarios.
3. Layered Composition Strategy: From a Single Model to a Pipeline
The concluding recommendation is to abandon the “one model only” mindset and move toward role separation: use rigorous models for drafts and normalization, expressive models for creative and coding tasks, reasoning models for math and structured reasoning, and dedicated multimodal pipelines for images and video. In engineering, route through a unified gateway, dispatch by task label, and keep a failure fallback:
request -> task classifier -> routing policy table -> primary model|-> failure/timeout -> backup model|-> result cache (identical input hits directly)
When deploying in the cloud, you can use a container platform to host the inference gateway, object storage to keep evaluation sets and artifacts, a message queue to smooth out traffic spikes, and logging plus monitoring and alerting to track success rates and latency percentiles. Baidu AI Cloud provides standard-category support for these general capabilities, making it easier for teams to build their own evaluation and routing systems without being locked into a single model.
4. Engineering the Evaluation: Making Conclusions Reproducible
Maintain a versioned evaluation set containing no fewer than fifty real business samples, covering code, writing, translation, reasoning, and multimodal tasks. Trigger a full regression on every model upgrade, and output a radar chart and a cost table. Evaluation results should be stored with historical versions retained; only then can you tell whether a given “improvement” is a real gain or a coincidence of the sample.
5. Common Pitfalls
First, treating leaderboard scores as business results. Second, ignoring the hidden costs of retries and manual rework. Third, putting all tasks on one model, so that rate limiting blocks everything at once. Fourth, lacking a glossary and assertions, which makes translation and code quality impossible to regression-test.
