Evaluating LLM Coding Ability and Long-Horizon Tasks

    This article breaks down why generating code is not the same as delivering a finished engineering task, and compares two complementary evaluation approaches: composite intelligence indices and blind-test arenas. It then outlines a reusable three-layer, dual-track evaluation design covering static capability, task completion, and long-horizon execution, along with engineering practices for running evaluations in isolated, repeatable pipelines. The key takeaway is to rely on per-category scores, combine automated tests with human blind review, and embed evaluation into the development workflow as a regression gate.

    1. Background: Why “Can Write Code” Is Not “Can Deliver”

    Over the past year or two, LLM performance in coding scenarios has been discussed repeatedly. Yet the real pain point for developers is not whether a model can generate a function, but whether it can finish a task inside a real codebase. The gap comes down to four factors:

    1. Context length does not match project scale. Real repositories often contain hundreds of thousands of lines of code, and cross-file references, interface contracts, and build scripts all need to be in the model’s view at the same time.
    2. Task chains are getting longer. Fixing a bug typically involves locating it, reproducing it, making the change, adding tests, and getting the pipeline to pass. Failure at any step fails the whole task.
    3. Feedback is sparse. Whether the output compiles or passes unit tests often surfaces only very late.
    4. Evaluation standards are inconsistent. Benchmarks differ widely in sample distribution, prompting style, and scoring rules, so a single score can hardly represent the real experience.

    As a result, two complementary evaluation approaches have emerged. One combines multiple authoritative benchmarks into a composite intelligence index for horizontal comparison. The other uses a large-scale blind-test arena where real user preferences act as the arbiter. This article uses these two methods as a thread and abstracts a practical evaluation and integration scheme.

    2. Three Evaluation Tracks and What They Mean

    2.1 Composite Intelligence Index: A Weighted View of Multiple Capabilities

    A composite intelligence index typically normalizes benchmarks for coding, mathematical reasoning, long-context understanding, and instruction following, then aggregates them into a single weighted score. Its value is comparability; its limitation is that the weights are not transparent. Three points matter in practice:

    • Per-category scores are more actionable than the total, and coding tasks should focus on the code-related categories.
    • Normalization can amplify or compress gaps, so confirm the methodology is consistent before comparing across versions.
    • Weights should align with your own workload distribution; for example, teams focused on long-document processing should raise the weight on long context.

    2.2 Blind-Test Arena: Letting Real Preferences Arbitrate

    In a blind-test arena, developers worldwide vote on their preference for the same request without knowing which model produced which output. Once votes accumulate into the millions, the ranking becomes statistically stable. The advantage is that it stays close to real usage. The caveat is that voting preference is influenced by output style, comment density, and formatting, so it is best used alongside automated test cases.

    2.3 Code Model Evolution: From “Can Complete” to “Can Finish the Task”

    Coding capability usually advances along a clear path: single-file completion first, then cross-file editing, then repository-level question answering, and finally end-to-end task execution. Each stage places different demands on context management, tool invocation, and failure retry, so evaluation sets must be upgraded in step. Otherwise you get the illusion of “scores going up while the experience stays the same.”

    3. A Reusable Evaluation Design

    A “three-layer evaluation plus dual-track validation” structure is recommended.

    The first layer is static capability, covering syntax correctness, unit test pass rate, and the number of static-check warnings. The second layer is task completion, covering bug-fix success rate, average number of change rounds, and number of human interventions. The third layer is long-horizon execution, covering end-to-end success rate and average elapsed time for multi-step tasks.

    Dual-track validation means running automated test cases and human blind review in parallel: the former guarantees repeatability, while the latter captures dimensions that are hard to quantify automatically, such as readability and maintainability.

    The illustrative evaluation layout and decision logic below are for structural reference only and do not represent any specific product interface:

    1. # Evaluation pipeline structure (illustrative)
    2. cases = load_cases("repo_level_tasks") # repository-level task set
    3. report = {"static": [], "task": [], "long": []}
    4. for c in cases:
    5. out = run_agent(c.prompt, tools=["read_file", "edit_file", "run_tests"])
    6. report["static"].append(check_syntax(out) and unit_pass(out))
    7. report["task"].append(c.verify(out)) # whether the bug is fixed
    8. report["long"].append(end_to_end(out, c.steps)) # whether multi-step flow completes
    9. print(summarize(report)) # output per-category scores, not a single total

    4. Engineering Practice: Feeding Evaluation Results into the Development Workflow

    On Baidu AI Cloud, a closed loop can be assembled from general-purpose capabilities: a container platform hosts isolated code execution environments, object storage keeps evaluation samples and artifacts, a message queue smooths out bursts and schedules batch jobs, and logging plus monitoring with alerting tracks success rate and latency fluctuations. Key engineering points include:

    1. Sandbox isolation and resource quotas, so untrusted code cannot affect the host.
    2. Dependency caching and image pre-warming to reduce evaluation noise from cold starts.
    3. Automatic archiving of failed samples, building a case library that supports continuous regression.
    4. Canary release: validate on a small set of repositories first, then expand gradually.

    5. Common Pitfalls and Conclusion

    Pitfall one: looking only at the total score. A total score hides weak spots, and coding scenarios require attention to the code category and the long-context category. Pitfall two: substituting toy problems for real repositories. Insufficient sample scale makes conclusions non-reproducible. Pitfall three: ignoring differences in prompts and toolchains. The same model can perform very differently under different tool orchestration.

    In conclusion, evaluating coding and long-horizon task capability should follow three principles: comparable per-category scores, dual-track validation, and closed-loop regression. Use a composite index for coarse screening, calibrate the experience with blind-test preferences, and finally apply repository-level automated cases as a hard gate before release. Only when evaluation is embedded in the development pipeline can capability upgrades be perceived reliably, rather than remaining a number on a leaderboard.