Chinese LLMs Take on Long-Horizon Coding Tasks: Why Multi-Step Execution Is the New Benchmark

    This article examines the shift in how Chinese large language models are evaluated for coding: away from single-shot correctness and toward long-horizon tasks that require sustained multi-step execution. It explains why traditional exam-style benchmarks miss real engineering work, breaks down the four capabilities long-horizon tasks demand (state maintenance, tool use, strategy switching, and constraint satisfaction), and draws methodology lessons from a vector retrieval optimization case. It also covers the engineering dimensions needed to make long-horizon capability usable, such as context compression, sandboxed tool ecosystems, process observability, and cost control, and closes with practical recommendations for updating team workflows.

    Introduction: From “Getting It Right Once” to “Staying Right”

    Over the past two years, the standard for judging a coding LLM has been remarkably uniform: hand it a problem and see whether it produces the correct answer in a single attempt. This kind of evaluation is simple and reproducible, but it is clearly misaligned with real engineering. Real development is never finished in one pass. It is a loop of implement, verify, locate the bottleneck, adjust the approach, and verify again, one that can run for hours or even days.

    What deserves attention in the recent rapid progress of Chinese LLMs on coding is not a ranking position on some leaderboard, but a shift in where capability is concentrated: from one-shot code generation toward complex tasks that can be pushed forward autonomously over long stretches of time. This article takes a neutral technical view of the engineering implications of that change and the methods for putting it to work.

    1. Why Traditional Coding Benchmarks Are Losing Their Value

    Most traditional benchmarks follow an “exam mindset,” with three typical traits:

    • Clear task boundaries and deterministic inputs and outputs, such as completing an implementation from a given function signature, or reproducing and fixing a given defect.
    • Evaluation looks only at the final state; the process is not observed, so there is no way to know whether the model took a detour.
    • Context length is manageable, and there is usually no need to understand system structure across files or modules.

    The complexity of real systems comes from coupling and state. A performance problem may originate in a data structure choice, or in caching strategy, the concurrency model, or index design. From a single generation, a model cannot obtain enough feedback information, and neither can a human engineer. Extending evaluation from “final-state correctness” to “process effectiveness” is therefore an inevitable direction for capability assessment.

    2. Long-Horizon Tasks: A Yardstick Closer to the Nature of Engineering

    A long-horizon task is one that requires a model to keep making progress across many steps and multiple external interactions, and to revise its strategy midway based on feedback. It involves four key capabilities:

    1. State maintenance: still remembering the goal, the constraints, and the approaches already ruled out after hundreds of steps, avoiding repeated work.
    2. Tool use: obtaining real feedback through external actions such as execution, testing, retrieval, and log analysis, rather than relying on internal guesses.
    3. Strategy switching: proactively changing direction when the current route yields diminishing returns, instead of mechanically retrying.
    4. Constraint satisfaction: holding the line on red-line metrics such as recall, compatibility, and security while improving the target metric.

    A schematic evaluation loop can be abstracted as:

    1. for step in range(max_steps):
    2. observation = run_tests(current_state) # obtain real feedback
    3. if meets_goal(observation):
    4. break
    5. plan = revise(plan, observation) # adjust strategy based on feedback
    6. current_state = apply(plan) # land the change

    What matters in this pseudocode is not the syntax but the semantics: every round is grounded in an external observation, and the plan is mutable.

    3. A Case in the Abstract: Lessons from Vector Retrieval Optimization

    The source material contains one typical scenario: given a vector database skeleton implemented in a systems programming language, raise queries per second as much as possible while keeping recall no lower than 95%. Over more than six hundred iterations and more than six thousand tool calls, the model increased throughput by roughly six times.

    Setting the specific numbers aside, the engineering value of this case lies in the methodology:

    • Establish a trustworthy baseline first, pinning down the real numbers for current throughput and recall, and avoiding a vague sense that things “feel faster.”
    • Break optimization into small, verifiable hypotheses, such as index structure, distance computation, pruning strategy, and memory layout, and validate them one by one.
    • Use hard constraints as gatekeepers, rolling back any approach that trades recall for throughput.
    • Allow yourself to be overturned; switching technical routes midway is efficiency, not failure.

    This workflow closely matches the performance optimization practice of experienced engineers, which suggests that improvements in model capability are fundamentally engineering methods being expressed and executed more effectively.

    4. Breaking Down the Capability: Four Dimensions from Benchmark Score to Usability

    To make long-horizon capability genuinely usable, four engineering dimensions matter:

    • Long context and memory compression: the context window is limited, so historical conclusions need to be summarized and structured, retaining the basis for decisions rather than every log line.
    • Tool ecosystem and sandbox isolation: the execution environment must be rollback-capable and quota-limited, so mistakes cannot affect real resources.
    • Process observability: the hypothesis, command, and result of every step should leave a trace, making auditing and retrospectives possible.
    • Cost and latency control: multi-round calls consume resources, so step limits, timeouts, and budget thresholds are needed.

    For enterprise adoption, container platforms can supply isolated environments, object storage can hold intermediate artifacts, and logging services plus monitoring and alerting systems can track every step of a long task. Baidu AI Cloud offers a fairly complete combination of these general-purpose capabilities.

    5. Practical Recommendations: How to Update Your Team’s Engineering Workflow

    • Expand the evaluation set from “single-problem accuracy” to “multi-step task completion rate,” and include constraint satisfaction rate and average number of steps.
    • Define clear acceptance criteria and red-line metrics for the model, and automate the gatekeeping logic.
    • Adopt human-machine collaboration: the model handles exploration and batch validation, while humans handle key decisions and risk confirmation.
    • Build up reusable task templates, standardizing high-frequency long-horizon tasks such as optimization, migration, and refactoring.

    Conclusion

    The focus of competition among coding LLMs is moving from “who answers questions better” to “who can finish the job.” Long-horizon capability matters because it corresponds to the basic shape of real development: iterating on feedback and making tradeoffs under constraints. For developers and teams, understanding and building the evaluation, isolation, observability, and cost systems that support long-horizon tasks brings more long-term return than chasing a single leaderboard position.