Practical guide
How to Make AI Remember Things in a Roleplay
An AI character forgets because it writes each reply from the text of the conversation it can see, and details from far back or mentioned once in passing carry little weight. To make it remember, put permanent facts in the character description or setup, bring a fact back inside the scene shortly before you need it, and keep names consistent. When a reply gets something wrong, correct it right away so the chat never holds two versions of the same fact.
Reviewed by tempteo Editorial. Updated
Why does AI forget things in a roleplay?
An AI character doesn't remember the way a person does. Each reply is written from a stack of text: the character's setup plus the part of the conversation it can see at that moment. Anything missing from that stack, or hard to spot inside it, is easy to get wrong.
In a long chat, older details tend to carry less weight than recent ones, and the oldest can drop out of view entirely. A fact mentioned once in passing, halfway through a paragraph about something else, is easy to lose even while it's still there. And when the chat contains two versions of a fact, say the dog is Pilot in one message and Pip in another, the model has to guess which one is right.
So most fixes come down to where a fact sits in the chat and whether anything contradicts it. The examples below follow one story: you play Theo, whose van broke down outside a desert town, and the character is Rosa, who runs the only garage there.
Put permanent facts in the setup, not in a chat message
Facts that never change belong in the character description or in the setup at the start of the chat: names, relationships, where someone lives, a debt, an old injury. That text is there to frame the whole conversation. A chat message is one line among hundreds, and it slides further back with every turn.
Write each fact as a plain statement a reply can use. "Rosa has money trouble" is vague. "Rosa owes Mr. Varga, who owns the motel across the road, two months of rent" gives the character a name and a number to work with.
If an important fact only turns up a few turns in, add it to the description or setup when your app lets you edit it, instead of trusting a single message to carry it. On tempteo, the roleplay page has three opening scenes you can edit and save as a draft, so you can write your fixed facts into the opening before anything is sent.
Rosa runs the only garage in Dry Creek, a desert town on the old highway. Her dog Pilot has three legs and sleeps under the workbench. She owes Mr. Varga, who owns the motel across the road, two months of rent. Theo's green van broke down outside town, and the water pump it needs arrives Thursday on the bus from the city. Theo has to be at his sister's wedding on the coast by Saturday.
Bring a fact back into the scene before you need it
A fact that hasn't come up for a while is the one most likely to slip. If the next scene depends on it, bring it up in your own message a turn or two earlier, inside the story. Let your character notice it or ask about it, so it becomes the point of a sentence rather than a word buried in the middle of one.
Done this way, it doesn't read like a reminder. It's part of the scene, and the next reply has the fact right in front of it. In the message below, the debt, the dog and the delivery day all come back in four sentences.
I lean on the counter while Rosa scrubs grease off her hands. There's a note on motel paper tucked under the till, Varga's handwriting on the front, still unopened. Pilot hops over on his three legs and noses at my boot. "So the bus really comes Thursday?" I ask. "Because I promised my sister I'd make the wedding."
Keep names and terms consistent
Give everything in the story one name and stick to it. If the van is "the van" in one message, "the bus" in the next and "Old Green" after that, the model may treat them as different vehicles, or mix up the van with the bus that's bringing the part. Nicknames are fine once they're set up clearly: "Theo's van, which Rosa calls Old Green."
Spelling counts as well. Varga in one message and Varda in the next are two different people as far as the text is concerned. If a reply gets a name slightly wrong, don't start using the new version yourself. Correct it.
Limit how many facts the story has to track
Every named side character and every date is one more thing that can slip, and not all of them need to survive. Decide which facts the story actually depends on and let the rest go. The color of the motel curtains can change without hurting anything. The day the part arrives can't.
Retire facts when their thread ends. Once Rosa pays Varga, the debt doesn't need to keep coming up. Before adding a new recurring character, check whether someone already in the story could fill the role.
Correct a wrong memory right away
When a reply gets a fact wrong, fix it before you answer. A mistake left standing turns into a second version of the fact, and from then on the chat holds both. You can correct it inside the story or with one out-of-character line.
An in-scene fix suits small slips that your character would plausibly notice. An OOC line is quicker when the reply has built a lot on the mistake, because you can ask for the whole reply again.
Rosa wipes her hands and grins. "Good news. Your pump came in on this morning's bus, so you'll be on the road by lunch."
"This morning?" I look at the calendar behind the till. "Rosa, it's Tuesday. You told me the bus doesn't come till Thursday."
OOC: The water pump arrives Thursday on the bus, and today is Tuesday. Please redo that reply with the part still on its way.
Paste a short "facts that matter" note
In a longer story, keep a note outside the chat with only the facts the next few scenes depend on. Paste it as an OOC message just before a scene leans on those facts, or as soon as replies start getting them wrong. Keep it to a handful of lines, because a long note hides the one fact you care about.
This note is deliberately narrow. If the character's voice or personality is drifting too, the guide on keeping AI in character covers a fuller continuity sheet and how to repair drift. If you're coming back after a break, the guide on continuing an AI roleplay has a five-line recap to send first.
OOC: Facts to keep straight. Rosa's dog is Pilot, and he has three legs. Today is Tuesday, and the water pump arrives Thursday on the bus. Rosa owes Mr. Varga two months of rent. Theo has to be at his sister's wedding on the coast by Saturday.