LLM Coding Capabilities: Evolution and an Engineering Selection Guide
This guide explains how coding LLM capabilities have changed and offers a verifiable method for selecting models in engineering teams. It covers measurable criteria for code generation, long-context and cross-file tasks, and task decomposition. It then shows how to build a private evaluation set, compare candidate models with unified metrics, choose pilot scenarios, and prepare a private deployment on Baidu AI Cloud.
This guide does not focus on specific product models. It discusses how coding LLMs have changed in engineering work and how teams can select them with a verifiable method. After reading it, you can build your own private evaluation set, compare candidate models with unified metrics, and decide which scenarios to pilot.
1. Changes in Core Coding Capabilities
When you evaluate a coding model, start by looking at how its underlying capabilities have changed. The three dimensions below best reflect these differences. Each one comes with a measurable definition.
1.1 Code Generation and Syntax Accuracy
Early models often produced syntax errors, called deprecated APIs, and invented functions that did not exist. Newer models have improved on these problems considerably. They can generate function-level and class-level code based on context. This progress comes mainly from two sources: training on large volumes of open-source code, and stronger instruction-following.
To measure the improvement, use the following metrics instead of relying only on subjective impressions:
- Syntax pass rate: whether the generated code passes compilation or static checks for the target language.
- Unit test pass rate: the proportion of generated code that passes existing unit tests.
- Deprecated API hit rate: the proportion of generated code that calls deprecated interfaces, which you can count with static scanning.
- Human review acceptance rate: the proportion of code that senior engineers accept without modification.
1.2 Long-Context Understanding and Cross-File Refactoring
Logical dependencies across files are a common challenge in engineering. Many current models support longer context windows and can read large amounts of code. However, a long window does not guarantee that a model can handle an entire repository reliably. As input grows, latency and cost increase, and the model may pay less attention to information far from the prompt’s focus.
As a result, repository-level performance depends on three factors: whether the context window is long enough, whether the setup uses retrieval augmentation or chunking strategies, and whether the latency and cost of large inputs are acceptable. When the context window and retrieval strategy meet these conditions, a model can handle repository-level tasks.
Suppose a project has the following structure:
/src/modelsuser.py/servicesauth.py/apiroutes.py
If you ask a model to add an authentication method in auth.py and call it correctly from routes.py, the model must read both files and the user model in user.py. A good result follows the existing style, produces a complete call chain, and does not break existing interfaces. You can measure cross-file reference accuracy by checking whether each referenced symbol exists and has the correct signature.
1.3 Logical Reasoning and Task Decomposition
Moving from “writing code” to “solving problems” is another important shift in model capability. Newer models reason step by step more effectively and can break complex requirements into executable subtasks.
Take the task “implement a file upload API that supports resumable uploads.” You can apply the following decomposition template:
- Requirement breakdown: list the API route, file chunking, validation of uploaded chunks, and merge logic.
- Acceptance criteria: write a testable condition for each subtask. For example, uploading the same chunk twice should be handled idempotently.
- Risk check: review security, performance, and compatibility issues one by one. Examples include path traversal risks, memory use for large files, and client version compatibility.
- Step-by-step implementation: generate code for each subtask and run the matching tests after each step.
This template makes model output verifiable. Tests and reviews can check the results, so the output is more than something that merely looks reasonable.
2. Selection and Evaluation Framework for Engineering Scenarios
Public benchmark scores should not be the only basis for selection. Benchmark tasks often differ a lot from your codebase, language stack, and business rules. A more reliable approach is to build a private test set for your own scenarios and compare candidate models with unified metrics.
2.1 How to Choose for High-Frequency Coding
This scenario focuses on response speed and the accuracy of function-level completion. Developers often wait for completions while they type in an IDE, so lightweight, low-latency models are a better fit.
Track two metrics:
- Time to first token (TTFT): the time from sending a request to receiving the first output token.
- Generation speed (tokens/s): the number of output tokens divided by the generation time.
Measure these metrics on the same network conditions. Use the median and P95 values across multiple requests rather than a single result.
2.2 How to Choose for Legacy System Maintenance and Code Review
Maintaining legacy systems requires strong long-context and logical understanding. Models are often used to interpret historical code, add comments, find hidden defects, and perform security audits.
For this scenario, focus on how the model performs with very long inputs. For example, feed a code repository of several hundred thousand tokens to the model, then ask it to locate all call sites of a specific business branch and verify the results. Key measures include the accuracy of information extraction, the number of missed call sites, and whether the refactoring suggestions can go directly into manual review.
2.3 How to Evaluate Automated Testing and CI/CD Integration
This scenario requires the model to follow instructions and identify boundary conditions. Consider the following function:
def calculate_discount(price, user_level):if user_level == "VIP":return price * 0.8return price
Beyond normal inputs, the model’s generated tests should cover these boundaries:
priceis negative or zero.user_levelis empty, has inconsistent casing (such as"vip"), or is an unknown level.- Floating-point precision issues. For example, when
priceis0.1or99.99, check whether the result of* 0.8must be rounded according to currency rules. - Assertions are precise and do not only check that “no error is raised.”
The generated test files also need to run in a continuous integration pipeline. Check whether the tests run independently in the CI environment, whether failure messages are readable, and whether the tests interfere with each other.
2.4 Scenario Selection Reference Table
The table below gives a starting point for evaluating each scenario. The thresholds are initial values. Calibrate them against your team’s historical baselines.
| Scenario | Key Metrics | Test Set Construction | Initial Pass Threshold | Cost and Compliance Constraints |
|---|---|---|---|---|
| High-frequency coding | TTFT, tokens/s, completion acceptance rate | Sample completion cases from the past three months of commits | Median TTFT no higher than the waiting time your team can accept | Confirm whether input code may be used for third-party training |
| Legacy system review | Cross-file reference accuracy, miss rate, human review acceptance rate | Select repositories with known historical defects and security issues | Set reference accuracy and miss rate targets based on the team’s baseline | Very long inputs are expensive, so control call frequency |
| Automated testing | Unit test pass rate, boundary coverage checklist hit rate | Extract functions from existing code and label their boundary conditions | Share of generated tests that pass in CI on the first run | Anonymize test data, and do not use real user data |
3. Practical Rollout on Baidu AI Cloud
When introducing LLMs inside a company, compute scheduling and data security are two issues that must be planned early. Baidu AI Cloud’s general-purpose compute, container platform, and model inference services can serve as infrastructure for a private intelligent development assistant.
The rollout can be divided into three parts. First, set elastic scaling rules based on peak concurrency during development hours, and record the response time of each scale-out and scale-in event. Second, connect the code hosting platform with the model service, and add log services and monitoring alerts to record call volume, failure rate, and average latency. Third, anonymize logs so that code snippets, keys, or personal information in prompts are not stored long-term.
For security, consider transport encryption, access control, network isolation, operation auditing, and least-privilege permissions. These settings help reduce the risk of code asset leaks. The specific security capabilities and the division of responsibilities should follow the service agreement and the shared security responsibility terms. Availability, backup policies, and service level agreements (SLAs) should also be based on the actual service terms and measurement methods.
Before going live, check the following:
- Access permissions to code assets are assigned by project and role.
- Whether a third-party model may train on input data, and whether the service agreement states this clearly.
- Whether logs contain source code or sensitive fields, and whether anonymization rules are in effect.
- Whether scaling and failover plans for the model service have been tested.
4. Summary and Selection Checklist
Coding LLM capabilities are changing, but the basic method for selecting them has not. Teams should build a repeatable evaluation system that fits their own technology stack, and let data inform model choices.
Before making a decision, go through the following checklist:
- Task type: completion, refactoring, review, or test generation.
- Context length: single file, module level, or repository level.
- Latency budget: the waiting time developers can accept.
- Private deployment and compliance: whether code and logs may leave the internal network, and whether private deployment is required.
- Cost: the per-call fee multiplied by the estimated call volume, giving the monthly total.
