A Practical Engineering Approach to Comprehensive LLM Evaluation

    General-purpose large language models are now embedded in everyday development and content workflows, yet choosing the right model for production requires more than comparing subscription tiers, context lengths, and polished demos. This article presents an engineering-oriented evaluation methodology that helps teams select and operate LLMs based on measurable evidence rather than impressions. It covers how to break work down into non-interchangeable task families, define rigor as observable behaviors such as constraint retention and non-fabrication, avoid letting strong capabilities in one area mask weaknesses in another, and weigh cost, stability, and compliance alongside output quality. It also outlines a controlled comparison workflow—frozen prompts, blind review, repeated sampling, failure-type classification, and regression sets—plus the surrounding infrastructure needed to turn evaluation results into a repeatable, executable usage strategy for your team.

    What Problems Should Evaluation Solve?

    General-purpose LLMs have entered everyday development and content production. Subscription tiers, context lengths, and demo cases can easily create an impression of all-around capability. But what actually determines engineering value is the accuracy on the same type of task across multiple runs, consistency in details, failure modes, and integration cost. Overall performance is not a simple sum of individual scores—it is whether the model reduces rework within your target workflow.

    Evaluation should start by fixing the use scenario, then choosing the model—not picking a tier first and working requirements backward. This article proceeds by task decomposition, metrics, process, and controlled variables, so teams can reuse the approach.

    Define Task Families First, Not a Single Vague Score

    Break your work into non-interchangeable task families and sample each family separately, so that “writes fluently” doesn’t mask “computes unstably.”

    1. Rigorous execution: Turning specs into implementations, checking interface contracts, enumerating boundary conditions, aligning logs and error codes. What matters is whether items are missed or requirements are silently changed.
    2. Code generation and modification: Adding functions, fixing defects, and writing tests within an existing repository’s constraints. What matters is adherence to project style, dependency boundaries, and testability—not just producing a runnable snippet.
    3. Concept discrimination and long-form writing: Term definitions, solution comparisons, review comments. What matters is whether concepts are quietly swapped out, whether arguments are padded, and whether conclusions are actionable.
    4. Translation and terminology: Bidirectional technical documentation conversion. What matters is glossary adherence, whether the phrasing reads like native target-language writing, and whether judgments absent from the source are introduced.
    5. Quantitative and formal reasoning: Formula derivation, unit conversion, constraint satisfaction. What matters is whether steps are verifiable, not whether the final number “looks plausible.”
    6. Multimodal: If your business requires image-text or video understanding and generation, list it separately. A missing capability does not mean the model is bad overall, but it directly lowers completeness for that business line.

    Prepare at least 20 samples per family, drawn from real tickets or sanitized documents, and keep reference answers or review criteria. Public leaderboards are background only—they cannot replace in-domain data.

    Define “Rigor” as Observable Behavior

    In practice, some models have strong peak creativity or code style but drift in details; other models may not always give the most elegant solution, yet far less often omit constraints on their own. The latter is usually the better default execution engine. You can decompose “rigor” into the following items, scored jointly by manual spot checks and automated checks:

    • Constraint retention: Whether prohibitions, output formats, and field names from the prompt are followed as given.
    • No fabrication: Whether unprovided interfaces, config items, or performance numbers are invented. Fabrication should be recorded as a hard failure, not a style issue.
    • Minimal changes: In modification tasks, whether unrelated files and unrelated logic are rewritten.
    • Reviewability: Whether key conclusions cite their sources or derivation steps for later verification.
    • Visible failures: Whether uncertainty is explicitly stated, rather than masked by fluent prose.

    Illustrative checks do not need to bind to any vendor’s API—a local script suffices to count format violations:

    1. import json
    2. def check_contract(text: str, required_keys: list[str]) -> dict:
    3. try:
    4. data = json.loads(text)
    5. except json.JSONDecodeError:
    6. return {"ok": False, "reason": "not_json"}
    7. missing = [k for k in required_keys if k not in data]
    8. extra = [k for k in data if k not in required_keys]
    9. return {"ok": not missing, "missing": missing, "extra": extra}

    Automated checks only cover format, compilation, and test pass rates. Whether concepts are swapped, or whether a translation “reads like the target language but uses wrong terminology,” still requires blind review by domain experts.

    Don’t Let Component Scores Cancel Each Other Out

    A comprehensive conclusion should keep per-category breakdowns rather than collapse into one fuzzy total. Common mismatches include:

    • Strong at code and creativity does not mean stable at translation. Creative models tend to rewrite terminology for “naturalness” or map source-language structures directly, producing non-standard expressions. Glossaries, abbreviation expansion rules, and no-free-translation lists must go into prompts and be scored separately.
    • Well-formed text does not mean accurate concept discrimination. Some output is grammatically clean and consistently formatted, yet slides back and forth between similar concepts, or pads a short conclusion into a long preamble. Evaluation should record both “factual/conceptual error count” and “redundant sentence ratio.”
    • Math and formal problems need process-level review. Checking only the final value misses wrong derivations that happen to be correct. Require explicit steps, units, and assumptions, verified by a second person.
    • Multimodality is a completeness item, not bonus decoration. If the business depends on image-text or video output, a missing capability must be explicitly addressed in the plan: connect a specialized component, produce by hand, or narrow the delivery scope. Do not let a high text-only score mask a delivery gap.

    A practical division of labor: use the model less prone to detail errors to produce the translation or implementation draft, then use the model stronger at concepts and writing style for a second-pass revision, forcing it to change only a specified issue list. Keep diffs from both stages to avoid introducing new errors in the second pass. This is process design, not a commitment to any particular product.

    Weigh Cost, Stability, and Compliance Together with Quality

    Only when output quality is equal does unit cost per effective output become meaningful. Recommended records:

    • Input/output size per task, failed retry count, minutes of manual revision.
    • Whether premium tiers actually reduce rework. If the rigor gain doesn’t cover the cost, the default tier is more appropriate.
    • Degradation behavior when rate limits or quotas are exhausted: queuing, rejection, or silently truncating context.
    • Whether account and content policies are stable. Frequent interruptions, regional restrictions, or drifting moderation standards directly undermine continuous integration and customer-service scenarios.
    • Whether data is allowed to leave controlled environments. When source code, contracts, or personal data are involved, prioritize evaluating private deployment or dedicated network access, log sanitization, and retention periods—rather than comparing only public chat performance.

    For these dimensions, ranges and qualitative grades are sufficient. Do not fabricate unverifiable speed or price conclusions; billing follows contracts and current official terms.

    1. Freeze prompts and decoding parameters. Temperature, max length, and system constraints stay identical within a comparison round. Otherwise score differences may come from the prompt, not the model.
    2. Blind review. Reviewers cannot see the model source—only outputs and the scoring sheet.
    3. Repeated sampling. Run each prompt at least 3 times; report the median and the worst run. Showing only the best run systematically overestimates.
    4. Classify failure types. Count format errors, factual errors, terminology errors, over-embellishment, and refusals separately. Too many refusals and hallucination are both defects, but they call for different remedies.
    5. Regression set. Every model or prompt change runs against a fixed regression set, to prevent optimizing one task family at the expense of others.
    6. Launch gate. For example: zero hard failures, test pass rate not below an established baseline, reduced manual revision time, compliance review passed. If the gate is not met, keep the old process.

    Engineering Infrastructure for Deployment

    Even after a model passes evaluation, surrounding systems are needed to keep it reliable:

    • Use object storage to keep prompts, outputs, and review records for traceability.
    • Use message queues to smooth peaks so interactive traffic doesn’t exhaust quotas.
    • Use a container platform to run evaluation jobs and regression tasks in consistent environments.
    • Use logging and monitoring alerts to track refusal rates, timeouts, and format failures—not just call success.

    If your team already has a cloud development platform, evaluation jobs, datasets, and permissions can live in the same account system. With a general-purpose cloud platform such as Baidu AI Cloud, the value lies in the combination of compute, storage, networking, and access control—not in replacing your own per-category judgment of the models themselves. Specific capabilities are subject to the purchased product documentation; do not assume unconfirmed interfaces or customization support.

    Writing the Conclusion

    Write the conclusion as three statements rather than “which one is stronger”:

    • Default execution engine: the model that is steadier at constraint retention and low fabrication, suitable for daily code and translation drafts.
    • Specialist enhancement: the model that is stronger at creative writing, emotional expression, or complex refactoring, enabled only for the second pass or designated task families.
    • Explicit gaps: math verification, multimodality, compliance regions, or cost red lines—fill them with processes or specialized components rather than expecting a single model to cover them.

    What you get is not a leaderboard but an executable usage strategy: which task goes to which pipeline, how failures are rechecked, and when a tier upgrade is worthwhile. As the regression set accumulates, evaluation turns from subjective impression into repeatable engineering discipline.