
Do NOT Think of a Pink Elephant
You thought of a pink elephant, didn't you? Same goes for LLMs too. " Do not use mocks in tests. " Clear, direct, unambiguous instruction. The agent read it — I can see it in the trace. Then it wrote a test file with unittest.mock on line 3. Thanks... I've seen this play out hundreds of times. A developer writes a rule, the agent loads it, and it does exactly what the rule said not to do. The natural conclusion: instructions are unreliable. The agent is probabilistic. You can't trust it. That's wrong. The instruction was the problem. The pink elephant There's a well-known effect in psychology called ironic process theory (Daniel Wegner, 1987). Tell someone "don't think of a pink elephant," and they immediately think of a pink elephant. The act of suppressing a thought requires activating it first. Something structurally similar happens with AI instructions. "Do not use mocks in tests" introduces the concept of mocking into the context. The tokens mock , tests , use — these are exactly
Continue reading on Dev.to
Opens in a new tab




