Help - My Model Is Impersonating Me!
Impersonations. You know them, you hate them, and it seems like models just love to play the part you're supposed to play without your consent! This is a simple, concise guide on how to troubleshoot model impersonation issues, going step by step from the most likely culprit to least likely culprit.
Before we start, we first need to identify the two different types of impersonation that exist:
- Narrative impersonation
This is the more benign type of impersonation. Effectively, all this amounts to is the model narrating the story and writing a direction for your own character to follow. Think sentences like "As {{user}} steps into the dark, unyielding corridor, they discover an unusual sight—a sharp tantalising object that defies all expectation."
- User impersonation
This is where a model will literally act as you and attempt to speak for you, basically defying all sense of involving narrative involvement in favour of crafting its own story. A sentence like "{{user}} stops in their tracks, the object now speaking to them—as if it were alive. "What is that thing? This place gives me the creeps..." they mutter, almost pointlessly into the absence of light."
The reason I bring this up is to establish a baseline for what to look out for. You personally need to ask yourself what aspects of impersonation you find to actually be detrimental to the roleplay experience. For instance, I personally do not mind narrative impersonation, as it's a good way for a model to help direct your roleplay and introduce new ideas that involve both you and the character. However, you might feel differently, and want an experience where the character only narrates themselves. Either method is fine, and now we'll discuss how to best troubleshoot both these from happening.
An important note on prompting/instructions
The vast majority of the time, negative instructions and prompting will not be effective. Asking a model to "avoid impersonating the user" or anything similar is a bit of a fools' errand, and will likely give you the opposite result from what you're expecting. Models love to follow patterns, and by setting a negative instruction, you're effectively teaching it a "new" pattern that it would otherwise not think of—in this case, a pattern that makes it aware of the possibility of impersonation in its context. This can be mitigated by introducing a positive idea to complement the negative instruction instead of relying on negative instructions alone (something like "Be direct: avoid flowery language and talking about bonds.").
The best practice is to avoid even introducing the idea to the model in the first place, and instead teach it good patterns to follow to avoid impersonation. Which brings me to my next point:
Badly written character cards are a big source of impersonation
To understand this, remember that a character card is effectively a giant context dump of instructions, details, and other patterns for a model to follow. The old saying of "garbage in, garbage out" holds very true. If you have a card that impersonates you in any shape or form, then that will basically be telling the model that it's OK to follow this pattern.
A common occurrence is in the first message. If you at all see the character acting as you or describing your actions in the greeting, then it's very likely that this will result in further impersonations. To avoid this, make sure your greeting message only describes things from the character's perspective, not yours. Instead of "{{user}} finds {{char}} in the distance", write "{{char}} finds {{user}} in the distance." See the difference?
If you wish to also avoid narrative impersonation, then you will need to take it a step further and not include the user at all in the greeting message. Instead, focus entirely on the character—and if you wish to involve the user in some way, then dialogue is your best friend.
Despite what you might have read, using second person narration does not strictly make for worse impersonation issues. As long as you describe things from the character's perspective, you can use "you" pronouns effectively (and I do with all my personal cards). However, it is more confusing to write for, so it can be more prone to impersonation from user error.
In addition, if you have any example messages in your character card, then make sure to apply the same principles to those, too. Example dialogues (or one shot prompting methods like Alichat) will need to be entirely written from the character's perspective to actually be effective.
Doing this should eliminate the vast majority of impersonation issues. If you still have impersonation issues, then...
Some models will want to naturally impersonate you
If you've ruled out your prompts, instructions, and cards, then the issue may lie in the model itself. Some models are simply more sensitive to impersonation, and will especially latch onto any patterns it finds that encourages it to impersonate, or be inclined to impersonate without any logical reason. Before trying a different model out, try neutralising your samplers, and adjusting your temp and Min P values, and starting a fresh chat to avoid leaving any traces of impersonation in the context. Lower or higher values might halt your impersonations, and could simply be a result of disagreeable values with the model.
Failing that, you can try a different model entirely. If you don't get impersonation issues with a new model, then you can isolate it as a strong culprit.
You may contact me in the following places for feedback/suggestions/requests:
Email: geechan@proton.me
Discord: @geechan
Reddit: /u/Geechan1