Selecting Chinese Programming LLMs: Dimensions, Methods, and Best Practices

    Asking "Which Chinese programming LLM is the best?" lacks a rigorous premise due to task heterogeneity, rapid model iterations, and subjective user experiences. This article explores how to systematically evaluate and select programming LLMs by defining core evaluation dimensions such as code generation quality, long-context understanding, and agent capabilities. It further provides a practical, reproducible selection workflow—from building an evaluation set and automating scoring to phased trials and version tracking—helping development teams transform subjective judgments into reproducible engineering decisions.

    Selecting Chinese Programming LLMs: Dimensions, Methods, and Best Practices

    1. Why “Which is the best?” is a False Premise

    In developer communities, “Which Chinese programming LLM is the best right now?” is a frequently asked question, but it lacks a rigorous premise. The reasons are:

    1. Task Heterogeneity: Writing a regular expression, refactoring a 100,000-line legacy system, and troubleshooting an intermittent timeout in a distributed trace chain require completely different model capabilities. No single model is optimal across all programming subtasks.
    2. Rapid Version Iterations: Mainstream models release new versions almost quarterly. Conclusions drawn today may become invalid in three months. Selection conclusions must be tied to specific versions and timestamps.
    3. Subjective Experience of “Usefulness”: The perceived experience of the same model can vary drastically between code completion and conversational scenarios. Individual experiences cannot be directly swapped with team experiences.

    Therefore, a more reasonable question should be reframed as: “For my typical programming scenarios, how can I use reproducible methods to evaluate and select the most suitable model?” This article revolves around this universal technical question.

    2. Core Evaluation Dimensions in Programming Scenarios

    1. Code Generation Quality

    This is the most fundamental dimension and can be broken down into three layers:

    • Syntax Correctness: Whether the generated code can directly pass compilation or interpretation. This is the baseline requirement, and current mainstream models generally perform well here.
    • Logical Correctness: Whether the code is reliable regarding boundary conditions, exception handling, and concurrency safety. For example, ask the model to implement a local cache with an expiration time, and observe whether it handles details like concurrent read/write, expiration cleanup strategies, and memory limits.
    • Engineering Norms: Whether naming, commenting, and error handling styles comply with team standards and follow the idiomatic style of the target language.

    During evaluation, it is recommended to prepare a set of tasks covering different difficulties and domains (algorithm problems, business logic problems, framework integration problems) and use unified automated test cases to verify the pass rate of the generated code, rather than relying on visual inspection.

    2. Long Context and Codebase Understanding Capabilities

    In real-world engineering, models often need to understand the context of the entire repository: module dependencies, type definitions, and existing utility functions. Long-context capability directly determines whether the model can provide modifications that “match the repository’s style” in large projects, rather than “textbook-style generic code.”

    Example testing method: Give the model a cross-file refactoring task, such as migrating all callers of a certain function to a new interface, and observe whether it can accurately locate all call points and maintain type consistency.

    3. Agent and Tool Calling Capabilities

    Current programming assistants have evolved from “completion tools” to “autonomous agents”: models need to be able to decompose tasks, call terminal commands, read/write files, execute tests, and self-correct based on error reports. Differences in this dimension are the most perceptible in actual use.

    A reproducible test: Ask the model to build a database-inclusive project from scratch and pass the tests in an isolated container environment. Observe whether its task decomposition is reasonable, whether it can iteratively fix issues based on error messages after failures, and whether it falls into an infinite loop.

    4. Trade-off Between Context Window and Response Speed

    LLM products typically offer multiple versions: flagship versions have the strongest capabilities but high latency and cost; lightweight versions are fast and cost-effective, suitable for high-frequency inline completion scenarios. Selection is not about “only choosing the strongest,” but configuring by scenario tiers:

    1. Inline completion / Comment generation -> Lightweight version (low latency priority)
    2. Single-file generation / Unit testing -> Mid-tier version
    3. Cross-file refactoring / Agent tasks -> Flagship version (capability priority)

    5. Cost and Deployment Methods

    • API Calls: Billed by token, suitable for rapid validation and small teams, but attention must be paid to the cost amplification caused by long-context inputs.
    • Private Deployment: For enterprises sensitive to code security, they typically focus on deployment solutions for open-weight models on their own GPU clusters, evaluating the throughput optimization capabilities of inference frameworks (e.g., batching, KV Cache management).
    • Hybrid Strategy: Sensitive code goes through private deployment, while general tasks go through cloud APIs, which is a compromise choice for many enterprises.

    3. A Practical Selection Workflow

    Step 1: Define the Evaluation Set

    Extract 20 to 50 typical cases from the team’s real historical tasks, covering categories such as bug fixing, new feature development, test generation, code review, and documentation generation. For each case, record the input context, expected output, and acceptance criteria. Use real tasks instead of public benchmarks, because public leaderboard scores have limited correlation with your business scenarios.

    Step 2: Design Automated Scoring

    1. # Example: Core logic of the evaluation script
    2. def evaluate(model_output, test_cases):
    3. passed = sum(run_test(model_output, t) for t in test_cases)
    4. return {
    5. "pass_rate": passed / len(test_cases),
    6. "compile_ok": compiles(model_output),
    7. "latency_p95": measure_latency(model_output),
    8. }

    For tasks that cannot be automatically verified (such as code review quality), double-blind scoring can be adopted to reduce subjective bias.

    Step 3: Small-scale Phased Trial

    Select two or three candidate models and have 3 to 5 developers in the team use them on real projects for one to two weeks, recording qualitative feedback: hallucination rate, adoption rate of modification suggestions, frequency of context loss, etc.

    Step 4: Establish Version Tracking Mechanism

    Given the rapid iteration of model versions, it is recommended to re-run the evaluation set quarterly and consolidate the results into internal documentation. Selection is not a one-time decision, but a continuous process.

    4. Common Pitfalls

    1. Relying solely on public leaderboards: Leaderboard scores may be specifically optimized, and their correlation with actual engineering tasks should be treated with caution.
    2. Ignoring prompt engineering: The same model can perform several times differently depending on how the context is organized. Before selection, ensure that your prompt engineering practices are adequate.
    3. Concluding from a single scenario: Performance in completion scenarios cannot represent performance in Agent scenarios, and vice versa.
    4. Ignoring data security and compliance: Before uploading company code to third-party APIs, be sure to verify the data usage terms and compliance requirements.

    5. Conclusion

    The overall level of Chinese programming LLMs has entered a practically usable stage, and the iteration pace of various vendors is fast. Rather than asking “which is the best,” it is better to establish your own evaluation system: clarify scenario tiers, build real evaluation sets, automate scoring, conduct phased trials, and periodically re-test. As model capabilities continue to evolve, this mechanism ensures that your team always uses the model best suited to its business under the current version, rather than being swayed by a single subjective experience or a review article. The essence of technical selection is upgrading “experience-based judgment” to “reproducible engineering decisions.”