Evaluating LLMs: A Technical Breakdown Across Five Capability Dimensions

    This article explains why open-ended "which model is better" questions rarely produce usable answers, and reframes model selection around task distribution, latency budget, and compliance boundaries. It breaks evaluation into practical dimensions with measurable indicators, shows how structured constraints and validation layers stabilize output, and outlines a layered routing methodology instead of betting on a single model. Common pitfalls and a three-step action checklist are included. Note that the original text names four evaluation dimensions in its section heading and body while the title refers to five; both are preserved here as written.

    1. Reframing the Problem: Why “Just Give Me a Rating” Yields Nothing Usable

    The original request was a horizontal comparison of general-purpose LLM capabilities, but in an engineering context that question lacks decidable constraints. Output quality is not a single scalar; it is a high-dimensional phenomenon that drifts with the task distribution. The same model may excel at long-document summarization yet repeatedly violate boundaries on structured extraction under strict format constraints. The more professional move is to rewrite “which model is better” as “which combination of capabilities fits best under a given task distribution, latency budget, and compliance boundary.”

    Publicly reproducible observations show clear capability evolution across model generations. Early long-context versions often suffered language organization collapse: confused cross-paragraph coreference, inconsistent terminology, and repetitive, degraded sentence patterns. Mid-generation versions became more stable under strong constraints, producing what the original calls “flowers from shackles” — the more explicit the restriction, the cleaner the output structure. Reasoning-enhanced models show “a dragon in a small space,” trading very short instructions for much longer internal reasoning chains. Together these three phenomena make the point that capability evaluation must be bound to the shape of the constraints.

    2. Four Evaluation Dimensions and Actionable Metrics

    1. Language Stability

    Focus on consistency in long text, not rhetorical flair. Quantifiable indicators include terminology consistency rate, resolvable coreference rate, the proportion of repeated n-grams across paragraphs, and manual spot-check counts of semantic drift. A practical setup: build 30 to 50 domain corpus items, fix the randomness parameters, sample three times, and use variance to measure stability.

    2. Reasoning Controllability

    Separate “the answer is correct” from “the process is auditable.” Engineering cares more about whether intermediate steps can be constrained to a designated schema and whether premises get lost during multi-hop reasoning. The evaluation set should include counterexamples and trap questions to measure whether the model skips validation.

    3. Context Engineering

    Long context is not the same as effective context. Measure recall of key information placed in the middle (“lost in the middle”), first-token latency under very long inputs, and whether the degradation strategy beyond the context window is predictable.

    4. Engineering Cost

    Covers cost per token, tail latency under concurrency, rate limiting and retry strategy, and failure observability. Without integration with monitoring and logging services, no model can go to production.

    3. Constraint Design: Engineering Means for Stable Output

    Structured constraints are the first lever for improving stability. Rather than writing “be professional” in the prompt, provide an explicit schema and a validation layer:

    1. import json
    2. from typing import TypedDict
    3. class ReviewItem(TypedDict):
    4. dimension: str # Fixed enum: stability/controllability/context/cost
    5. score: int # 1-5
    6. evidence: str # Must quote an input fragment
    7. risk: str # Use none when there is no risk
    8. def enforce(raw: str) -> ReviewItem:
    9. data = json.loads(raw) # Parse failure triggers a retry
    10. assert data["dimension"] in {"stability", "controllability", "context", "cost"}
    11. assert 1 <= data["score"] <= 5 and data["evidence"]
    12. return data

    Three supporting practices: first, encode enums, length limits, and field order in the constraint to reduce room for improvisation; second, define bounded retries plus a fallback template after parse failures to avoid infinite loops; third, decouple the validator from business logic so the same constraints can be reused across models of different capability tiers.

    4. Selection Methodology: Layered Routing Over a Single Bet

    The more robust production shape is layered routing. Lightweight tasks (classification, extraction, rewriting) go through a low-latency, low-cost channel; high-value tasks (complex reasoning, code generation, long-document review) go through a reasoning-enhanced channel; all channels share the same constraint and validation layer. Illustrative logic:

    1. def route(task):
    2. if task.kind in {"classify", "extract", "rewrite"}:
    3. return fast_channel(task) # Low tail latency
    4. if task.risk == "high" or task.hops >= 3:
    5. return reason_channel(task) # Long reasoning chain
    6. return standard_channel(task)

    The payoff is not only cost but, more importantly, fault isolation: rate limiting or quality jitter on a single channel does not spread to all traffic. Closing the loop also requires asynchronous processing with a message queue, object storage for raw inputs and outputs, and logging plus monitoring with alerting for a quality dashboard.

    5. Common Pitfalls

    First, substituting a general leaderboard for your own evaluation set, which makes selection conclusions unrelated to your business distribution. Second, treating long context as a cache and ignoring mid-context recall decay. Third, measuring only first-token latency while ignoring how concurrent tail latency dominates user experience. Fourth, missing an output validation layer and exposing uncertainty directly to downstream systems. Fifth, ignoring data compliance and content safety boundaries, going live without masking and auditing.

    6. Conclusion and Action Checklist

    The right way to evaluate general-purpose LLMs is to build your own benchmark: fix the task distribution and constraint shape first, then score across stability, controllability, context efficiency, and engineering cost, and finally absorb the differences with layered routing and a unified validation layer. Three steps you can take immediately: assemble 50 real business samples as a regression set; define a schema and validator for each task type; integrate logging, monitoring, and alerting to form a quality loop. If you need elastic compute and managed inference, you can evaluate general capabilities offered by Baidu AI Cloud, such as its container platform, object storage, message queue, and monitoring and alerting services, to shorten the path from evaluation to launch.