DEV Community

Cover image for Clean up Docker images that are taking up space
Thomas Bnt
Thomas Bnt Subscriber

Posted on • Originally published at thomasbnt.dev

Clean up Docker images that are taking up space

The Problem

The more I use AI in my daily life, the longer my conversations get. And the longer a conversation goes on, the greater the risk that the AI will stray from my initial instructions. A change in tone, a forgotten constraint, a format that’s no longer followed… Nothing dramatic in itself, but enough to waste time rereading each response in detail to make sure it’s still consistent.

Just to be clear: this flag doesn’t mean you can skip rereading what the AI gives you and checking it yourself—especially before taking action. It’s an extra warning sign, not a substitute for your own vigilance.

The thing is, I never realize it right away. The AI doesn’t tell me, “By the way, I skipped that instruction you gave me 10 messages ago.” I notice it after the fact, usually once it’s already a little too late.

The trick I use

I saw a tip in a YouTube video (a source I haven't been able to find again, unfortunately 🙈): ask the AI to write a specific word of your choice at the very beginning of each response.

In my case, that word is RES. I added it to my preferences:

Every time you reply to me, start with “RES.”

And since then, every reply has started like this:

RES

[response]
Enter fullscreen mode Exit fullscreen mode

Why It Works

The principle is simple: it’s a constant prompt that appears in all my conversations, and I can check it at a glance. If the word is there, I know the AI still has my instructions in mind when responding. If it disappears, that’s my warning sign: something got lost along the way, so I need to reread the response more carefully—or even remind the AI of my instructions.

It’s a bit like a canary in a coal mine. 🐤 The canary doesn’t solve anything on its own; it does just one thing: signal that something unusual is happening, before it becomes a real problem.

A Comparison with Security

As I delved deeper into the subject, I realized that this concept already exists in cybersecurity, under the name canary token. It’s a unique string of characters, hidden in the system prompt of an AI application, designed to detect prompt injection attacks: if this token appears (or disappears) from the response, it indicates an attempt at manipulation.

My use of it has nothing to do with security, but the underlying principle is the same: a constant signal, the absence of which reveals an anomaly.

Canary token (security) My token (“RES”)
What it protects against An attacker manipulating the AI A natural drift of the AI itself
The word is... Hidden; the AI must never reveal it Visible and acknowledged; it is part of the response
How it is generated A random string, unique to each session A word chosen once and kept as is
Who verifies it An automated script Me, by eye

The key difference: the canary token protects against an external threat. My “RES” monitors an internal drift specific to how the model operates on a conversation that drags on.

What This Actually Changes

Well, it doesn't guarantee anything 100%, it's not magic. But in practice, it's helped me to:

  • Spot more quickly when I need to steer a conversation back on track if it strays from my initial request
  • Keep a simple visual cue, without having to reread everything in detail every time
  • Have a stable reference point, no matter the topic or length of the exchange It’s a simple, free tip that takes two seconds to set up. If you want to try it out, just add a line to your custom instructions or to the system prompt of your favorite AI.

Do you have any similar tips for staying in control of your conversations with AI? Let me know on Discord or on social media! 💬

Top comments (0)