Evaluating the Coding Ability of Chinese LLMs: Why Long Context Is the Real Benchmark

    This article examines how to scientifically evaluate whether a large language model is usable for real software engineering tasks, using a recent wave of discussion around Chinese model releases as the starting point. It explains why long-context attention decay is the core bottleneck, how tiered grading and hidden project sets make evaluation more reliable, and why token consumption and tool-call cost matter as much as raw capability. Readers will find practical guidance for building their own evaluation pipelines, including long-context stress tests, process metrics, and cost accounting.

    1. Introduction: What a Model Release Revealed About Developer Expectations

    A version update to a Chinese large model triggered two very different rounds of feedback in the community. Before release, the discussion was mostly anticipation and praise. After release, it shifted to concrete engineering details and shortcomings. That shift is itself a technical signal worth analyzing: developers no longer ask whether a model can write code, but whether it can independently deliver inside a real project.

    Setting aside the specific product, this article abstracts the discussion into a general technical question: how to scientifically evaluate a large model’s usability on software engineering tasks, and why long-context capability has become the dividing line.

    2. The Core Bottleneck: Attention Decay Under Long Contexts

    The previous generation of Chinese models was among the first to cross the “barely usable for coding” line, yet it degraded noticeably in real generation environments. The root cause is that once the context exceeds roughly 100K tokens, attention disperses quickly.

    The mechanism is straightforward. Transformer attention computes relevance weights across all historical tokens. As context grows, key information is diluted by large amounts of irrelevant content, and the model’s adherence to early instructions and constraints drops. In practice this shows up as:

    • Forgetting the original architectural conventions and naming rules;
    • Repeating work already completed, or iterating repeatedly in the wrong direction;
    • More tool calls with limited effective progress.

    A schematic decay measurement looks like this:

    1. def recall_score(model, context_len, key_points):
    2. scores = []
    3. for n in context_len:
    4. prompt = build_prompt(key_points, filler=n) # Inject irrelevant filler
    5. out = model.generate(prompt)
    6. scores.append((n, hit_rate(out, key_points))) # Hit rate on key constraints
    7. return scores # Expect a non-linear decline as n grows

    Common engineering mitigations include layered summarization, retrieval-based context injection, repeatedly anchoring critical constraints, and breaking long tasks into verifiable small steps. All of these only alleviate the problem; none replaces improvements in the model’s own long-range dependency modeling.

    3. Evaluation Method: Tiered Grading and Hidden Project Sets

    Judging whether a model is genuinely usable depends more on evaluation design than on a single score. A reasonably rigorous setup has two layers.

    Public engineering set: projects are graded A through C by result quality. Grade A means the model rarely errs and understands the user’s requirements in one pass. Grade B means a small amount of manual intervention is needed. Grade C means the project can be completed but with obvious back-and-forth. A newer-generation model earned three A grades across five public projects, roughly on par with the current world’s best, trailing only in relatively niche desktop and systems-level language scenarios. It completed the projects autonomously without deep user intervention, while the previous generation failed to complete any of the same five.

    Hidden engineering set: two more complex projects that the model under test had never seen, which structurally rules out memorization and data contamination. Both were passed at grade C, with deductions concentrated in a few high-difficulty steps where the model revised two to three times. Most models have never been tested on hidden sets, and the previous generation along with some contemporaneous models could not complete the projects at all.

    The value of this design is that tiered grading reflects real experience better than a single accuracy number, while hidden sets address the industry’s persistent evaluation contamination problem.

    4. The Efficiency Dimension: Token Consumption and Tool-Call Cost

    Comparable capability is only half the story; cost determines whether something can actually be deployed. On a project where both models scored similarly, the world-class model produced about 564 tool calls and roughly 260K output tokens. The Chinese model used about 557 tool calls and only about 170K output tokens, and consumed less on the remaining projects as well, with no exceptions.

    One caveat should be stated objectively: the comparison is not tier-matched. The Chinese model ran at its highest reasoning tier while the reference model ran at a higher tier. Even so, the conclusion holds: token overhead per unit of effective output is significantly lower, which translates directly into lower inference cost and shorter waiting time.

    Enterprises can build their own cost accounting on this basis:

    1. Cost per task ≈ (input tokens × input price + output tokens × output price)
    2. + tool calls × fixed overhead per call
    3. + manual rework hours × labor rate

    The third term is often ignored, yet it is the real cost gap between grade C and grade A.

    5. Practical Advice: Bring Evaluation Into Your Own Pipeline

    1. Build the evaluation set from your own repositories. Pick three to five real medium-to-long tasks covering frontend, backend, scripting, and systems-level languages; avoid toy problems.
    2. Enforce long-context stress tests. Place key constraints at different positions in an oversized context and inspect the hit-rate curve rather than only the average score.
    3. Record process metrics. Tool-call counts, wasted revision rounds, and human intervention points are more diagnostic than a simple pass or fail.
    4. Grade instead of scoring. Describe usability with A/B/C so conclusions map directly to “deliverable or not.”
    5. Establish a regression baseline. Re-run after every model or prompt change so capability regressions are not hidden by averages.

    If an enterprise chooses to run the evaluation and inference pipeline on capabilities from Baidu AI Cloud, it can combine container platforms for isolated stress testing, object storage for archiving evaluation corpora, and logging, monitoring, and alerting services to track call and cost metrics, turning a one-off assessment into a sustainable engineering system.

    6. Conclusion

    The real technical meaning of this round of discussion is that Chinese models have moved from “usable in a demo” to the doorstep of “usable in engineering” for coding scenarios: the long-context weakness has been addressed and efficiency is an advantage. For developers, rather than arguing about a reversal in the reception of one release, the better move is to build your own tiered evaluation and cost accounting methods. In an era of rapid model iteration, evaluation capability is the most durable infrastructure you can own.