LLM Evaluation Framework: Seven Dimensions and Practical Scoring Methods
Build a repeatable large language model evaluation framework across factual accuracy, reasoning, mathematics, code generation, reading comprehension, instruction following, and safety. This guide explains how to combine automated checks with model-based judging, use a 0–1 scoring rubric, validate scoring reliability, and document test conditions for informed model selection.
Choosing a large language model (LLM) raises a practical question: how can developers and enterprises objectively determine whether a model fits their business?
Subjective impressions can reflect personal preferences rather than reliable performance. Public leaderboards offer useful context, but they rarely represent an organization’s own data and workflows. A more dependable approach is to define a multidimensional evaluation framework and score each dimension using repeatable methods.
This article covers seven evaluation dimensions, model-based judging and continuous scoring, ways to validate results, and the test conditions that matter when evaluating models developed in China.
1. Why Evaluate Multiple Dimensions?
LLM capabilities are not uniform. A model that produces fluent conversational responses may perform inconsistently on code generation or factual questions.
A single overall score can hide these differences. Strong performance in one area may offset a serious weakness in another. Evaluating relatively independent dimensions helps teams identify where a model is reliable and where restrictions or human review are needed.
A practical framework includes seven dimensions:
- Factual accuracy
- Logical reasoning
- Mathematical computation
- Code generation
- Reading comprehension
- Instruction following
- Safety and compliance
These dimensions cover common enterprise requirements, but they are not the only possible classification. Teams can add or remove dimensions to match their workloads. Each dimension must have a clear definition and measurable criteria.
2. What the Seven Dimensions Measure
2.1 Factual Accuracy
Factual accuracy measures how correctly a model answers questions about real-world knowledge. On obscure or specialized topics, models may produce plausible but nonexistent information, commonly known as hallucinations.
Build a question-and-answer dataset with reference answers. Check names, organizations, dates, and numerical values in each response.
Useful metrics include accuracy for entities and numerical values. Reference material can come from authoritative encyclopedias, industry standards, and internal knowledge bases.
2.2 Logical Reasoning
Logical reasoning measures the ability to solve multistep problems and apply constraints.
Test questions should state their premises and conditions explicitly, then ask for a final conclusion and an explanation of the reasoning. Evaluate both final-answer accuracy and the internal consistency of the explanation.
Checking only the final answer can miss cases where a model reaches the correct result by guessing or using inconsistent reasoning.
2.3 Mathematical Computation
Mathematical answers can often be checked automatically, making them useful for evaluating precision.
A test set can include arithmetic, algebra, and word problems. Require numerical answers in a fixed format, and measure the proportion that exactly match the expected answers.
If a problem involves unit conversions or rounding, specify the rules in the prompt. Otherwise, differences in interpretation may be mistaken for model errors.
2.4 Code Generation
The primary question in code evaluation is whether the generated code passes tests.
Each task should have a fixed set of unit tests covering typical inputs, boundary cases, and invalid inputs. Use the test pass rate as a core metric.
Also record whether the code runs without modification and whether it contains obvious security risks, such as constructing SQL queries through string concatenation without appropriate escaping.
2.5 Reading Comprehension
Reading comprehension measures how well a model extracts key information and summarizes longer texts.
Group tests by text length to compare performance on short and long inputs. Useful metrics include precision and recall for information extraction.
Including irrelevant information in the source text also helps reveal whether the model mistakes distracting content for the answer.
2.6 Instruction Following
Business prompts often include multiple constraints: return valid JSON, stay within a word limit, or present points in a specified order.
Many of these requirements can be checked programmatically. For example, a script can attempt to parse the JSON output or count words. Prefer automated checks whenever a constraint can be verified directly rather than asking a judge model to assess it.
Measure the pass rate for each constraint.
2.7 Safety and Compliance
Safety evaluation should measure whether the model refuses harmful, discriminatory, or illegal requests. It must also assess whether legitimate requests are incorrectly blocked.
At minimum, track two metrics:
- Harmful-request blocking rate: How often harmful requests are blocked.
- False blocking rate: How often legitimate requests are incorrectly blocked.
Read these metrics together. Maximizing the blocking rate alone can increase false blocking and undermine usability.
Compliance criteria should reflect the laws applicable to the organization and its internal policies, rather than relying solely on generic standards.
3. Scoring with Judge Models and a 0–1 Scale
Human annotation can provide high-quality assessments, but it is expensive, and annotators may disagree. Many teams therefore use a judge model to assist with scoring.
3.1 Choose and Freeze the Judge Model
The judge should differ from the model being evaluated, preferably coming from another provider’s product line. This reduces the risk of a model effectively grading itself.
The judge should also be substantially more capable than the evaluated model; otherwise, it may not reliably detect errors.
Once selected, fix the judge’s version, parameters, and prompt. Scores produced after a judge model update should not be compared directly with historical scores without accounting for that change.
3.2 Define a Continuous Scoring Rubric
Binary scoring distinguishes correct from incorrect answers, but it cannot capture the difference between a mostly correct response with minor flaws and a completely irrelevant response.
A continuous scale from 0 to 1 supports more nuanced assessment. The following rubric is a starting point; adapt its descriptions to each evaluation dimension.
| Score | Description |
|---|---|
| 1.0 | Fully correct, includes all key information, and is clearly expressed. |
| 0.8 | The core conclusion is correct, with only minor formatting or wording issues. |
| 0.6 | Broadly on the right track, but contains some factual errors or omissions. |
| 0.4 | Answers only part of the question and omits substantial key information. |
| 0.2 | Mostly incorrect, with only a small amount of relevant information. |
| 0.0 | Completely incorrect, irrelevant, or refuses to answer when an answer is expected. |
Make the rubric as specific as possible to improve scoring consistency. Provide two or three scored examples for each dimension so the judge has concrete reference points.
Refusal must be interpreted in context: an appropriate refusal of a harmful request should be assessed under the safety criteria, not automatically treated as a failed answer.
3.3 Control Common Judge Biases
Judge models have known biases that require active mitigation.
- Position bias: In pairwise comparisons, a judge may favor the response presented first. Score both response orders and average the results.
- Length bias: A judge may reward longer answers even when they are not better. State explicitly that length earns no credit, and spot-check scores assigned to long responses.
- Self-preference: A judge may favor responses that resemble its own style. Using a judge from a different source can help reduce this effect.
3.4 Validate Scoring Reliability
Before using the judge at scale, compare its scores with human assessments.
Randomly sample approximately 10% of the evaluation set and have two human annotators score those examples independently. Then compare their assessments with the judge’s results.
Common measures include agreement rate and weighted Cohen’s kappa. Kappa values closer to 1 indicate stronger agreement. Teams should set acceptance thresholds based on task difficulty. If agreement is low, revise the rubric or change the judge before proceeding with the full evaluation.
Evaluation scores also have sampling variability. Small datasets can produce unstable results; a practical starting recommendation is at least 200 examples per dimension.
When comparing two models, use bootstrapping to estimate confidence intervals. If the observed score difference is small relative to the uncertainty, avoid declaring one model better.
4. Evaluating Models Developed in China: Test Conditions Matter
Models developed in China continue to evolve across multiple capability areas. For example, Baidu AI Cloud offers access to ERNIE models alongside services for model invocation, knowledge-base integration, and content safety.
These capabilities can be useful in application development, but evaluation claims are meaningful only when their conditions are documented. Their mention here does not imply availability in every region.
Factual Accuracy with External Knowledge
Some models may perform better on factual questions when connected to a knowledge graph or retrieval-augmented generation (RAG).
Document:
- Which knowledge base was used.
- When it was last updated.
- Whether the questions fall within its coverage.
- Which model or configuration served as the baseline.
Without a baseline, it is difficult to determine the source of an improvement.
Report changes numerically. For example, on a 500-question dataset, state the measured accuracy before and after adding retrieval rather than describing the improvement as “significant” without supporting figures.
Code Generation Against API Specifications
To test whether a model generates code that follows an API specification, use fixed API documentation and test cases. Record both the pass rate and the causes of failure.
Results apply to the model version tested. Rerun the evaluation after a platform updates the model.
Safety Configuration and False Blocking
Platform content-moderation policies may block sensitive content according to configurable settings.
Confirm the exact moderation configuration and sample legitimate requests to check for false blocking. Stricter filtering can affect user experience, so the blocking rate alone is insufficient.
For any evaluated model, report:
- Model version
- Test date
- Parameter configuration
- Test dataset source
- Sample size
Conclusions without these details have limited value.
5. Practical Considerations for Model Selection and Deployment
How Should You Build the Evaluation Set?
Prioritize real business questions and stratify them by difficulty and task type.
Public datasets can supplement internal examples, but some may have appeared in model training data. This can inflate scores and make them less representative of actual performance.
How Should You Assign Weights?
Set weights according to business priorities.
For a customer-support knowledge assistant, factual accuracy might receive a 30% weight, safety and compliance 10%, and code generation 5% or less.
Define the weights before running the evaluation. Do not adjust them afterward to favor a particular result.
How Can You Reduce Judge Bias?
Use a fixed judge model version, reverse response order in pairwise scoring, periodically calibrate against human-scored samples, and record the configuration for every evaluation run.
What Else Matters During Selection?
A single evaluation captures performance at one point in time. Model updates, prompt changes, and knowledge-base revisions can all change the results.
Establish a regular regression-testing schedule, such as monthly, and run a full evaluation before deployment.
Common Mistakes to Avoid
- Relying only on the overall score and overlooking weaknesses in individual dimensions.
- Using questions that may have appeared in training data, producing inflated results.
- Drawing conclusions from too few test examples.
- Comparing new scores directly with old scores after changing the judge model.
6. Conclusion
An effective LLM evaluation framework turns a vague question—“Is this model good enough?”—into measurable criteria.
The seven dimensions define what to assess. Continuous 0–1 scoring adds nuance, while judge models make larger-scale evaluation practical. However, judges must be validated, and reports must disclose sample sizes and test conditions.
When evaluating models developed in China, as with any other models, use your own business data, record versions and configurations, and consider cost, latency, and service support alongside capability scores.
The more specific the evaluation report, the easier it is to determine where a model is reliable and where safeguards or human review remain necessary.
