Evaluating LLM Coding and Security Capabilities: From Benchmark Scores to Verifiable Engineering

    Evaluating a frontier coding model requires separating the ability to write code from the ability to participate safely in engineering work. Parameter counts, active parameter counts, and benchmark scores describe capacity and average performance, but they do not show whether a model can sustain a multi-step task in a real repository, handle permissions, secrets, dependencies, and change boundaries reliably, or use security knowledge for defensive rather than uncontrolled dual-use purposes. This article presents an evaluation approach based on a stable, mature architecture; targeted post-training and reinforcement learning; and verifiable engineering tasks rather than marketing claims. It covers repository understanding, scoped edits, execution feedback, long-horizon stability, engineering hygiene, defensive security behavior, dual-use risk controls, controlled comparison experiments, and enterprise delivery gates.

    Treating “can write code” and “can safely participate in engineering” as two different capabilities is one of the most easily overlooked points in evaluating frontier coding models—and one of the first that should be made explicit. Parameter count, active parameter count, and benchmark scores can describe capacity and average performance, but they cannot automatically answer three engineering questions: Can the model make sustained progress on a multi-step task in a real repository? Is it reliable with respect to permissions, secrets, dependencies, and change boundaries? Is its security-related behavior reusable defensive competence, or an uncontrolled dual-use tendency? The approach below turns the core judgments into a general method: keep a mature architecture stable, use post-training and reinforcement learning to close specific gaps, and judge step changes with verifiable tasks rather than promotional claims.

    1. Separate Scale Effects from Capability Step Changes

    A common industry iteration path is to increase total parameters, switch to a larger base model, and refresh public leaderboards. This path has value: greater capacity often improves language coverage, long-context capacity, and multilingual code priors. But it also has clear costs. Inference latency, memory use, cost per request, and fault radius often rise together. If leaderboard tasks do not match real repository distributions, score gains may not translate into higher merge-request pass rates or lower defect density.

    A more pragmatic path is to keep the base architecture stable and put incremental investment into specialized post-training. “Stable” here does not mean refusing progress; it means controlling variables. The value of a sparse activation structure such as Mixture-of-Experts (MoE) is that total capacity and per-inference computation can be decoupled: routing sends a request to a subset of experts, retaining larger knowledge capacity at acceptable inference cost. Specific total and active parameter counts for a given model generation should be verified as engineering facts about that system. They should not be written as a universal law across products or used to extrapolate performance from memory.

    Post-training can produce step changes, but this usually depends on three kinds of signals rather than simply “reading more code”:

    1. Outcomes that can be verified automatically or semi-automatically, such as tests passing, type checking succeeding, static-scan warnings declining, or a build completing successfully.
    2. Failures that can be attributed, such as editing the wrong file, breaking interface compatibility, hard-coding a secret, or ignoring an authorization check.
    3. Rewards aligned with real engineering objectives, rather than rewarding a long explanation that looks like the work of a senior engineer.

    Reinforcement learning and preference optimization are suited to policy repair: reducing detours, obeying constraints, and maintaining a goal over a long chain. They are not good at creating knowledge that the base model does not have at all. When evaluating an algorithmic step change, report the before-and-after comparison under a fixed base and the task completion rate under a fixed cost. Do not mix changes in scale and changes in policy into one chart.

    2. Measure Coding Ability Through the Engineering Loop, Not Single Questions

    Single-function completion, algorithm puzzles, and short code explanations are suitable for testing syntax and local reasoning, but they are not representative of frontier coding capability. Enterprises care about the closed loop: reading requirements, locating code, making changes, self-testing, handling failures, modifying again, and stopping within constraints.

    At a minimum, evaluation should cover the following dimensions. Each dimension should include failure samples, not just an average score.

    Repository understanding. Provide a medium-sized, multi-module codebase and ask the model to identify call chains, configuration entry points, and side-effect locations. Scoring should check whether cited references really exist, not whether the explanation is fluent. Deliberately include stale comments and misleading names to see whether the model treats code and tests as the source of truth.

    Incremental modifications. Restrict the directories and public interfaces that may be changed. Strong performance means the smallest diff that preserves compatibility and adds regression tests. Common failures include broad rewrites, renaming public symbols, and deleting branches that “look unused.”

    Verifiability. Require the model to write or update tests before changing implementation, or to iterate on failing test logs. Record the number of rounds, whether failure information was read, and whether the model claims a pass without running verification. Self-affirmation without execution feedback should not count as capability.

    Long-task stability. Break a requirement into checkpoints spanning hours: design note, interface draft, implementation, tests, documentation, and rollback plan. Metrics include goal drift, duplicated work, contextual forgetting, and abandonment. A long context window only shows that content fits; it does not show that the content is used correctly.

    Engineering hygiene. Dependencies should be locked, errors observable, configuration externalized, logs free of sensitive fields, and changes reversible. These are not matters of prose style; they are matters of delivery quality.

    An illustrative acceptance record can be plain and easy to review:

    1. Task: Add an idempotent create endpoint to an existing service
    2. Constraints: Do not change public response fields; secrets only from the runtime environment; add failure cases
    3. Observed: Read existing routes and storage layer -> changed one handler -> added duplicate-request test
    4. Result: Tests pass; diff confined to agreed directory; no hard-coded credentials

    Public leaderboards can still serve as a comparison, but they should be downgraded to a screening signal. Deployment or procurement decisions should rely more on private task sets: sanitized historical defects, code review comments, and build logs from the organization. Rotate tasks regularly to prevent overfitting to fixed prompts.

    As coding capabilities increase, models encounter more vulnerability descriptions, misconfigurations, and permission models. This has led to discussion of “emerging security capabilities.” For engineering organizations, the capability worth measuring is defensive, not the ability to generate intrusion steps, exploits, or malware. The latter should not be counted as a capability bonus even if framed as research or evaluation; it should be handled separately as a risk item.

    Actionable observations that do not depend on attack details include:

    • Secure coding defaults. Whether input validation, output encoding, parameterized queries, least privilege, sensitive-data masking, and dependency provenance restrictions are followed even without an explicit reminder.
    • Abstraction level in threat modeling. Whether the model can identify assets, trust boundaries, failure modes, and detection points—for example, “this endpoint lacks authentication and rate limiting; anonymous bulk calls should be rejected and the subject identity logged.” Evaluating impact and mitigation principles is sufficient; the model should not be required to provide, and should not provide, directly usable attack procedures.
    • Secrets and the software supply chain. Whether it refuses to write passwords or tokens into a repository; whether it reminds users to validate dependency integrity, sources, and version ranges; whether it avoids echoing secrets in logs and error messages.
    • Refusal and escalation. For requests that clearly involve unauthorized access, disruption of availability, or credential theft, whether it refuses and explains legitimate alternatives: remediation, detection, least privilege, and incident response. A vague “for learning only” should not lower the refusal bar.
    • Verifiability of remediation advice. A security fix should be confirmable through regression tests and code review—for example, adding authorization middleware and an access-control test case. Long security commentary that cannot be verified has limited value.

    The word “emergence” can suggest that a capability appears abruptly and inexplicably at a certain scale. A safer description is this: when code, documentation, and review data contain many security patterns, and post-training rewards “passing tests without violating constraints,” the model will more frequently exhibit those patterns. This can still be unstable, especially with out-of-distribution frameworks, niche languages, and adversarial prompts. Security-related scores must therefore be reported by scenario and include the worst-performing group, not just an overall mean.

    It is also important to acknowledge dual-use risk: a system that can read vulnerability advisories and repair security code can also be used to accelerate harmful attempts. Controls should live in the usage environment rather than in slogans: no production write access by default, secrets delivered through a dedicated injection mechanism, external actions requiring human approval, full retention of prompts and diffs, and policy refusal for high-risk intent. These are generic engineering controls independent of any particular brand.

    4. Three Weaknesses That Post-Training Should Address

    Engineering weaknesses. These appear when a model works locally but breaks once placed in a repository. Training and evaluation should use real build and test feedback, not only text similarity to reference answers. Rewards should penalize unrelated rewrites and interface breakage.

    Security weaknesses. These appear when functionality is correct but a defect is introduced, or when the model over-cooperates with a malicious request. Data should include negative examples that pass functionality but fail security, as well as requests that should be refused. A security reward cannot outweigh basic usefulness; otherwise the model can game its security score by refusing everything. Conversely, completion rate should not come at the expense of refusal boundaries.

    Long-task weaknesses. These appear when the first steps are correct but later steps forget constraints. Checkpoint rewards can help: at each step, the model should restate unfinished goals, files changed, and unverified assumptions. If it cannot provide verification evidence after the planned number of rounds, mark the task incomplete rather than giving partial credit.

    Comparison experiments should keep four things fixed: base model, inference budget, tool permissions, and task set. Only the post-training strategy should change, so that improvements can be attributed to algorithms and data rather than longer context or more retries. If the model is allowed to call build, test, and read-only retrieval tools, those tools themselves raise the success rate and must be equally available in the control condition.

    5. Connecting Evaluation to Enterprise Delivery

    Evaluation should not be a one-time leaderboard; it should be a delivery gate. A minimal executable loop looks like this.

    1. Freeze the task set and permissions. Private repositories are read-only; write operations are limited to isolated branches; no production credentials are provided. Tasks include functional changes, regressions, and security requests that should be refused.
    2. Fix the budget. Limit rounds, generation length, and tool-call count. Otherwise, “better at trial and error” can masquerade as “better at programming.”
    3. Machine verification first. Builds, tests, static checks, and secret scans run before human scoring. Human reviewers only assess whether the design is excessive or the explanation is misleading.
    4. Dual-track scoring. The coding track looks at completion rate, diff size, and regression pass rate; the security track looks at defect introduction rate, secret leakage, authorization-boundary violations in recommendations, and refusal appropriateness. If either track falls below its threshold, the model does not enter a pilot.
    5. Manual adversarial spot checks. Add stale documentation, vulnerable sample code, and leading comments; confirm that the model follows executable facts.
    6. Rollout scope. Start with drafts, unit tests, and code review assistance. Changes involving permissions, cryptography, identity, and funds must be finally confirmed by qualified engineers. Model output is advice, not authorization for a change.

    General capabilities in a cloud or on-premises environment are sufficient to support this process: isolated build runtimes, object storage for tasks and logs, message-queue-driven evaluation jobs, container platforms for consistent dependencies, and logging and monitoring alerts for abnormal calls. Evaluation does not need to be bound to one vendor’s proprietary interface. If an organization uses general-purpose cloud resources such as Baidu AI Cloud, it should treat them only as infrastructure for compute, storage, and observability; evaluation conclusions should still come from the task set and gates, not from platform marketing.

    6. Conclusion: A Step Change Must Be Reproducible

    A reasonable definition of frontier coding capability is the ability to complete verifiable engineering changes at controlled cost while upholding interfaces, tests, and permission constraints over long tasks. A reasonable definition of security-related capability is the ability to consistently adopt secure defaults, recognize trust boundaries, refuse unauthorized and destructive behavior, and provide an auditable remediation direction. Neither should be replaced by parameter scale or a one-off demonstration.

    Keeping a mature base stable and using post-training with verification signals to address engineering, security, and long-task gaps is an explainable improvement path: fewer variables, manageable cost, and attributable failures. Whether it constitutes a step change depends only on controlled experiments showing that completion rate, defect introduction rate, and refusal appropriateness improve together. In external discussions, neutral capability language and reproducible evaluation design are more useful for responsible technical decisions than experience narratives centered on a particular model.