今日已更新 339 条资讯 | 累计 19899 条内容
关于我们

Stop Telling Your AI to "Be Careful Next Time." It Has No Memory of Yesterday.

Sho Naka 2026年06月22日 08:23 4 次阅读 来源:Dev.to

This is an adapted English version of an article I first wrote in Japanese. I work with AI to shape and review my drafts, but the argument and the field observations are my own. The numbers are cited from public surveys (linked at the end). I built an aggressive prompt-injection block to stop my AI agent from repeating the same mistakes. It worked, so I kept adding rules. By the time I noticed, the file had ballooned to 56,000 characters — and the agent had quietly stopped functioning. Too much context, attention spread too thin to act on any of it. I gutted it back to under 1,200 characters, and here's the part that still stings: it behaved better with fewer rules. That was the day I learned my whole mental model was backwards. This isn't a post about making your AI more accurate. It's about designing so that accuracy stops being the thing you depend on. The mistake I made for months My agent kept skipping the same step in a workflow. So I did what every engineer does on instinct: I added a rule. "Don't skip this step." Then it did something else dumb, so I added another rule. Then another. I was treating the rules file like a conversation with a colleague — as if the agent would remember yesterday's correction and carry it forward. It doesn't. Every run starts cold. "Be careful next time" assumes a next time that shares state with this time. For a stateless model, there is no continuity to appeal to. You are talking to a counterparty with no memory of the conversation you think you're having. So the rules pile up, because each correction feels like progress. And for a while the numbers even improve. But adding rules has a ceiling, and I blew straight through it: at 56,000 characters the agent wasn't reasoning over my guardrails anymore — it was drowning in them. Knowing a rule and stopping at it are different things Here's the distinction that took me far too long to see. Putting a rule in the context window means the model knows the rule. It does not mean the mod

本文内容来源于互联网,版权归原作者所有
查看原文