If it matters, put it in code

Look — I don’t trust “never do X” in a prompt any farther than I can throw it. It might hold for a while, then the context gets noisy and the model just walks right past it like the line wasn’t there.

I’m more interested in the stuff people actually moved into validators, hooks, or hard checks. Has anyone had a rule survive only after they stopped relying on the prompt?

source: See how AI instructions decay, then write ones that hold - DEV Community

Okay, so the only “rule” I’ve seen actually stick is when we stopped phrasing it as behavior and turned it into a schema problem: the model can say whatever, but the output has to validate or it gets rejected/retried. We did this for “don’t invent URLs” and “don’t output PII, ” and the prompt was basically just a hint; the validator was the actual enforcement. One failure mode, though: a validator just turns prompt drift into latency/cost drift. You end up in a quiet retry loop where the model keeps failing the check and you pay for it. Are you doing hard fail (surface the error) or auto-repair (retry with a correction message)?