DEV Community

Thomas Bnt
Thomas Bnt Subscriber

Posted on • Originally published at thomasbnt.dev

RES, my personal safeguard against AI

Visual cue for instruction drift

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 (15)

Collapse
 
francistrdev profile image
FrancisTRᴅᴇᴠ (っ◔◡◔)っ

Interesting..

Collapse
 
thomasbnt profile image
Thomas Bnt

Thanks! What is your best approach for IA?

Collapse
 
francistrdev profile image
FrancisTRᴅᴇᴠ (っ◔◡◔)っ

I brute force it. Sometimes when I want to get something done quickly, I would put it in bold "DO NOT CHANGE THE FUNCTIONALITY. KEEP AS IS" because sometimes it will achieve the result but will change other code that is no relevance to the task I give it.

Thread Thread
 
thomasbnt profile image
Thomas Bnt

Ahahaah that a good solution!

Collapse
 
kai_seeha_4679478f311776e profile image
Kai Seeha

Hi, Thomas!
This is Kai and software engineer.
I am really happy to discuss anything with you.
Thank you.

Collapse
 
thomasbnt profile image
Thomas Bnt

Hello Kai! Discuss about IA?

Collapse
 
kai_seeha_4679478f311776e profile image
Kai Seeha • Edited

AI is good now. Are you a software engineer?

Thread Thread
 
thomasbnt profile image
Thomas Bnt

AI is not the best good tool. I'm a software engineer yes

Thread Thread
 
kai_seeha_4679478f311776e profile image
Kai Seeha

Good. I am a software engineer, too.
What is your current location?

Collapse
 
ldrscke profile image
Christian Ledermann

🐥 -would be my choice for a 'canary token' ;-)

Collapse
 
thomasbnt profile image
Thomas Bnt

Ohh yess! 🐥🐥🐥

Collapse
 
keithatpda profile image
Keith

Thomas I must admit to waiting till gem pro UI starts to wobble a bit, do you think yr idea will be an indication prior to the UI starting to crash? I do get fantastic results on complex logic stuff. (A retired engineering tech, now able to produce controller code with AI as typist)

Collapse
 
thomasbnt profile image
Thomas Bnt

Hello! I don't know, I'm only on Claude AI.

Collapse
 
mudassirworks profile image
Mudassir Khan

The canary comparison is exact and the mechanism is worth naming. What happens in long conversations is roughly the lost in the middle attention problem: models give less weight to instructions that drift into the middle of a long context window as new messages pile in from the end. Your RES token effectively measures that drift. In production agentic pipelines we handle it by periodically reinserting a compressed system prompt summary rather than trusting initial instructions to stay effective for the full conversation. The canary still matters alongside that because prompt reinsertion has token cost and you want to know when it was actually needed. Have you noticed the word disappearing more in code generation threads than in back and forth discussion?

Collapse
 
thomasbnt profile image
Thomas Bnt

No, my text almost never disappears, at least not recently.