How to Evaluate the Real Capabilities of Large Language Models: An Engineering Approach
This article presents a reproducible engineering framework for evaluating large language models. It covers five dimensions: delivery quality with clear instructions, requirement elicitation, domain reasoning, long-form narrative consistency, and human-AI collaboration cost. It also includes a simple Python script that calculates the first-pass usable rate and the number of revision rounds.
Many people form their views of large language models from a few memorable conversations. A successful code generation can make a model seem strong, while an off-topic answer can leave a poor impression. These impressions depend heavily on task selection, prompt wording, and the model’s state on a given day, so they are hard to use as a basis for long-term decisions. To answer reliably whether a model is usable and which scenarios it suits, teams need a reproducible and decomposable evaluation method.
This article provides a framework from an engineering perspective. It covers five dimensions and includes a simple evaluation script.
1. Define the Evaluation Goals
Before evaluating, answer three questions: What kind of work will the model support? How costly is a failure? How much testing effort can the team invest? Coding assistance, documentation, data analysis, and professional consulting place very different demands on a model. In high-stakes scenarios, such as those involving funds, compliance, or production changes, stricter validation standards are needed.
Once the goals are clear, define the metrics. Metrics should be recordable and comparable, rather than leaving only vague impressions such as “looks good.”
2. Five Evaluation Dimensions
2.1 Delivery Quality with Clear Instructions
When requirements are clearly described and constraints are complete, can the model deliver a usable result directly? Two numbers are worth recording. The first is the first-pass usable rate, the share of first-version results that pass acceptance. The second is the average number of revision rounds, the amount of feedback needed to reach a usable state. Together, these reflect the model’s execution reliability.
For programming tasks, unit tests can judge the results. For documentation tasks, checklists can judge them. The easier a deliverable is to verify automatically, the more objective the evaluation.
2.2 Requirement Elicitation
Real requirements are often vague. Give the model a short description and observe whether it proactively asks about key constraints, lists reasonable assumptions, and points out possible edge cases. A model that only executes instructions mechanically will translate vague requirements into literal implementations, and the results often drift from the real intent.
To test this dimension, prepare a set of deliberately incomplete tasks. Record the number and quality of the clarifying questions the model asks, and compare them with the key missing items identified by human annotators.
2.3 Domain Reasoning
In fields such as finance, law, medicine, and mathematics, model outputs must withstand expert review. Choose tasks with verifiable answers, such as calculation problems with clear conclusions or derivation problems that can be checked step by step. Besides the final answer, check whether the intermediate steps are internally consistent and whether the model cites rules or data that do not exist.
A reasoning process that reads as complete does not guarantee correct logic. Evaluate based on conclusions that can be verified.
2.4 Long-Form Structure and Narrative Consistency
For writing tasks, focus on whether character motivations stay consistent, whether the plot has a sound causal chain, whether foreshadowing is resolved, and whether the pacing fits the genre. These judgments require professional readers. Use blind scoring: reviewers do not know the source of each text, score it against a uniform rubric, and then analyze the average score and the degree of disagreement.
2.5 Human-AI Collaboration Cost
Two results of equal quality can carry very different costs. Record the number of prompts needed to reach a usable result, the time spent on manual corrections, the compute resources and fees consumed, and the extra time spent investigating errors caused by the model. Looking only at single-run results easily overlooks the long-term cost of collaboration.
3. Build a Reproducible Evaluation Process
We recommend following these steps.
- Step 1: Build a task set. Cover typical and edge-case tasks for the target scenarios, with at least about twenty tasks per category.
- Step 2: Fix the prompt templates. Use the same input for each task across all models to avoid distorting the comparison with prompt differences.
- Step 3: Set acceptance criteria. Pair each task with a validation function or a scoring rubric.
- Step 4: Record process data. Save each round’s output, validation result, and elapsed time.
- Step 5: Retest on a schedule. After a model version update, rerun the same task set and observe the changes.
The script below shows how to calculate the first-pass usable rate and the number of revision rounds. Teams must implement the model call function according to their own access method, so only the interface is shown here.
from dataclasses import dataclass, fieldfrom typing import Callable, List, Optional, Tuple@dataclassclass EvalCase:name: strprompt: strchecker: Callable[[str], bool] # 校验输出是否可用@dataclassclass EvalReport:total: int = 0first_pass: int = 0results: List[Tuple[str, Optional[int]]] = field(default_factory=list)def run_suite(call_model: Callable[[str], str],cases: List[EvalCase],max_rounds: int = 3) -> EvalReport:report = EvalReport()for case in cases:report.total += 1prompt = case.promptpassed_round = Nonefor round_idx in range(1, max_rounds + 1):answer = call_model(prompt)if case.checker(answer):passed_round = round_idxbreakprompt = (f"{case.prompt}\n""上一版结果未通过验收,请修正后输出完整结果。")if passed_round == 1:report.first_pass += 1report.results.append((case.name, passed_round))return reportdef summarize(report: EvalReport) -> str:rate = report.first_pass / report.total if report.total else 0.0return f"首次可用率:{rate:.1%},共 {report.total} 个任务"
4. Common Pitfalls
- Drawing conclusions from a single case. A small sample has little statistical meaning.
- Counting prompt engineering effort as model capability. If dozens of rounds of adjustment are needed to get a usable result, record this cost separately and reflect it in model selection.
- Confusing “can complete the specified task” with “can find real problems.” These abilities are different, so evaluate them separately.
- Ignoring version differences. After a model update, old conclusions may no longer hold, so retest.
- Focusing only on output quality and not on stability. If the same prompt produces widely varying results across runs, production environments incur extra review costs.
5. Selection Recommendations Based on Team Practice
Evaluation results rarely point to replacing everything. A layered approach is more common.
- Assign models by scenario. Template-based documentation suits a model with stable execution, while open-ended solution exploration requires stronger requirement elicitation.
- Set entry thresholds. If a new model does not meet the preset targets in boundary tests, limit it to low-risk scenarios.
- Record failure modes. Classify each failure, such as comprehension bias, factual errors, missing formatting, or logical gaps, and use these categories to add safeguards to prompts in advance.
- Keep human review. Content involving amounts, compliance, or external publication needs human review, regardless of model performance.
6. Practical Next Steps
Teams can start by compiling a test set of at least fifty tasks that cover common and edge-case scenarios. Then run two or three candidate models through the same process and record the first-pass usable rate, the number of revision rounds, and the collaboration time. Finally, decide the scope of use for each model based on the results, and retest regularly when model versions change.
