Evaluating Large Language Models: Capability Dimensions and Engineering Selection Practices

    This article explains how to evaluate general-purpose large language models with engineering evidence instead of impressions from a single chat or brand reputation. It recommends defining the task profile first, then measuring five capability dimensions: language generation stability, reasoning and planning, instruction following and safety boundaries, code and engineering collaboration, and retrieval, tool use, and structured output. It also covers evaluation methods, cost and governance, a selection workflow, and common pitfalls.

    Evaluating Large Language Models: Capability Dimensions and Engineering Selection Practices

    Judging a general-purpose large language model by one chat session is a mistake. So is relying on fragmented impressions such as “this version is very strong” or “that model failed.” A more reliable approach starts by abstracting the problem. Which tasks must the model handle? What data boundaries, latency limits, and cost constraints apply? Can it consistently produce results that can be verified?

    Some descriptions people often use for models can be restated as three technical phenomena: long-context drift, the trade-off between safety constraints and creative range, and reasoning density under limited compute. Building metrics around these phenomena is more useful than debating which brand is best.

    1. Define the Task Profile Before Judging Model Quality

    Any evaluation needs context first. Is the model used for search-based question answering, code completion, contract extraction, customer service quality checks, data analysis, or AI agent orchestration? Each task weights model capabilities differently. Record five factors in a task profile: the distribution of input lengths, the required output structure, sensitivity to factual accuracy, the cost of failure, and call frequency. For example, customer service summarization depends most on factual consistency and a stable tone. Code migration depends on syntactic correctness, dependency understanding, and executable verification. Creative writing values variety over a single correct answer.

    From an engineering standpoint, risk falls into three levels. Low-risk tasks can accept draft-quality output. Medium-risk tasks need cited sources or structured validation. High-risk tasks require human review, replay, and a refusal policy. Only a clear failure cost can justify paying a premium for stronger reasoning. The same logic explains why, in some scenarios, a smaller model combined with retrieval and rules can be more reliable than simply scaling up the model.

    2. Core Capability Dimensions: From Impressions to Metrics

    2.1 Language Generation Stability: Watch for Long-Context Drift

    In long documents, the common problem is rarely an immediate error. Instead, style, references, terminology, and facts drift gradually. A definition introduced earlier gets rewritten, entities get confused, and conclusions quietly go beyond what the source supports. This is long-range consistency degradation. Evaluation should not stop at whether a document fits in the context window. It should test recall across positions, faithfulness in summaries, and contradiction rates.

    Useful metrics include the recall rate for key facts, the contradiction rate between earlier and later statements, terminology consistency, citation hit rate, and human ratings for readability, verbosity, and off-topic drift. Test samples should place the key information at the beginning, middle, and end of the input. They should also include distracting passages and similar entities. For report generation, knowledge base question answering, and repository-level code understanding, require structured output and add a validator. This separates text that reads well from text that is actually correct.

    2.2 Reasoning and Planning: Measure Effective Reasoning Density

    Reasoning ability does not mean producing long chains of thought. It means completing effective decomposition, hypothesis testing, verification, and convergence within each token. Reasoning density matters most when resources are limited. Edge deployments, cost-sensitive workloads, and high-concurrency services often cannot afford unlimited context or repeated calls.

    Observable metrics include final accuracy on multi-step problems, the share of intermediate steps that can be verified, error recovery rate, executable plan rate, tool call success rate, and pass@k for code. Evaluation should separate recalling knowledge from reasoning on the spot. Recall is easily inflated by training data contamination, while live reasoning better reflects generalization. For math, troubleshooting, and process planning tasks, hide part of the information. Require the model to list the unknowns first, then ask for clarification or give a conservative answer. This shows whether the model recognizes the limits of what it knows.

    2.3 Instruction Following and Safety Boundaries: Constraints Are Not Better When Lower

    Safety and style constraints create a tension. If constraints are too loose, output may exceed permissions, leak data, or fabricate content. If they are too tight, responses become templated, refusals increase, and usefulness drops. A good system does not remove constraints. It keeps the model within clear boundaries while preserving explanatory power and creativity. In engineering terms, track both the constraint violation rate, which measures dangerous output, and the over-refusal rate, which measures the cost of failing to answer when an answer was appropriate.

    In practice, layer the policy. The system layer defines the hard limits that cannot be crossed. The business layer defines formats and terminology. The application layer uses validators as a final safeguard. The model only produces candidate output. Deterministic rules and audit processes decide whether that output is released. This preserves generation capability and avoids relying solely on probabilistic output for compliance.

    2.4 Code and Engineering Collaboration

    Code ability should not be judged only by completion speed. Assess repository-level understanding, testing awareness, interface compatibility, conservative refactoring, and detection of security flaws. A practical evaluation loop works like this: give the model a requirement fragment and the conventions of the existing code, ask it to produce a patch, and then run static checks, unit tests, integration tests, and human review. An illustrative flow looks like this:

    1. def evaluate_patch(task, repo_ctx, model):
    2. draft = model.generate(prompt=build_prompt(task, repo_ctx))
    3. patch = extract_diff(draft)
    4. checks = {
    5. "parse_ok": parseable(patch),
    6. "lint_ok": run_lint(patch),
    7. "tests_pass": run_tests(patch),
    8. "api_break": detect_breaking_change(patch),
    9. "secret_leak": scan_secret(draft + patch),
    10. }
    11. score = weighted_score(checks, human_review_sample(patch))
    12. return {"score": score, "checks": checks, "cost": cost_of(draft)}

    The key point is not any specific interface. The point is to connect generation, verification, rollback, and accountability in one pipeline. Any capability that cannot be checked in regression evaluation should not inform a purchase or launch decision.

    2.5 Retrieval, Tools, and Structured Output

    Most enterprise problems are not about whether a model knows the answer. They are about whether the system can find the right material within the right permissions, then deliver it on time and in the right format. Evaluation should therefore cover retrieval augmentation, function calling, database queries, table parsing, JSON-constrained output, and retry behavior after errors. Focus on three questions. Does the model fabricate citations when no evidence exists? Can it map a natural language conclusion back to specific fields? Does it degrade gracefully when a tool fails?

    Write the output contract as a schema, record the source of each fact as evidence, and represent unanswerable questions as explicit states. Engineering systems need machine-readable failures more than free-form answers. Unknown results, insufficient permissions, conflicting evidence, and timeouts should all be standard outcomes, not chat-style exceptions.

    3. Evaluation Methods: Build a Reproducible Chain of Evidence

    The first step is building a gold-standard dataset. If samples come from real logs, remove identifiers, de-identify them, and sample by business segment. Add adversarial cases, such as attempts to induce unauthorized access, similar entities, outdated knowledge, formatting traps, and mixed-language input. The second step is dual-track scoring. Automated metrics handle large-scale regression testing. Human review explains disputed samples. When a model serves as the judge, control for position bias, length bias, and self-preference. Preferably use several anonymized judges that cross-check each other, and keep a human spot-check sample.

    One possible scoring matrix assigns 35% to correctness, 20% to constraint compliance, 15% to evidence and auditability, 10% to stability, 10% to latency and cost, and 10% to engineering integration. Weights can change by scenario, but once fixed they should be versioned. Whenever the candidate model, prompt, retriever, or decoding parameters change, run the same regression suite and produce a difference report. Public leaderboard scores can suggest where to look, but they cannot replace evidence from your own data distribution.

    4. Deployment, Cost, and Governance

    The second half of selection is operational governance. General cloud capabilities, such as object storage, message queues, container platforms, log services, monitoring and alerting, key management, and access control, are enough to support most model application infrastructure. When deploying in compliance-focused cloud environments such as Baidu AI Cloud, the priorities remain data classification, encryption in transit, audit logging, version control for prompts and evaluation sets, staged rollouts, and emergency circuit breaking. Governance should not be outsourced to a single product feature.

    Calculate cost across the full pipeline. Include input and output tokens, retrieval rebuilds, retries after failures, human review, conversion losses caused by latency, and compliance costs in sensitive scenarios. For stability, define service level objectives: P95 latency, error rate, rate limiting policy, fallback models, and offline backup. High-risk paths must be able to stop generation and switch to rules or human handling. Keep a record of each call, including an input summary, an output hash, the policy version, and the review result. This makes incidents easier to reconstruct and explain.

    5. Selection Workflow and Common Pitfalls

    A recommended workflow runs through scenario segmentation, anonymized candidates, small-sample probing, gold-standard regression, shadow traffic, staged pilots, SLO acceptance, and quarterly re-evaluation. Anonymize all candidates to avoid preconceptions. During the pilot, define an exit path. If factual errors, unauthorized output, or cost overruns appear, roll back quickly. Record the reasons for rejecting each candidate in the decision log so the same options are not evaluated again without new information.

    Common mistakes include treating public leaderboards as business conclusions, assuming one impressive answer reflects long-term stability, looking only at unit price while ignoring retries and human review, treating safety as a one-time switch before launch, ignoring data drift until metrics collapse months later, and mistaking prompting techniques for model capability. Reliable conclusions are usually not dramatic. Under given data, constraints, and costs, a particular architecture consistently meets its metrics and can explain its failures.

    Conclusion

    Returning to the original question of how to evaluate several models, the more professional answer is this. Do not evaluate reputation. Evaluate evidence. Do not chase all-around capability. Chase fit. Do not trust parameter counts. Value closed-loop verification. Turn experience with long-context drift, creativity under constraints, and reasoning density under limited resources into measurable metrics. Then validate them continuously with real business samples, automated checks, and governance processes. The team ends up with a reusable baseline for large model engineering, not just a reputation.