This sounds like another version of "As a chat becomes longer, the guardrails seem to become fuzzy". You can't use all of the context window bc at the end, the output would not respect the constraints (or guardrails) but to reliably produce production grade code you want the model to have expansive awareness which fills up the context window pretty quickly. It's like saying "Keep everything in mind from these 6 direc…
This is not a new problem though. This is why we started writing modular code, strict interfaces etc
Constraint Decay: The Fragility of LLM Agents in Back End Code Generation
21–30 of 230 posts
Re: Constraint Decay: The Fragility of LLM Agents in Back End Code Generation
#22“Our systematic study exposes a phenomenon of constraint decay in LLM-based coding agents. While current models excel at unconstrained generation, their performance drops when forced to navigate explicit architectural rules. For end-users, this dichotomy implies that agents are reliable for rapid prototyping but remain unreliable for production-grade backend development.” One major weakness of this study is that they…
If you only have functional requirements, then in effect you're doing some form of program synthesis, and RL can optimize that very hard.
If you have a mixture of functional and non-functional requirements, you are basically giving the model an incomplete specification, and it must in some way guess at the user's intent to fill in the blanks. This is also why adding to the prompt examples of the style of code you want (hats off to antirez for this particular tip ;)) is phenomenally powerful.
Re: Constraint Decay: The Fragility of LLM Agents in Back End Code Generation
#23“Our systematic study exposes a phenomenon of constraint decay in LLM-based coding agents. While current models excel at unconstrained generation, their performance drops when forced to navigate explicit architectural rules. For end-users, this dichotomy implies that agents are reliable for rapid prototyping but remain unreliable for production-grade backend development.” One major weakness of this study is that they…
I think it's downstream of "you can't optimize for two different objectives". If you only have functional requirements, then in effect you're doing some form of program synthesis, and RL can optimize that very hard. If you have a mixture of functional and non-functional requirements, you are basically giving the model an incomplete specification, and it must in some way guess at the user's intent to fill in the blank…
Re: Constraint Decay: The Fragility of LLM Agents in Back End Code Generation
#24“Our systematic study exposes a phenomenon of constraint decay in LLM-based coding agents. While current models excel at unconstrained generation, their performance drops when forced to navigate explicit architectural rules. For end-users, this dichotomy implies that agents are reliable for rapid prototyping but remain unreliable for production-grade backend development.” One major weakness of this study is that they…
I’m not really interested in analysis of the weaknesses of such models because in my experience many weaknesses disappear entirely as models get stronger and reasoning effort is turned up. Especially if you tell them what you want them to do.
Also, it’s not surprising to learn that when more acceptance criteria are added the failure rate increases.
Re: Constraint Decay: The Fragility of LLM Agents in Back End Code Generation
#25> Our findings reveal a phenomenon of constraint decay: as structural requirements accumulate, agent performance exhibits a substantial decline. I have exactly the inverse findings on my end. The bigger and more legacy the codebase, the more accurate the patches become. The harness itself seems to be the most important part. I use a recursive loop that primes the root context based on the user prompt each time. My ag…
Re: Constraint Decay: The Fragility of LLM Agents in Back End Code Generation
#26Earlier quoted context omitted.
I think it's downstream of "you can't optimize for two different objectives". If you only have functional requirements, then in effect you're doing some form of program synthesis, and RL can optimize that very hard. If you have a mixture of functional and non-functional requirements, you are basically giving the model an incomplete specification, and it must in some way guess at the user's intent to fill in the blank…
Would you mind sharing antirez' suggestion?
To put it in practice: if you point claude/codex to a repository and you ask it to implement feature X using style guide Y, the code will probably work, but you can usually get better results by saying "do it in the style of this file, it was done well there".
Re: Constraint Decay: The Fragility of LLM Agents in Back End Code Generation
#27Re: Constraint Decay: The Fragility of LLM Agents in Back End Code Generation
#28Earlier quoted context omitted.
If it’s not easily verifiable, LLMs aren’t good at it.
I think that’s mostly because they get so much more of that reinforcement learning - since it is so economical. I dont know if there is any evidence of a fundamental reason they can’t be just as good at other tasks, but it might be economically infeasible for awhile yet.
Re: Constraint Decay: The Fragility of LLM Agents in Back End Code Generation
#29“Our systematic study exposes a phenomenon of constraint decay in LLM-based coding agents. While current models excel at unconstrained generation, their performance drops when forced to navigate explicit architectural rules. For end-users, this dichotomy implies that agents are reliable for rapid prototyping but remain unreliable for production-grade backend development.” One major weakness of this study is that they…