Map

Constraint Decay: The Fragility of LLM Agents in Backend Code Generation

Sources Francesco DenteDario SatrianiPaolo Papotti โ†ณ show in map Markdown
title
Constraint Decay: The Fragility of LLM Agents in Backend Code Generation
author
Francesco Dente, Dario Satriani, Paolo Papotti
fetched
2026-07-21

Constraint Decay: The Fragility of LLM Agents in Backend Code Generation

Authors: Francesco Dente, Dario Satriani, Paolo Papotti Submitted: May 7, 2026 (arXiv:2605.06445) Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI) arXiv: https://arxiv.org/abs/2605.06445

Abstract

Large Language Model (LLM) agents demonstrate strong performance in autonomous code generation under loose specifications. However, production-grade software requires strict adherence to structural constraints, such as architectural patterns, databases, and object-relational mappings. The study evaluates agent performance across 80 greenfield and 20 feature-implementation tasks spanning eight web frameworks, finding that as structural requirements accumulate, agent performance exhibits a substantial decline โ€” a phenomenon the authors call constraint decay.

Main Result

Performance drops approximately 30 points in assertion pass rates when moving from baseline (loosely specified) to fully specified tasks, with some weaker configurations approaching zero performance. Simultaneously satisfying functional and structural requirements remains unresolved for coding agents.

Key Claims

  1. Constraint decay โ€” as structural constraints accumulate, agent performance degrades sharply (~30-point drop in assertion pass rate from baseline to fully specified; weakest configs near zero).
  2. Framework sensitivity โ€” agents do significantly better with minimal frameworks (Flask) but struggle with convention-heavy environments (FastAPI, Django).
  3. Root cause: data-layer defects โ€” incorrect query composition and ORM runtime violations are the leading failure category.
  4. Autonomous code generation under loose specifications does not transfer to production-grade backend work with strict architectural/database/ORM constraints.

Benchmark Design

  • 80 greenfield tasks + 20 feature-implementation tasks (100 total).
  • Eight web frameworks evaluated (named examples: Flask, FastAPI, Django).
  • Structural constraints tested: architectural patterns, databases, object-relational mappings (ORMs).
  • Metric: assertion pass rate, measured from loosely specified baseline through fully specified tasks.