Constraint Decay: The Fragility of LLM Agents in Back End Code Generation
Recorded: May 24, 2026, 2:59 p.m.
| Original | Summarized |
[2605.06445] Constraint Decay: The Fragility of LLM Agents in Backend Code Generation
Skip to main content Learn about arXiv becoming an independent nonprofit. We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. > cs > arXiv:2605.06445 Help | Advanced Search All fields Search GO quick links Login Computer Science > Software Engineering arXiv:2605.06445 (cs) [Submitted on 7 May 2026] 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. Existing benchmarks often overlook these non-functional requirements, rewarding functionally correct but structurally arbitrary solutions. We present a systematic study evaluating how well agents handle structural constraints in multi-file backend generation. By fixing a unified API contract across 80 greenfield generation tasks and 20 feature-implementation tasks spanning eight web frameworks, we isolate the effect of structural complexity using a dual evaluation with end-to-end behavioral tests and static verifiers. Our findings reveal a phenomenon of constraint decay: as structural requirements accumulate, agent performance exhibits a substantial decline. Capable configurations lose 30 points on average in assertion pass rates from baseline to fully specified tasks, while some weaker configurations approach zero. Framework sensitivity analysis exposes significant performance disparities: agents succeed in minimal, explicit frameworks (e.g., Flask) but perform substantially worse on average in convention-heavy environments (e.g., FastAPI, Django). Finally, error analysis identifies data-layer defects (e.g., incorrect query composition and ORM runtime violations) as the leading root causes. This work highlights that jointly satisfying functional and structural requirements remains a key open challenge for coding agents. Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI) Cite as: Focus to learn more arXiv-issued DOI via DataCite Submission history From: Paolo Papotti [view email] [v1]
Full-text links: View a PDF of the paper titled Constraint Decay: The Fragility of LLM Agents in Backend Code Generation, by Francesco Dente and 2 other authorsView PDFHTML (experimental)TeX Source view license < prev | new Change to browse by: References & Citations NASA ADSGoogle Scholar export BibTeX citation BibTeX formatted citation loading... Data provided by: Bookmark
Bibliographic Tools Bibliographic and Citation Tools Bibliographic Explorer Toggle Bibliographic Explorer (What is the Explorer?) Connected Papers Toggle Connected Papers (What is Connected Papers?) Litmaps Toggle Litmaps (What is Litmaps?) scite.ai Toggle scite Smart Citations (What are Smart Citations?) Code, Data, Media Code, Data and Media Associated with this Article alphaXiv Toggle alphaXiv (What is alphaXiv?) Links to Code Toggle CatalyzeX Code Finder for Papers (What is CatalyzeX?) DagsHub Toggle DagsHub (What is DagsHub?) GotitPub Toggle Gotit.pub (What is GotitPub?) Huggingface Toggle Hugging Face (What is Huggingface?) ScienceCast Toggle ScienceCast (What is ScienceCast?) Demos Demos Replicate Toggle Replicate (What is Replicate?) Spaces Toggle Hugging Face Spaces (What is Spaces?) Spaces Toggle TXYZ.AI (What is TXYZ.AI?) Related Papers Recommenders and Search Tools Link to Influence Flower Influence Flower (What are Influence Flowers?) Core recommender toggle CORE Recommender (What is CORE?) Author About arXivLabs arXivLabs: experimental projects with community collaborators Which authors of this paper are endorsers? | About contact arXivClick here to contact arXiv subscribe to arXiv mailingsClick here to subscribe Copyright Web Accessibility Assistance arXiv Operational Status |
Large Language Model agents exhibit strong proficiency in autonomous code generation when operating under loose specifications; however, the demands of production-grade software necessitate strict adherence to structural constraints, including architectural patterns, database implementations, and object-relational mappings. Existing evaluation benchmarks often fail to account for these non-functional requirements, leading to solutions that are functionally correct but structurally arbitrary. The authors conducted a systematic study to evaluate how effectively agents manage these structural constraints during multi-file backend code generation. To isolate the effect of structural complexity, the researchers standardized the evaluation by fixing a unified API contract across eighty greenfield generation tasks and twenty feature-implementation tasks spanning eight different web frameworks. This process employed a dual evaluation methodology, utilizing both end-to-end behavioral tests and static verifiers to assess agent performance. The study revealed a phenomenon termed constraint decay: as the structural requirements imposed on the agents accumulated, their performance experienced a substantial decline. Specifically, capable configurations demonstrated an average decrease of thirty points in assertion pass rates when moving from baseline to fully specified tasks, while some weaker configurations exhibited performance collapse, approaching zero. Further analysis of framework sensitivity demonstrated significant performance disparities, showing that agents are more successful in environments with minimal, explicit framework requirements, such as Flask, but perform substantially worse when dealing with convention-heavy environments like FastAPI or Django. Error analysis further pointed to the root cause of failures, identifying data-layer defects, such as incorrect query composition and violations of ORM runtime rules, as the primary sources of errors. This research emphasizes that the joint satisfaction of both functional requirements and complex structural specifications remains a critical, open challenge for the development of coding agents. |