How to Make AI Stay in Character (and Why It Drifts)
To make an AI stay in character, spell out how it talks, what it wants and how it reacts when pushed, then add a sample line in its voice. When a reply slips, replace it if your app allows and continue the scene. Recent messages, assistant habits and a pull toward agreeing can all contribute.
Key takeaways
- A character's description is only one influence on its replies. The recent chat, the model's assistant habits and a pull toward agreeing with you can all compete with it.
- Asking the bot why it broke character turns the chat into a conversation about the AI. Replace the slip where your app allows and answer inside the scene.
- "Stay in character" doesn't say what the character does. A short anchor does: how it talks, what it wants, one flaw with a trigger and a sample line.
- A character that's too nice may have nothing to push against. Give it a want of its own, a flaw that shows under pressure and a reason to say no inside the story.
- Not every break is drift. An explicit policy message comes from the platform's rules, and a change across all your characters at once can point to the app, not your description.
Contents
- Why does Character AI break character?
- What does breaking character look like?
- How do you get the AI back in character mid-chat?
- What should you write instead of "stay in character"?
- How do you make Janitor AI stay in character?
- Why is your AI character too nice?
- Is it persona drift, a model update or the platform's rules?
- How can the greeting help a character stay in character?
- Bottom line
Why does Character AI break character?
A chat character isn't a separate mind. In a typical character app, a language model reads the character's description, the greeting and as much of the recent chat as it can see, then writes a likely next reply. The description is only one of the things shaping that reply, and in a long or unusual chat the reply can stop following it.
Three possible contributors are worth knowing. None of the research below diagnoses what happened in your particular app:
- The recent chat outweighs the setup. In a 2024 study, researchers found significant "instruction drift" within eight rounds of conversation in the chat models they tested, LLaMA2-chat-70B and GPT-3.5, and linked it to attention decay in the models they studied. That's not a fixed limit for today's apps, but it shows why a description written at the start can lose influence as a chat grows.
- The model has assistant habits. Many chat models are tuned to respond as helpful assistants. Anthropic's 2026 research on "persona drift" found that the persona a model takes on shifts with the conversation itself: some topics keep it steady, while others, like emotional disclosure or questions about the AI's own nature, move it around. The study looked at drift away from the assistant, not at fictional characters sliding back into assistant speech. What it does show is that a model's persona isn't fixed and that the conversation itself can move it. It doesn't explain why your gruff captain started sounding like a polite helper.
- A pull toward agreeing with you. Research on sycophancy found that responses matching a user's stated views were more likely to be preferred by raters, and the authors suggest that preferences like these likely help drive models to tell people what they want to hear. The study didn't test fictional characters, but it's one plausible reason a stubborn character gives in the moment you push.
Your own messages count too. Janitor AI's help center says its own model, JLLM, tends to mirror your writing style and fill in whatever you leave open. A run of cheerful, short or out-of-story messages gives the bot a pattern to follow, and it may follow that instead of the description.
What does breaking character look like?
"Breaking character" covers several different problems, and they don't share one fix. Find the row that matches what you see. Use the rows as starting points, not diagnoses. Roleplayers call this going "OOC"; here's what OOC means in roleplay.
| What you see | Possible contributor | First thing to try |
|---|---|---|
| Talks like an assistant ("As an AI…", offers help) | Assistant habits | Replace the reply, answer in the scene |
| Breaks the fourth wall ("this is just a story") | Assistant habits, or a meta question | Stay in the scene; see below |
| Turns soft, agreeable, apologetic | Pull toward agreeing, or no conflict in the setup | Add a want and a flaw (see below) |
| Loses its speech style or quirks | Recent chat outweighs the setup | Add sample lines to the description |
| Gets facts about itself or you wrong | Facts or context, not necessarily drift | See why AI chatbots forget |
| Writes your lines and actions | Role boundary, not personality | See how to stop the AI talking for you |
| Says the same lines over and over | A repetition loop | See why AI keeps repeating itself |
This guide covers the first four rows. If the character still sounds like itself but gets established facts wrong, start with the memory guide rather than personality edits.
Why does Character AI break the fourth wall?
If you just asked the bot about AI, its rules or "the real you," a meta answer may simply be a reply to a meta question. If it steps out of the story on its own, treat it like any other slip below.
A jarring shift in a character's voice can invite comparison with the uncanny valley, an idea originally proposed for humanlike figures.
How do you get the AI back in character mid-chat?
Try these steps in the current chat first. Stop as soon as the character sounds like itself again.
- Replace the slip. If your app lets you edit or regenerate a reply, do it before you answer. A reply that broke character and stays in the chat can become one more example for the next reply.
- Don't ask why it broke character. That question is about the AI, not the story, and it keeps the chat outside the scene. Answer inside the scene instead.
- Give the character something to react to. Write a turn that tests a trait directly. If your detective went soft, lie to her and let her catch it. If your captain turned polite, ask for something she'd refuse. A trait needs a situation to show up in.
- Write the way you want the scene to sound. If the character is terse, keep your turns tight too. On apps whose model mirrors your style, long and chatty turns can invite long and chatty replies.
- Send one short reminder out of character. Name the behavior you want and include a sample line, as in the note below. Then go back to the scene.
- If the slips come with lost story facts, the cause may be memory, not personality. The fixes for that, like a recap in a new chat, are in why AI chatbots forget.
A sample line in the character's voice gives the model a concrete example of length, rhythm and attitude, which is easier to follow than a list of adjectives. For steering a story without stepping out of it, see our guide to how to roleplay with AI. Building your own character instead? create a character on aimy using the anchor below.
What should you write instead of "stay in character"?
By itself, "stay in character" or "never break character" doesn't say what the character actually does: how it talks, what it wants, how it reacts. Anthropic's prompting guide, writing about output style, advises telling the model what to do rather than what not to do. Its advice on keeping a model in a role adds two more points: give the personality in detail, and spell out how the character handles common situations. The same page notes, about consistent output in general, that examples work better than abstract instructions.
Turn that into a short anchor of five lines. It's not a full character sheet, just the parts that tend to slip first:
The anchor makes the behavior you want explicit. It won't guarantee every reply follows it, but it gives the model something specific to follow. Where it goes depends on what you control:
- Your own character: put the anchor early in the description, so the voice and the flaw aren't buried under backstory.
- SillyTavern: a Character's Note is inserted at a set depth in the chat, so a short anchor there stays near the recent replies instead of sliding further back.
- ChatGPT, Claude and other assistants: in a standard chat, put the anchor in the message where you set up the scene, and include it again when you start a new chat. A full setup message with a slot for the anchor is in our ChatGPT roleplay prompt.
- If you can't edit the setup: use a brief reminder of the intended voice, like the note above, when the character slips.
For the full version, with every trait written as behavior, use the AI character definition template. The anchor is a short summary of the parts that matter most for staying in character.
For a concrete test of whether changing the audience changes the voice, compare kuudere and dandere in the same interview.
How do you make Janitor AI stay in character?
You can use the same approach on Janitor AI. Its help center adds two points that apply to its own model, JLLM.
First, Janitor says its JLLM model tends to mirror your writing style and fills the gaps you leave. So your turns are part of the fix: write in the voice of the scene you want, and give the character something specific to respond to.
Second, Janitor recommends keeping Chat Memory brief: its help center compares good memory to "your best set of post-it notes, not a giant wiki." The same article suggests describing what a character is rather than how it should act. One option to try, our suggestion rather than Janitor's, is a short line of core traits next to your story notes, written as facts: "Vey: ferry captain, curt, slow to trust, speaks in short sentences."
If you can edit the character's setup, add the anchor there and keep it focused on the voice and reactions you want back. Otherwise, adjust your turns and send a brief reminder when the character slips.
Why is your AI character too nice?
An overly agreeable character is a consistency problem even when the name and speech style stay the same. The cold mercenary starts thanking you. The rival agrees with every plan. The grumpy shopkeeper turns into a cheerleader. People often call this "positivity bias." A tsundere is the classic case; see the thaw stages in our tsundere prompt templates.
Part of it may come from the model's pull toward agreeing. It's also worth checking the setup: does the character have a reason to disagree with you, like a competing goal, a priority or a flaw the scene can trigger? A personality described as "tough but caring" gives you nothing specific to point to when the toughness disappears. Our list of character flaws written as behavior gives you concrete ones to add.
Try these three changes to the description:
1. A want that clashes with yours.
Before:
Mira is a talented restorer who loves her work.
After:
Mira wants to finish the cathedral commission before anyone else's job, and she resents anything that delays it, including you.
2. A flaw with a trigger.
Before:
Mira is proud.
After:
When someone questions her methods, Mira goes cold and raises her quote.
3. A reason to say no inside the story.
Before:
Mira is helpful to clients.
After:
Mira turns down most rush jobs. She says yes only when the work itself interests her, and she makes you earn it.
Then play your side with some friction. Don't solve every problem for the character, and don't accept the first easy yes. If every scene ends in agreement, each reply has more examples of agreement to follow.
Harsh doesn't have to mean cruel. A character can be proud, impatient or distrustful and stay well within an app's rules. The friction is what makes the scene worth playing. The scene below is built on this idea: the restorer has a reason to refuse you, and the opener leaves her room to do it.
If the character's attitude still fits but its way of speaking has changed, our guide on how to write an AI character shows how to pin down a voice with sample lines and write each trait as a reaction to a situation.
Is it persona drift, a model update or the platform's rules?
Not every break comes from the character. Before you rewrite anything, check which of these you're dealing with.
- Persona drift. One character gradually loses its voice or attitude during a chat. The steps and the anchor above are for this.
- A change on the app's side. Apps sometimes change the model or settings behind their characters. If several characters on the same app changed at once, check the app's announcements or community updates before rewriting every description.
- The platform's rules. If the reply is an explicit policy or safety message, that's a different issue from drift. Apps set rules about which stories they allow, and those rules apply whatever the character description says. We don't cover ways around them. The practical options are to take the scene in a different direction, start another story or read the app's own guidelines.
One caution: a refusal inside the story isn't the same thing. If your proud restorer says no to a rush job, she may be exactly in character.
How can the greeting help a character stay in character?
On your own character, the greeting is the first example of how the character sounds. SillyTavern's character design guide says the model is more likely to pick up style and length from the first message than from anything else. So:
- Write the greeting in the character's voice, with the attitude you want to keep. A polite, generic greeting gives the model an example of polite, generic speech.
- Make the greeting and the description agree. If the description says "a woman of few words," her spoken lines in the greeting should be short too, even if the narration around them is longer.
- Put the anchor early in the description, with at least one sample line, so the greeting and the description point the same way.
Openers that start from the character's attitude rather than small talk are collected in our roleplay starters. Staying in character matters most in long-running roleplay chats, where one slip can undo a whole scene.
On aimy.chat, our own service, the chat opens with a greeting the character writes itself from its description, and creator beta testers with PRO can also write the first message by hand, and a long text fits into the character description (with PRO, up to 2,000 characters per field). You can put the anchor, the sample lines and a greeting in the character's voice right into the character. That lets you state the behavior you want up front. It doesn't guarantee every reply will follow it.
To try it, build a character with your anchor and opening message. Free: 100 messages a day and your first AI character of your own.
Bottom line
A character's description is only one influence on its replies. The recent chat, the model's assistant habits and a pull toward agreeing with you can all pull it off course.
When a reply slips, replace it where your app allows, answer inside the scene with a turn that calls for the character's traits, and send one short reminder with a sample line if you need to.
For drift that keeps coming back, swap "stay in character" for a five-line anchor: core, voice, wants, a flaw with a trigger and a limit. Give the character reasons to disagree with you and a greeting in its own voice. And before you rewrite anything, check whether you're facing drift, lost facts, a change on the app's side or the platform's rules.
Build your own character — the same steps as above
Looks, personality, voice · one-click sign-in
Free: 100 messages a day and your first AI character of your own
400,000+ sign-ups · 18+
By continuing, you agree to the Terms and Privacy Policy.
Already have an account? Sign in
FAQ
Why does my AI character suddenly talk like an assistant?
Many chat models are tuned to respond as helpful assistants, and replies can slide back toward that voice. A question about the AI itself can also invite an answer from outside the story, which is different from the character dropping its voice unprompted. Steer back with an in-character turn and, if needed, one short reminder of how the character talks.
Does writing "stay in character" in the description work?
By itself, it leaves the behavior you want unspecified. Pair it with how the character talks, what it wants and how it reacts when pushed, plus one or two sample lines in its voice. Anthropic's guidance on consistent output also favors examples over abstract instructions.
How often should I remind the bot who it is?
When you see a slip, not every turn. A reminder in every message fills the chat with notes instead of story. A clear description, a greeting in the character's voice and one short note after a slip are a more practical routine.
Why did all my characters change at the same time?
If several characters on the same app changed at once, check the app's announcements or community updates before rewriting every description. Apps sometimes change the model or settings behind their characters, and that can shift how all of them sound.
Can I make a character harsh without it turning cruel?
Yes. Give it an edge with a reason: pride, distrust, a deadline or a goal that clashes with yours. Write how that edge shows in behavior, like short answers or a refusal, and keep the story within the app's rules. A scene needs friction, not cruelty.
Sources
- Measuring and Controlling Instruction (In)Stability in Language Model Dialogs — Li et al., COLM 2024
- The assistant axis: situating and stabilizing the character of large language models — Anthropic,
- Towards Understanding Sycophancy in Language Models — Sharma et al., ICLR 2024
- Increase output consistency (Keep Claude in character) — Anthropic documentation
- Prompting best practices — Anthropic documentation
- Character Design — SillyTavern documentation
- Writing Style & Talking to the Bot — Janitor AI Help Center,
- Chat Memory & Context Management — Janitor AI Help Center,
What changed
- — First version.
- — Added links to new related articles.
- — Linked as a parallel version of the Russian article /ru/articles/pochemu-ii-vyhodit-iz-roli (hreflang); text unchanged. Added links to new related guides.
What next
What nextHow to Write an AI Character for Chat, With a Full ExampleRelated articles
Characters & stories
How to Write an AI Character for Chat, With a Full Example
Write an AI chat character with clear reactions, a distinct voice, example dialogue and a greeting. Copy a complete sample card and check it with six lines.
Guides
Why Does Character AI Forget Everything? How AI Chat Memory Works
Why does Character AI forget names and plot details? How context limits and memory tools work, plus what to try when your character loses track.
Roleplay
Why Does Character AI Talk for Me? How to Make the Bot Stop
Why bots on Character AI, Janitor AI and other apps write your lines and actions, and how to stop it: fixes for the chat, the prompt and the greeting.