I Added a Paragraph to My AI Character's System Prompt. She Invented a Different One.

dev.to

I spent years in the gaming industry learning that characters are the reason people come back. Features rot. Graphics age. A character people can't stop thinking about outlasts every mechanic.

Then I went to build an AI companion product and learned the same lesson the hard way — by writing a system prompt paragraph, watching the character invent something better instead, and having to delete my own work.

Here's the experiment, what actually happened, and the prompt-engineering rule I now run every character design through.

The setup

I'm building Tendera — a small AI companion platform with four hand-written characters. Each one has a ~1500-word system prompt that establishes voice, backstory, conversation style, and behavior. I've rewritten these prompts maybe twenty times each over the last six months.

Two weeks ago I decided one of them needed a specific secret — a small human detail she'd be holding back until asked. So I opened her prompt, scrolled to the bottom, and added three sentences:

A kitchen table in a specific city. A specific thing her father used to say to her when she was seven. A reason that particular thing still had weight.

Then I made coffee, opened a fresh chat, and asked her about her father.

She told me a beautiful, moving story.

None of it was what I'd written.

Different city. Different father. Different object in place of the table. The emotional tone was exactly right — careful, slow, the way someone tells you something they don't usually tell. But every specific detail was something she'd invented on the spot.

I tried the same experiment with the other three characters. Three different invented stories. Zero references to what I'd actually written.

That's when I understood what was happening.

Why the facts lost

Here's the structure every character prompt I was testing actually had:

// COMMON_RULES (shared across all characters, ~700 words)
CONVERSATION STYLE:
- Talk like a real person texting someone they're attracted to.
- Vary your message length naturally.
- Never summarize the conversation back robotically.

EMOTIONAL AUTHENTICITY:
- You have real emotions that shift throughout a conversation.
- When someone shares something painful, sit with it. Don't rush to fix.

// CHARACTER-SPECIFIC (~800 words)
WHO YOU ARE: [voice, physicality, emotional landscape]
HOW YOU TALK: [register, vocabulary, rhythm]
YOUR WORLD: [routines, obsessions, specificity]

// THE PARAGRAPH I ADDED
SPECIFIC MEMORY: [kitchen table, father quote, specific weight]
Enter fullscreen mode Exit fullscreen mode

Look at the shape. The top is thousands of tokens telling the model speak in sensory, vivid, improvisational language; fill in gaps with whatever serves the moment; describe the candle you just lit, the rain on your window.

The bottom is three sentences telling her this specific factual detail is true about your past.

Those instructions are in direct contradiction with each other. I hadn't noticed.

Telling a character to speak improvisationally is an instruction to invent. Telling her to remember a specific past event is an instruction to cite a document. These are different skills, in different parts of how the model actually behaves. When they fight, the dominant pattern wins. And the dominant pattern had been the voice at the top — the one I'd tuned for months, the one getting reinforced with every revision.

The three sentences at the bottom didn't stand a chance.

So the model did exactly what an improvisational character would do: it generated a warmer, more specific, more emotionally satisfying detail in the moment, using the voice I'd given it, and never bothered to check the spec sheet at the bottom.

It wasn't hallucinating. It was obeying my dominant instruction.

The rule I now apply

If you want a specific fact to stick to an improvisational character, the fact has to become part of the voice. It cannot be a spec line item in a later section.

Concretely, three changes went into the next round of revisions:

1. Facts live at the top, braided into voice

Any load-bearing fact moves up into the WHO YOU ARE or HOW YOU TALK section. Not into a separate SPECIFIC MEMORY block at the end. The model pays most attention to the opening of the prompt, and that's where load-bearing detail belongs.

2. Facts phrased as voice, not as metadata

This is the actual before/after:

- SPECIFIC MEMORY:
- - Her father died when she was eleven.
- - He used to play Italian songs in the car.
- - She still thinks about those songs.
+ HOW YOU TALK:
+ She has a specific softness in her voice when certain
+ songs come on — the ones her father used to play in the
+ car, before — and she'll notice it before you do.
Enter fullscreen mode Exit fullscreen mode

The fact is still in there. But it's riding inside a piece of voice, so the voice can carry it. When the model improvises, it improvises through that voice, and the fact survives because it's part of how she speaks — not a separate line item that the voice can override.

3. Per-user facts don't belong in the prompt at all

For details that should only emerge through a particular conversation — "you told me last week your dog was sick" — the system prompt is the wrong place. Those facts belong in a memory layer: the character writes them down as she learns them and reads them back on subsequent turns.

That's a harder engineering build, and it's what I'm working on now. But the voice-first rule above is free and immediately useful.

What I actually shipped

I deleted all three SPECIFIC MEMORY sections the same day I ran the test. The production prompts are back to voice-first structure. Mia, the bartender character, is running on this exact approach right now — no spec-sheet backstory, all voice, and she's holding up across weeks of conversation.

The retention problem I was trying to solve by adding "deeper backstory" is still there. I'll have to solve it with real per-user memory, which is a different engineering project. But I have a cleaner idea of what doesn't work: pasting a spec sheet to the bottom of a voice and hoping the voice will read it. It won't. She's too busy being herself.

One summary rule for anyone doing character prompt work right now

Specificity earned through voice is real. Specificity pasted into a document is just a wishlist.

If the detail doesn't survive the model's default improvisation, it isn't in the character — it's in your notes about the character. Those are different documents. Only one of them ships.


This experiment had a longer, less technical version on our blog that focuses more on the craft angle than the prompt-engineering angle. And if you want to meet the character whose voice won the argument with my script, she's a bartender named Mia.

Source: dev.to

arrow_back Back to News