AI Coding Agents: Capability Limits Amid a Price War

    As inference prices fall and vendors publicly admit their coding agents still fall short, this article examines why writing SQL is not the same as delivering production SQL. It explains constraint decay, why larger context windows do not improve accuracy, and how to layer constraints across syntax, semantics, standards, security, and delivery. It also covers building a three-tier evaluation loop, assigning tasks across reasoning and lightweight configurations, and avoiding common mistakes, showing how to turn lower unit prices into real delivery efficiency.

    1. The Price Cuts Are Real, and So Are the Failures

    Inference pricing for large models has dropped sharply recently. Some general-purpose model APIs now cost a small fraction of their early prices, and the reductions were announced as permanent price changes rather than short-term promotions. Two other developments are happening in parallel: leading vendors have publicly acknowledged that their own capabilities in agentic coding still lag, and capital and engineering resources are concentrating rapidly on the “coding agent” form factor. Together, these three trends define the current landscape: a price war and a capability shakeout are occurring at the same time.

    For data teams, however, the number that affects delivery is not the unit price. It is the pass rate of a complex delivery. A study on constraint decay offers a general conclusion worth noting: as structured constraints accumulate, the assertion pass rate of agents on end-to-end behavioral tests drops by roughly 30% on average, and weaker configurations approach zero. In data engineering terms: asking an agent to write a single-table query is easy; once you add enterprise naming conventions, database and table layering rules, row- and column-level permissions, audit trails, and metric-definition consistency, the failure probability rises sharply.

    The figures above come from a specific experimental setup in public research (new-task and feature-implementation tasks, multiple web frameworks, and both static verification and dynamic testing). They should not be extrapolated into a capability score for any specific product. But the mechanism they reveal is universal: the number and coupling of constraints, not raw model scale, is the main cost driver in complex SQL generation.

    2. Why “Can Write SQL” Is Not “Can Deliver SQL”

    1. Constraints Combine Multiplicatively, Not Additively

    A simple query only needs to be syntactically correct and semantically relevant. A production-grade query must simultaneously satisfy correct join paths between fact and dimension tables, effective partition pruning, metric definitions aligned with the metrics platform, masking of sensitive fields, row-level permission pushdown, and auditability of changes. These conditions are interdependent; changing one affects several others, so the success rate decays approximately multiplicatively as constraints are added.

    2. A Context Window Is Not Effective Attention

    Stuffing hundreds of table DDLs, standards documents, and historical tickets into the context does not improve accuracy linearly. In long contexts, key information gets diluted, and the model tends to produce table and column names that “look reasonable.” This is exactly where hallucinations thrive.

    3. No Executable Validation Loop

    A natural-language instruction such as “please follow the standards” is a soft constraint. Without syntax parsing, lineage validation, permission checks, and unit tests, the model cannot self-correct, and errors surface only at runtime.

    4. Sensitivity to Frameworks and Dialects

    The “framework sensitivity” observed in the research also holds in the data domain: agents perform better on engines with few constraints and clear conventions, and significantly worse on engines and scheduling systems with many conventions and dense implicit rules. Dialect differences (pagination syntax, date functions, array and semi-structured field handling, window function support) amplify the gap further.

    3. Layer the Constraints: A Practical Engineering Approach

    The core idea: do not make the model carry all constraints at once. Layer them so that each layer has determinism and verifiability.

    • L0 Syntax layer: guaranteed by parsers and dialect rules; the model is not allowed to improvise.
    • L1 Semantic layer: options are constrained by a controlled list of tables and columns and a metrics dictionary.
    • L2 Standards layer: naming, layering, partitioning, and lifecycle are fixed through templates and scaffolding.
    • L3 Security layer: permissions, masking, and auditing are enforced by the platform and never left to the model.
    • L4 Delivery layer: unit tests, row-count variance, and metric reconciliation form the acceptance gate.

    A schematic retrieve-generate-validate loop (pseudocode, structure only):

    1. def generate_sql(question, ctx):
    2. # 1) Expose only the minimum necessary metadata, not the full DDL
    3. schema = ctx.search_schema(question, top_k=12)
    4. metrics = ctx.resolve_metrics(question) # single source of truth for metric definitions
    5. guard = ctx.policy_guard() # permission/masking/audit policies
    6. draft = llm.compose(
    7. question=question,
    8. schema=schema,
    9. metrics=metrics,
    10. template=ctx.pick_template(question), # standards fixed via templates
    11. dialect=ctx.dialect # dialect declared explicitly
    12. )
    13. sql = parse_and_normalize(draft) # L0 syntax layer
    14. sql = guard.apply(sql) # L3 security layer, enforced
    15. report = validate(sql, ctx) # lineage/partition/metric validation
    16. if not report.ok:
    17. sql = llm.repair(sql, report.errors, max_rounds=2)
    18. return sql, report

    The key point is that guard.apply and validate do not rely on the model’s self-discipline; they are deterministic platform capabilities. The model’s responsibility is narrowed to “semantic mapping within controlled options.”

    4. Evaluation: Without a Loop, You Cannot Tell Whether Costs Actually Fell

    Lower prices tempt teams to increase call volume, but if the pass rate does not improve at the same time, total cost rises instead. Build a three-tier evaluation:

    1. Static tier: syntax parse pass rate, column existence, lineage validity.
    2. Behavioral tier: execute on a masked sample database and compare result sets against a baseline.
    3. Constraint tier: measure pass rates by constraint count, plot a “constraint-decay” curve, and locate your team’s own inflection point.

    Track these metrics together: first-pass rate, average repair rounds, human takeover rate, average delivery time, and cost per delivery (including labor). Only then can a lower unit price be converted into real engineering gains.

    5. Selection and Division of Labor: Match Capabilities to Tasks

    • Strong reasoning configuration: metric-definition design, complex join-path planning, and root-cause analysis of difficult errors.
    • Lightweight configuration: formatting, comments, dialect conversion, and template filling—low-constraint tasks.
    • Deterministic components: parsers, metadata services, policy engines, scheduling, and monitoring/alerting—never outsourced to the model.

    On the infrastructure side, general-purpose service categories are enough to support the whole system: metadata and lineage services, a message queue for task decoupling, a container platform for stateless executors, logging and monitoring/alerting for observability, and object storage for evaluation samples and reports. When choosing cloud services, look for a complete set of general-purpose categories and stable internal-network calls, rather than the one-off quote for a single model.

    6. Common Mistakes

    • Mistake 1: A model is strong enough to ignore standards. Constraint decay shows that scale does not buy determinism.
    • Mistake 2: Putting all DDL into the context. The signal-to-noise ratio drops and hallucinations rise.
    • Mistake 3: Relying only on natural-language constraints. Soft constraints must become executable validation.
    • Mistake 4: Evaluating returns by unit price. Use cost per delivery and human takeover rate instead.
    • Mistake 5: Shipping a first-generation output directly to production. Without automated canary releases and result reconciliation, the risk is uncontrollable.

    7. Conclusion

    The price war makes calls cheap, but the barrier to complex SQL has never fallen; it has merely shifted from compute cost to constraint-engineering cost. The practical advice for data teams is clear: turn standards into templates and policies, make validation a platform capability, make evaluation a continuous loop, and place the model where it excels—semantic mapping. For a more complete implementation path, you can build a controllable “retrieve-generate-validate-reconcile” pipeline on Baidu AI Cloud using general-purpose cloud products, so that lower costs translate into real gains in delivery efficiency.