A Practical Framework for Evaluating Large Language Models: Core Dimensions, Scoring, and Deployment
This article presents a reusable framework for evaluating large language models (LLMs) in real engineering contexts, where demo results and leaderboard scores often mislead model selection. It defines six core capability dimensions (multimodal understanding, long context and engineering, code and software engineering, math and logical reasoning, content creation and language conventions, and retrieval, ecosystem, and data freshness) with concrete judging methods, then shows how to build a 100-point weighted scorecard, run a selection workflow from scenario layering to canary and regression, and avoid common pitfalls. Readers will learn how to turn subjective impressions into measurable, optimizable decisions.
1. Why You Need a Reusable Evaluation Framework
In real engineering practice, the most common mistake teams make when selecting an LLM is letting a single demo or a leaderboard score drive the decision. Production workloads have long-tail characteristics: uneven input length distribution, high terminology density, and different failure costs. Without a unified evaluation standard, it is easy to end up with a model that looks impressive in a demo but fails after launch.
A reusable evaluation framework should contain at least four layers: capability dimension definitions, test set construction, scoring and weighting, and regression and canary mechanisms. Missing any one of them makes evaluation results impossible to reproduce and makes it hard to decide quickly whether to switch models after an iteration.
2. Six Core Capability Dimensions and How to Judge Them
2.1 Multimodal Understanding
Focus on unified understanding of images, charts, scanned documents, audio, and video. A practical approach is to test “the same material with multiple question styles”: first ask for structured extraction (fields, tables), then cross-page reasoning (detecting contradictions across pages), and finally generative summarization. The judging criteria are extraction accuracy and cross-page consistency, not how polished the language sounds.
2.2 Long Context and Engineering
Long context does not simply mean “it fits.” Test three scenarios: mid-context information recall (avoiding a model that only remembers the beginning and the end), layered summarization of very long documents, and constraint retention across multi-turn conversations. On the engineering side, also pay attention to context compression strategies and cache reuse. Example code:
def build_context(chunks, budget):# Rank by relevance and recency, keeping high-value segments firstranked = sorted(chunks, key=lambda c: (c.score, c.ts), reverse=True)ctx, used = [], 0for c in ranked:if used + c.tokens > budget:continuectx.append(c.text); used += c.tokensreturn "\n".join(ctx), used
2.3 Code and Software Engineering
Do not only look at “can it write a function”; look at “can it make the right change under existing repository constraints.” The test set should include small-scale refactoring after understanding the call chain, locating issues from error stack traces, generating executable unit tests, and following existing code style. For scoring, introduce two metrics: first-pass rate and rework count. Both are more stable than subjective impressions.
2.4 Math and Logical Reasoning
Separate “calculation ability” from “reasoning rigor.” The former looks at computation speed and accuracy; the latter looks at whether steps are auditable and whether conditions get lost during multi-step derivation. It is recommended to include word problems with distractor conditions and record the distribution of error types (missing conditions, wrong formulas, unit errors) to enable targeted prompt optimization.
2.5 Content Creation and Language Conventions
Creative writing is judged by structural tension and style controllability; language conventions are judged by terminology consistency, sentence conciseness, and punctuation usage. A common problem in practice is that models overuse em dashes and produce overly long output. You can state explicit constraints in the prompt:
Requirements: consistent terminology; keep sentences short; no em dashes; output must not exceed the specified length.
2.6 Retrieval, Ecosystem, and Data Freshness
When real-time information is involved, evaluate the retrieval-augmented pipeline rather than the model itself: recall quality, citation traceability, and freshness labeling. On the engineering side, it is recommended to split “retrieve-rerank-generate-citation verification” into four observable stages, with separate instrumentation for each stage.
3. Scorecard and Weight Design
A 100-point scorecard with six weighted dimensions is recommended, with weights adjusted per business. Example:
| Dimension | General Q&A | Coding Assistant | Data Analysis |
|---|---|---|---|
| Multimodal | 15 | 10 | 20 |
| Long Context | 20 | 15 | 25 |
| Code Engineering | 10 | 45 | 15 |
| Math Reasoning | 20 | 15 | 20 |
| Creation and Conventions | 25 | 5 | 5 |
| Retrieval and Ecosystem | 10 | 10 | 15 |
When scoring, define 1-5 anchor descriptions for each dimension to avoid score drift; have at least two people score the same test set independently and take the average.
4. Selection Workflow: From Scenario to Production
- Scenario layering: classify requests into simple, complex, and high-risk, and set latency and accuracy targets for each.
- Small-sample validation: sample 50-100 real cases per category and run the baseline.
- Combined strategy: a common approach is “a strong model as fallback plus a lightweight model handling high-frequency simple requests,” balancing cost and experience.
- Canary and regression: run a fixed regression set before a new version goes live; block the release if any metric regresses beyond the threshold.
- Observability: log prompt version, model version, latency, and failure reasons to close the loop.
5. Common Pitfalls and How to Avoid Them
- Only looking at leaderboards: leaderboards differ greatly from your business distribution, so you must build your own test set.
- Ignoring failure cost: high-risk scenarios should include human review and secondary verification.
- Not versioning prompts: prompts are as important as code and should be included in version control and review.
- Over-relying on a single vendor: use a unified abstraction layer to hide differences and retain the ability to switch.
6. Conclusion
The essence of model capability evaluation is risk management: use reproducible test sets, clear weights, and continuous regression mechanisms to turn “it feels good” into “measurable and optimizable.” Under this framework, teams can combine general capabilities such as the container platform, log service, and monitoring and alerting offered by Baidu AI Cloud to quickly build evaluation and canary pipelines, making selection decisions more robust and more economical.
