The Evolution of Coding Capabilities in Chinese General-Purpose LLMs: Engineering Practice and Evaluation

    This article examines how general-purpose large models in China have shifted from broad, full-spectrum development toward a focused strategy centered on general-purpose foundations and coding agents. It breaks the capability progression into three stages, explains why non-reasoning mode matching the previous generation's reasoning mode is a key turning point for latency and cost, and outlines a three-layer evaluation system, context engineering principles, and practical adoption guidance with common pitfalls.

    1. Introduction: From Broad Coverage to a General-Purpose Focus

    Over the past two years, the domestic LLM industry in China has gone through a clear strategic adjustment. Early on, many teams aimed to match the full product spectrum of leading international models, pushing multimodal, speech, video, code, and search directions at the same time. Resources were spread thin, and product reception was generally lukewarm. The industry then began to converge, concentrating compute and data on general-purpose foundations and a few high-value scenarios. Among these, coding and AI Agent capabilities became one of the directions with the most commercial certainty.

    From an engineering perspective, this convergence makes sense. A general-purpose foundation sets the ceiling on capability, while coding tasks are a high signal-to-noise testbed for a foundation’s “reasoning density, instruction following, and long-context stability”: requirements are naturally structured, results can be verified automatically, and errors can be localized quickly. So to judge whether a model generation has genuinely improved, coding scenarios often say more than leaderboards.

    2. Three Stages of Capability Progression

    Abstracted out, this progression falls into roughly three stages, each with different evaluation criteria.

    The first stage is “usable”: the model understands function-level requirements and generates runnable code, but cross-file understanding is weak and constraints are easily lost in long contexts. The second stage is “clear positioning”: the product form shifts from chat to agents, emphasizing tool calls, multi-step planning, and self-correction, with engineering attention turning to context assembly and state management. The third stage is “engineering trustworthy”: stable instruction following and minimal-change behavior on real repository-level tasks, along with a key signal — non-reasoning mode performance can approach the previous generation’s reasoning mode.

    The last point deserves elaboration. Reasoning mode usually means the model does longer internal thinking before answering in exchange for higher accuracy; non-reasoning mode pursues low-latency, low-cost direct answers. When direct-answer capability catches up to the previous generation’s “deep thinking mode,” it means three things: the foundation itself covers knowledge and code distributions more completely; training objectives emphasize “getting it right the first time” rather than “thinking for a long time before getting it right”; and the effective information density per token has increased. For developers, the direct result is that the latency and cost structure is rewritten, and many medium-complexity tasks that previously required deep thinking can fall back to the normal mode.

    3. Why “Non-Reasoning Matching the Previous Generation’s Reasoning” Is an Important Turning Point

    In real business, mode selection is not a technical preference but a cost model. Suppose a code completion or single-file refactoring task consumes several times more reasoning tokens in deep-thinking mode than in direct-answer mode. When direct-answer quality is good enough, overall call costs drop significantly, while time to first token and end-to-end latency improve at the same time, making the interaction closer to the instant feedback of a local IDE.

    Illustrative mode-routing logic (pseudocode, expressing engineering thinking only):

    1. def choose_mode(task):
    2. # Low complexity, strong constraints, immediately verifiable tasks use direct answer
    3. if task.files_touched <= 1 and task.has_clear_signature:
    4. return "fast"
    5. # Cross-file tasks, tradeoffs, or architecture changes use deep thinking
    6. if task.cross_module or task.requires_tradeoff:
    7. return "deep"
    8. # The middle ground falls back dynamically based on historical pass rate
    9. return "fast" if task.history_pass_rate > 0.8 else "deep"

    The premise of this tiered routing is that direct-answer mode already has a stable pass rate on tasks that are “single-file, clearly signed, and automatically verifiable.” Evaluation should not look only at a single success rate but also at variance: a stable 80% is better than performance swinging wildly between 60% and 95%, because variance directly determines retry strategy and the ratio of human intervention.

    4. How to Scientifically Evaluate Coding Capabilities

    It is advisable to build a three-layer evaluation system to avoid being misled by a single leaderboard.

    The first layer is unit-level: given a function signature and constraints, determine whether it compiles and passes unit tests. The second layer is repository-level: pose a requirement in a real project such as “add a new endpoint and wire in authentication middleware,” testing cross-file retrieval, dependency inference, and minimal-change ability. The third layer is process-level: observe multi-turn correction behavior, including whether the model locates the real cause after a test failure rather than repeatedly tweaking unrelated code.

    Beyond pass rate, metrics should record: average number of files changed (fewer is usually more trustworthy), number of ineffective retries, number of instruction violations (for example, introducing new dependencies without permission), and human takeover rate. Wiring these metrics into logging services and monitoring alerts is what forms a sustainable, regression-capable evaluation loop.

    5. Context Engineering: The Other Half of the Real Experience

    The same model can feel vastly different under different context-organization approaches. In practice, four principles are recommended: first, provide a repository skeleton rather than the full codebase, using a directory tree and key interface signatures to build a “map”; second, state constraints explicitly, such as “do not add third-party dependencies” and “keep the existing error-handling style”; third, front-load verification means by giving tests or type definitions first, then having the model fill in the implementation; fourth, control history length by summarizing and compressing long sessions so early constraints are not diluted.

    A streamlined prompt structure example:

    1. [Repository structure] Only relevant directories and file responsibilities
    2. [Task] Add paginated query to user_service, with parameters and return structure as follows...
    3. [Constraints] No new dependencies; reuse the existing logging wrapper; throw BizError uniformly for exceptions
    4. [Verification] Output the function signature and unit tests first, then the implementation
    5. [Output format] Unified diff, annotating the reason for each file's changes

    6. Adoption Advice and Common Pitfalls

    When adopting, start with “automatically verifiable” scenarios such as code completion, unit test generation, script migration, and log troubleshooting suggestions — these offer fast returns and low risk. For changes involving core transactions or permissions, keep human review and canary releases, and do not let the model write directly to production branches.

    Common pitfalls include: treating ultra-long context as a cure-all, which drowns out key constraints; counting only success rate while ignoring variance and human takeover rate; lacking a regression set, so that any model or prompt change makes it impossible to tell progress from regression; and ignoring data security boundaries by sending sensitive code and credentials into uncontrollable pipelines. In enterprise practice, model capabilities are usually wrapped behind an in-house gateway, combined with object storage to save evaluation samples, message queues to smooth peaks, and container platforms to host inference and tool sandboxes, forming an auditable, rollback-capable engineering system. For an out-of-the-box managed form, you can look at the general-purpose model services and supporting data and monitoring capabilities offered by Baidu AI Cloud to lower the barrier to self-building.