← Better roleplay

How to stop AI roleplay from repeating itself

Updated

AI characters repeat themselves because they copy patterns already in the chat: a phrase left in two replies becomes a habit. Remove the repeated phrase from recent replies, add something new to the scene in your own message, and reroll replies that echo. On UnsavedAI, Edit and Another version handle it; API users can also raise repetition penalty slightly.

Try it now, free, no account neededStart a story with The NarratorAny story you want, you choose

Why it happens

A model writes the most likely next words given everything in view. If the last five replies all opened with *She smirks*, the most likely opening for the sixth is *She smirks*. Repetition feeds itself: each repeated phrase makes the next one more likely.

It also happens when the story stands still. If nothing new arrives, the character keeps reacting to the same moment in the same way.

Fix 1: clean the recent replies

Find the tic (a phrase, an action, a sentence shape) and edit it out of the last two or three replies where it appears. You do not have to rewrite whole replies; change just the repeated bit. Once the pattern is gone from view, the model stops reaching for it.

Then use Another version on the newest reply if it still echoes. Do not keep a reply that repeats in the hope the next will not.

Fix 2: give the story something new

Before: "I nod." (third message in a row of quiet agreement)

After: *I nod, then stop, because there is a sound from the cellar. Something heavy being dragged.* "Did you hear that?"

A new detail, a question, a change of place or an outside event breaks loops faster than any setting. If you are not sure what to add, move the scene: *Later, at the docks...*. Writing better replies has more ways to give the character fresh material.

Fix 3: check your own messages

Characters mirror their partner. If your turns all follow the same shape (one action, one line, a question), the replies will settle into a matching rhythm. Vary length and structure now and then: a single line, a longer description, a turn with no dialogue at all.

If one catchphrase keeps coming back across every story with a character, look at its card. A phrase used in both the greeting and the example dialogue will appear constantly. Use each signature line only once in the card.

Fix 4: settings, if you use the API

In SillyTavern, JanitorAI and similar apps you control the samplers. A small repetition penalty, around 1.05 to 1.1, discourages reusing recent words; much higher starts to make prose strange. A slightly higher temperature adds variety. Roleplay sampler settings covers sensible starting values. The website chat already asks characters to vary their wording, so there you only need the fixes above.

Questions people ask

Why does every reply start the same way?

The opening has become a pattern in the visible chat. Edit the first sentence of the last few replies to start differently, and the next ones will follow.

Does an OOC note help?

Sometimes: (OOC: please vary your phrasing; avoid "she smirks"). Editing the repeated text out works more reliably, because the examples in view matter more than instructions.

Is repetition worse in long chats?

It can be, because there are more examples of each habit in view. Cleaning tics early prevents most of it.

Characters for this story