LLM Capability Boundary Evaluation: A Practical Guide to Building Reusable Evaluation Systems

    Many teams misjudge large language models with vague impressions like "it doesn't feel much different," when the real gap is missing evaluation. This guide shows how to turn subjective impressions of LLM capability into observable, reproducible metrics—first-pass usable rate, average rework rounds, human intervention time, and token cost—and how to evaluate by task type (code generation, math and logical reasoning, and creative writing) instead of a single overall score. It covers contamination-resistant evaluation-set construction, a backend-agnostic evaluation skeleton with a replaceable chat() function, threshold calibration using confidence intervals, how to distinguish engineering-fixable gaps from true capability boundaries, general cloud deployment architecture, and cost-reduction strategies when capability falls short. Readers will learn to build reusable, auto-judgeable evaluation assets so that model selection becomes a reproducible engineering decision rather than a matter of feel.

    From Gut Feel to Reusable Evaluation

    Many teams reach the vague conclusion that a large model “doesn’t feel that different” to use. The root cause is usually not the model itself, but the absence of evaluation. To make LLM capability boundary assessment, evaluation methods, and engineering strategies actually work, you first need to convert the subjective experience of “strong or dumb” into observable, reproducible, regression-testable metrics.

    Four quantities prove valuable in practice:

    • First-pass usable rate: The proportion of outputs that pass acceptance directly, with a clear task description and no follow-up questions. If you sample only once, this corresponds to strict pass@1; if you sample multiple times, write it explicitly as a “k-sample pass rate” or “pass rate over k attempts” to avoid confusion in definition.
    • Average rework rounds: The number of “add constraints—regenerate” cycles needed to reach a usable version.
    • Human intervention time ratio: Time spent on human reading, error correction, and rewriting divided by the total time to complete the task.
    • Token cost per unit of usable output: Total consumption including retries and rework, divided by the final number of usable artifacts.

    The same model can perform oppositely across different metrics. In coding tasks, a high first-pass usable rate and rework rounds close to 1 often mean the model has already crossed the usability line in scenarios where “intent is clear and acceptance criteria are machine-checkable.” Once a task requires the model to fill in implicit constraints itself, rework rounds rise quickly, and the human intervention time ratio becomes the dominant cost. This is also the quantitative explanation for the contradictory impression that a model “codes well but isn’t smart enough.”

    Evaluate by Task Type, Not a Single Overall Score

    Different tasks draw on different capabilities; mixing them into one score only hides weaknesses. It is recommended to break things into at least three separately modeled categories: code generation and engineering implementation, math and logical reasoning, and content creation and narrative.

    1. Code Generation and Engineering Implementation

    Code tasks have the highest proportion of automatic adjudication and are the easiest to build credible evaluations for. Construction approach: pick 100–300 small tasks with clear inputs and outputs from real business, attach unit tests as acceptance scripts, and count pass@1, k-sample pass rate, and pass rate over k attempts.

    During evaluation, pay special attention to distinguishing two difficulty levels:

    Type Definition Evaluation metric Acceptance method Applicable scenario Selection advice
    Well-specified Function signature, types, and boundary conditions given pass@1, k-sample pass rate, average rework rounds Unit test auto-judgment Form validation, data transformation, API implementation Prefer lightweight models for batch processing
    Ambiguously-specified Only a business goal given; must design interfaces, split modules, and decide exception strategy First-pass usable rate, rework rounds, human intervention time Auto test + human review Business system integration, solution design Assign to a stronger model and keep human review

    Note: the k-sample pass rate means “the average proportion passing among k samples,” while strict pass@k usually means “pass at least once in k attempts.” The two cannot be mixed. If you compute using code skeletons, it is recommended to keep both the pass_k_rate and strict_pass_k fields.

    2. Math and Logical Reasoning

    The key to math problem evaluation is contamination prevention. Public problem sets easily enter training corpora, inflating scores. Three usable approaches:

    • Time isolation: Only use problems that appeared after the model’s training cutoff date.
    • Private construction: Batch-generate problems from parameterized templates, with answers solved by a program rather than written by hand, ensuring answers are unique and verifiable.
    • Multi-path consistency: Require different solutions to the same problem, such as algebraic, geometric, and constructive proofs; if the conclusions contradict each other, reasoning is unreliable.

    For proof tasks, the adjudication standard should upgrade from “is the answer correct” to “can each step be independently verified,” otherwise the model easily produces pseudo-proofs that are structurally complete but skip intermediate steps.

    3. Content Creation and Narrative

    Creative writing evaluation cannot be automated to high precision, but it can be structured. A dual-track approach is recommended: first use an explicit scoring rubric for model review, then do human spot-checks on disputed samples. Rubric dimensions can include setting consistency, character motivation plausibility, conflict pacing, language repetition rate, and ending completeness.

    Common risks of model review include length bias, format bias, and position bias. To reduce bias, it is recommended to adopt: position rotation, meaning swapping the order of two candidate answers and rating each once; double-blind review, hiding the answer source; and sampled re-review, doing human spot-checks on high-score, low-score, and disputed samples.

    A practical technique is the long-range consistency test: provide a setting document of 3000+ words, then after the 30th round of conversation ask about earlier details, such as a character’s age or an exception clause to a rule. Under long-context settings, common models may exhibit detail drift. Drift magnitude correlates highly with narrative quality; it reflects constraint-holding ability in long context, not just writing skill.

    Drift type Failure example Adjudication method Handling advice
    Factual detail drift A character set at 28 earlier is written as 35 later Retrieve the setting document and compare Add setting cards, long-range reference checks
    Rule exception drift A capability forbidden earlier is used directly later Check the rule constraint chain Split the rule list, ask the model to restate each one
    Character motivation drift Behavioral logic conflicts before and after Human review + motivation labels Add character bios, reduce free improvisation
    Style drift Narrative tone suddenly changes Style sample comparison Provide style examples, lower the temperature parameter

    The human spot-check ratio can be set by risk: low-risk content can sample 10%–20%, high-value or high-risk content should sample 30%+, and all disputed samples should be re-reviewed.

    Evaluation Skeleton: A Minimal Implementation with Replaceable chat()

    The code below gives a backend-agnostic minimal evaluation skeleton. Replacing the implementation of chat() adapts it to any model service. The core idea is to externalize acceptance criteria as data, rather than scattering them across prompts.

    1. # Requires: Python 3.10+
    2. # In production, replace run_in_sandbox with a container, gVisor, Firejail, or another isolated executor
    3. from dataclasses import dataclass, field
    4. import math
    5. import os
    6. import subprocess
    7. import sys
    8. import tempfile
    9. import time
    10. @dataclass
    11. class Case:
    12. id: str
    13. prompt: str
    14. kind: str # code / math / writing
    15. rubric: list[str] = field(default_factory=list)
    16. checker: str | None = None
    17. timeout_sec: int = 5
    18. @dataclass
    19. class EvalConfig:
    20. k: int = 5
    21. temperature: float = 0.6
    22. yield_threshold: float = 0.80 # example threshold, calibrate per business
    23. z: float = 1.96 # 95% confidence level
    24. def run_in_sandbox(output: str, checker: str, timeout_sec: int = 5) -> bool:
    25. """
    26. Minimal placeholder: write the model output to a temp file, then run the acceptance script.
    27. Only demonstrates timeout, exception return, and exit-code judgment.
    28. Production must run in an isolated container, limiting CPU, memory, network, filesystem, and execution time.
    29. """
    30. try:
    31. with tempfile.TemporaryDirectory() as tmpdir:
    32. out_path = os.path.join(tmpdir, "output.txt")
    33. check_path = os.path.join(tmpdir, "check.py")
    34. with open(out_path, "w", encoding="utf-8") as f:
    35. f.write(output)
    36. with open(check_path, "w", encoding="utf-8") as f:
    37. f.write(checker)
    38. proc = subprocess.run(
    39. [sys.executable, check_path, out_path],
    40. capture_output=True,
    41. text=True,
    42. timeout=timeout_sec,
    43. env={"PATH": ""},
    44. cwd=tmpdir,
    45. check=False,
    46. )
    47. return proc.returncode == 0
    48. except Exception:
    49. return False
    50. def run_case(llm, case: Case, cfg: EvalConfig = EvalConfig()) -> dict:
    51. passed = 0
    52. samples = []
    53. tokens = 0
    54. for _ in range(cfg.k):
    55. t0 = time.time()
    56. out = llm.chat(case.prompt, temperature=cfg.temperature)
    57. usage = llm.last_usage()
    58. tokens += getattr(usage, "total_tokens", 0) if usage else 0
    59. ok = False
    60. if case.checker:
    61. ok = run_in_sandbox(out, case.checker, case.timeout_sec)
    62. if ok:
    63. passed += 1
    64. samples.append({
    65. "text": out,
    66. "latency_ms": int((time.time() - t0) * 1000),
    67. "ok": ok,
    68. })
    69. k = max(cfg.k, 1)
    70. return {
    71. "id": case.id,
    72. "kind": case.kind,
    73. "k": k,
    74. "successes": passed,
    75. "pass_k_rate": round(passed / k, 3), # k-sample pass rate, not equivalent to strict pass@k
    76. "at_least_once": passed > 0,
    77. "avg_tokens": tokens // k,
    78. "samples": samples,
    79. }
    80. def wilson_lower(successes: int, trials: int, z: float = 1.96) -> float:
    81. if trials <= 0:
    82. return 0.0
    83. p = successes / trials
    84. denom = 1.0 + z * z / trials
    85. center = (p + z * z / (2.0 * trials)) / denom
    86. margin = z * math.sqrt(
    87. p * (1.0 - p) / trials + z * z / (4.0 * trials * trials)
    88. ) / denom
    89. return max(0.0, center - margin)
    90. def summarize(results: list[dict], cfg: EvalConfig = EvalConfig()) -> dict:
    91. by_kind = {}
    92. for r in results:
    93. b = by_kind.setdefault(r["kind"], {
    94. "n": 0,
    95. "yield_sum": 0.0,
    96. "tokens": 0,
    97. "successes": 0,
    98. "k_sum": 0,
    99. "strict_pass": 0,
    100. })
    101. b["n"] += 1
    102. b["yield_sum"] += r["pass_k_rate"]
    103. b["tokens"] += r["avg_tokens"]
    104. b["successes"] += r.get("successes", 0)
    105. b["k_sum"] += r.get("k", 1)
    106. if r.get("at_least_once"):
    107. b["strict_pass"] += 1
    108. report = {}
    109. for kind, b in by_kind.items():
    110. trials = b["k_sum"]
    111. successes = b["successes"]
    112. pass_rate = successes / trials if trials else 0.0
    113. strict_pass = b["strict_pass"] / b["n"] if b["n"] else 0.0
    114. report[kind] = {
    115. "n_cases": b["n"],
    116. "pass_k_rate": round(pass_rate, 3),
    117. "wilson_lower_pass_k": round(
    118. wilson_lower(successes, trials, cfg.z), 3
    119. ),
    120. "strict_pass_k": round(strict_pass, 3),
    121. "avg_tokens_per_case": b["tokens"] // b["n"] if b["n"] else 0,
    122. }
    123. report["human_in_loop"] = [
    124. k for k, v in report.items()
    125. if isinstance(v, dict)
    126. and v.get("wilson_lower_pass_k", 0.0) < cfg.yield_threshold
    127. ]
    128. return report

    Three points need attention in engineering. First, acceptance scripts must run in an isolated sandbox, limiting network, filesystem, and execution time. Both model-generated code and evaluation scripts may contain untrusted content and cannot simply run in an ordinary process. Second, the number of samples k cannot be too small; single results have huge variance, k=5 only reveals order-of-magnitude differences, and formal selection recommends k≥20 with reported confidence intervals. Third, the scoring prompt itself is part of what is being evaluated; model-reviews-model may be affected by length, format, and position, so use position rotation, double-blind review, and sampled re-review to reduce bias.

    Threshold Calibration: Don’t Judge First-Pass Usable Rate with Fixed Thresholds

    The yield_threshold in the code is configurable, and the example value 0.80 is only for demonstration and should not directly serve as a unified standard for all businesses. Threshold calibration can follow this process:

    1. Clarify the business failure cost: Does a single failure cause financial error, compliance risk, user complaints, or large-scale human rework?
    2. Distinguish risk levels: Internal assistance tasks can tolerate lower thresholds; high-risk scenarios like finance, accounting, compliance, and medical should raise requirements.
    3. Use confidence intervals rather than point ratios: With small samples, 0.75 and 0.85 may show no significant difference. Use the Wilson interval or bootstrap to estimate confidence intervals.
    4. Control error by sample size: If the estimated ratio is about p and the allowed error is e, a rough sample size can use n ≈ z^2 * p * (1-p) / e^2. For example, estimating a 0.8 success rate at 95% confidence with ±0.05 allowed error needs about 246 samples.
    5. Look at the lower bound for high-risk scenarios: For example, require the 95% Wilson lower bound to be no less than 0.90, rather than only checking whether the point estimate reaches 0.90.

    This way, “does a first-pass usable rate below 0.8 require human intervention” is no longer a fixed rule, but an engineering judgment of “below the current business-calibrated threshold, and the confidence interval does not support release.”

    Capability Boundaries: What Can Be Filled by Engineering, What Cannot

    This is the part that needs the most rigorous distinction in evaluation. Empirically, gaps can be grouped into two categories.

    Significantly improvable by prompt engineering, post-training, or agent orchestration:

    • Output format and structure compliance
    • Tool-call parameter accuracy
    • Long-document retrieval and localization
    • Domain terminology and writing style alignment
    • Multi-step workflow stability
    • Compliance with negative constraints

    The essence of these problems is “the capability exists but triggering is unstable”; structured prompting, retrieval augmentation, workflow decomposition, and constraint validation can all converge them.

    Hard to fill with the above methods:

    • Proactively identifying unstated needs from vague goals
    • Autonomously discovering solution flaws and backtracking to correct them in long-range tasks
    • Doing constraint reasoning across large volumes of documents while maintaining global consistency
    • Rapid domain adaptation with very few samples

    The common feature of these problems is that they require generating information that does not originally exist during reasoning, rather than retrieving or formatting existing information. Attributing them to a single factor, such as a poorly written prompt or an agent framework that is not complex enough, usually leads to continuous investment with diminishing returns.

    An actionable discrimination method: if the model can reliably do a problem right after being given complete acceptance criteria, it belongs to the former category and is worth engineering investment; if it still fails after being given complete criteria, and the failure mode is highly consistent across different prompt strategies, it may touch the current capability boundary, in which case the marginal return of adding more prompt rounds is very low.

    It is recommended to keep record fields for boundary determination: failure type, failure samples, input prompt strategy, model version, output behavior, whether it can be fixed by spec completion, whether it triggers engineering transformation, and whether it enters the human fallback process.

    Scale and Capability Path: Don’t Explain Everything with a Single Dimension

    Scaling law describes the empirical rule that loss decreases as a power law with parameter count, data volume, and compute; it explains training efficiency, but it does not equal a tenfold parameter increase translating into a tenfold linear increase in task capability. Equally important are three parallel improvement paths:

    • Scale and data quality at the pre-training stage
    • Alignment and reasoning-data construction at the post-training stage
    • Compute investment at the inference stage, such as longer chains of thought, more candidate sampling, self-verification, and backtracking

    For engineering teams, the more valuable conclusion is: capability boundaries are task-related, measurable, and move with versions. So do not establish one-time permanent conclusions; instead, make the evaluation set a regression asset.

    A version regression process is recommended as follows:

    1. Before a new model or new prompt goes live, automatically run the fixed evaluation set.
    2. Compute first-pass usable rate, rework cost, token cost, and confidence intervals per task.
    3. Compare with the baseline version to judge whether the improvement exceeds random fluctuation.
    4. Use stricter confidence interval lower bounds for high-risk tasks.
    5. Record switching decisions to form a traceable version evaluation report.

    Cost-Reduction Strategies When Capability Falls Short

    Many teams have gone through this stage: to compensate for model weaknesses, they build deeply nested prompt systems, generate multiple versions and then select among them, and fine-tune each step, ultimately consuming large amounts of tokens and human effort. This investment is often low in cost-effectiveness during periods of rapid model capability iteration. A more robust approach is to “keep structure simple and keep acceptance heavy.”

    • Make implicit needs explicit: Rather than repeatedly questioning the model, first produce a structured task spec covering input, output, constraints, and acceptance criteria. The input-output ratio of this step is usually higher than any prompt technique.
    • Move acceptance automation forward: Write tests for all machine-judgeable tasks. Tests are both acceptance checkers and feedback signals the model can use.
    • Tiered routing: Assign well-specified tasks to lightweight models for batch processing; assign ambiguous and high-value tasks to stronger models while keeping human review.
    • Cost observability: Record token consumption, retry count, and human intervention time per task type, and judge whether switching is worthwhile by trend rather than by feeling.
    • Accept boundaries: When evaluation shows a task type’s first-pass usable rate stays below threshold long-term, the correct decision is to adjust the solution form, such as introducing a rule engine, computable validation, or expert review steps, rather than continuing to pile prompts on the model side.

    This is especially evident in strongly-constrained domains. Scenarios like financial risk control, account reconciliation, and compliance review need explainable, recomputable, traceable results; the determinable parts should be handed to deterministic programs and rule engines, letting the model handle the parts it is truly good at, such as semantic understanding, information extraction, and anomaly explanation.

    General Cloud Deployment Architecture and Compliance Requirements

    When engineering the above methods, you can assemble a complete pipeline using general cloud capabilities, without relying on any proprietary interfaces:

    • Object storage: Store evaluation sets, versioned prompts, generated artifacts, and human review records. Evaluation sets and prompts should be desensitized, de-identified, and filtered for sensitive information before ingestion; bucket policies should follow least privilege; enable access auditing; clarify data retention periods and compliance owners.
    • Message queue: Drive asynchronous evaluation tasks, decoupling time-consuming batch sampling and acceptance to facilitate horizontal scaling.
    • Container platform: Host the sandbox execution environment, isolate untrusted code, and limit CPU, memory, network, and runtime.
    • Logging service and monitoring alerts: Observe token consumption, failure rate, latency distribution, and first-pass usable rate trends, with automatic alerts on anomalies.
    • Key management and access control: Isolate evaluation data and credentials across different business lines, and prohibit cross-permission abuse of evaluation data.

    The overall form is: evaluation set and prompts stored with versioning → tasks enqueued → sampling and sandbox acceptance run in parallel → metrics summarized into a warehouse → dashboards and alerts drive version-switching decisions. This way, every model or prompt change has data backing, and selection moves from subjective experience to reproducible engineering decisions.

    FAQ and Common Mistakes

    How do you evaluate LLM capability boundaries?
    Split the evaluation set by task type, use metrics like first-pass usable rate, rework rounds, human intervention time, and token cost, and report sample size and confidence intervals.

    How do you prevent evaluation set contamination?
    Use time isolation, private construction, parameterized generation, and multi-path consistency checks, and avoid using public problem sets as the sole scoring basis.

    What if the first-pass usable rate is low?
    First check whether the spec is clear, whether acceptance is machine-judgeable, and whether failures concentrate in specific patterns; then judge whether the problem is unstable triggering or a capability boundary. If it is unstable triggering, apply prompting, retrieval, workflow, and constraint validation; if it is a capability boundary, adjust the solution form.

    What are the common mistakes?
    Common mistakes include: confusing pass@1 with pass@k, only looking at small-sample results, mixing code generation and creative writing into one total score, acceptance scripts without isolation, fixed thresholds without calibration, and ignoring evaluation data desensitization and access control.

    Conclusion

    “Programming passes first-pass, but doesn’t proactively dig for needs” is not self-contradictory; it is a normal separation of two capability dimensions: well-specified, machine-verifiable tasks are already near usable, while tasks requiring autonomous identification of implicit needs and long-range self-correction are still beyond the capability boundary. For teams, the correct response is not to keep piling prompts and agent layers, but to build task-type-split, contamination-resistant, auto-judgeable evaluation assets, make implicit needs explicit as specs, move acceptance forward into tests, and control investment with tiered routing and cost observability. Model capability keeps moving with versions; the only stable asset is your own evaluation system and engineering structure.