New Model Benchmark: From Code Generation to Task Delivery

    This article examines why the ability to write code does not automatically translate into the ability to deliver a complete task in real software engineering workflows. It breaks task delivery into four components—requirement parsing, context construction, action execution with feedback, and result validation—and outlines a reproducible benchmarking method based on layered task types, explicit constraints, objective acceptance criteria, and process metrics. Key findings show that structured requirements, selective context injection, effective use of error feedback, and strict stop conditions drive higher pass rates, while over-editing remains a major risk. The article closes with practical guidance for turning task delivery into an operable process and highlights security, maintainability, and data compliance risks that should keep architecture and review decisions with humans.

    1. Background: Why “Writing Code” Is Not the Same as “Delivering a Task”

    Over the past year, the role of large language models in software engineering has shifted noticeably. Early evaluations focused on code completion, single-function generation, and algorithm problems. In real development workflows, however, developers rarely submit an isolated function. They submit a task with constraints: read an existing project, understand its directory structure, locate relevant modules, modify multiple files, add tests, resolve dependency conflicts, and produce a runnable result.

    The gap can be broken down into three layers:

    1. Large context span: Real projects often contain hundreds or thousands of files, while requirements may be only a few sentences. The model must map the requirement to the right locations on its own.
    2. Long action chains: A single task may involve retrieval, reading, editing, execution, rollback, and re-editing. An error in any step propagates forward.
    3. Objective acceptance criteria: Whether code compiles, tests pass, and interfaces return the expected structure does not depend on subjective judgment.

    As a result, the core metric is shifting from “generation quality” to “task completion rate”—the proportion of tasks that deliver a runnable result in one pass or within a limited number of rounds, under a given environment and acceptance conditions.

    2. Capability Model: Four Key Elements of a Task Delivery Engine

    Viewed as an engineering system, task delivery can be abstracted into four elements that together determine the completion rate.

    • Requirement parsing: Convert natural-language requirements into a structured task description with clear inputs, outputs, constraints, and acceptance methods. Without this step, models tend to improvise and produce results that miss expectations.
    • Context construction: Place the most relevant information within a limited window, including the directory tree, key files, interface definitions, dependency lists, and existing conventions. More context is not always better; noise directly lowers accuracy.
    • Action execution and feedback: The model reads and writes files, runs builds and tests through a toolchain, and fixes issues based on error messages. The quality of this feedback loop determines whether multi-round repair converges.
    • Result validation: Use objective signals such as compilation, static checks, unit tests, and interface self-tests as delivery gates, avoiding results that “look right but do not run.”

    A simplified pseudocode illustrates this loop:

    1. task = parse_requirement(user_input) # Structure the requirement
    2. ctx = build_context(task, repo_index) # Retrieve and trim context
    3. for step in range(max_steps):
    4. patch = model.propose(ctx, task) # Generate a modification plan
    5. apply_patch(patch)
    6. result = run_checks(task.acceptance) # Build/test/static checks
    7. if result.passed:
    8. return deliver(patch, result.report)
    9. ctx = update_context(ctx, result.logs) # Use failure info for the next round
    10. return escalate(task, ctx) # Report explicitly when beyond capability

    The key is not the model itself, but whether failure information can be used effectively. In testing, completion-rate differences often appear in the second and third repair rounds.

    3. Benchmark Method: Designing Hundreds of Tasks That Are Convincing

    For credible conclusions, task-set design matters more than model selection. Build the set along these dimensions:

    1. Layered task types
      • Single-file small changes: fix bugs, add parameter validation, adjust copy logic.
      • Cross-file medium tasks: add a module and wire it into routing, add data models and migration scripts.
      • Project-level tasks: scaffold a project, add logging and monitoring, complete end-to-end tests.
    2. Explicit constraints: Specify language and framework versions, directory conventions, naming style, and whether new dependencies are allowed.
    3. Objective acceptance: Use build commands, static checks, and unit-test pass rates as the judgment standard.
    4. Reproducible environment: Pin dependency versions and base images to avoid environment differences polluting conclusions.
    5. Process metrics: In addition to pass/fail, record the number of rounds, files modified, ratio of ineffective changes, and average time.

    Scoring can be simplified as:

    1. Task score = acceptance passed (0/1) * 0.7 + change minimality * 0.15 + round efficiency * 0.15

    “Change minimality” suppresses over-modification, and “round efficiency” measures convergence speed. Together they distinguish “happened to pass” from “engineering-usable.”

    4. Findings: Where Completion Rate Improves

    Across multiple rounds on a unified task set and environment, several stable patterns emerge. They are general and do not depend on a specific tool:

    • Higher requirement structuring leads to higher first-pass rates. Rewriting “optimize this interface” as “without changing the return structure, change the default pagination value to 20, cap it at 100, and add boundary tests” produces a clear difference in pass rate.
    • Context trimming strategy matters significantly. Injecting interface definitions, data models, and test files first usually beats flattening the entire repository.
    • Feedback utilization determines the multi-round ceiling. Solutions that map error stacks to specific files converge in fewer rounds on average.
    • Over-editing is a major risk source. Continuing to “refactor while at it” after task completion introduces regressions, so explicit stop conditions and acceptance gates are required.

    5. Practical Guidance: Making Task Delivery an Operable Process

    To adopt this within a team, work on both process and infrastructure.

    Process side:

    1. Templatize requirements: Use a four-part format covering goal, scope, constraints, and acceptance.
    2. Commit in small steps: Split tasks so each step is independently verifiable, lowering rollback cost.
    3. Enforce acceptance: Changes that fail build and tests do not enter the main branch.

    Infrastructure side, general cloud capabilities can carry the validation pipeline: use a container platform to run isolated build environments, object storage to keep task inputs and artifacts, a message queue to smooth peaks and chain asynchronous tasks, a logging service to collect run output centrally, and monitoring and alerting to track failure rates and latency fluctuations. Baidu AI Cloud can connect such general capabilities with a self-built pipeline, helping teams turn evaluation from “running a few times manually” into continuous, observable routine work.

    A minimal prompt skeleton example:

    1. [Goal] Add pagination parameter validation to an existing project
    2. [Scope] Modify only the query parsing layer and its unit tests
    3. [Constraints] No new dependencies; keep the existing return structure; follow existing naming style
    4. [Acceptance] Build passes; new tests cover zero, negative, and over-limit inputs
    5. [Output] List of modified files + key diff + self-test summary

    6. Boundaries and Risks: Do Not Treat Completion Rate as the Only Metric

    Improving task delivery does not mean relaxing engineering constraints. Three risks deserve attention: first, security—model-generated code may introduce insecure default configurations; second, maintainability—excessive abstraction increases future maintenance cost; third, data compliance—context fed to the model may contain sensitive information and should be desensitized and minimized.

    Therefore, a mature approach treats the model as a “high-throughput implementer” while keeping architecture decisions, acceptance standards, and risk review with humans and existing engineering norms. Driving iteration with objective metrics and using process constraints to hold the lower bound is the reliable path from code generation to task delivery.