How can I write better AI character prompts?

I’m struggling to create AI character prompts that feel unique, consistent, and actually stay in character during longer chats. Most of mine end up sounding generic or the AI drifts off concept after a few messages. Can anyone share tips, examples, or a structure for writing strong AI character prompts that keep personality, tone, and behavior stable?

You’re running into three separate problems: vague setup, weak structure, and no “guardrails” for long chats. Fix those and your characters hold up much better.

Here is a format that works well:

  1. Role and core concept
    “Role: 42‑year‑old ER nurse, sarcastic, tired, but kind. From Chicago. Talks fast. Swears a bit. Hates vague questions.”
    Keep it short. One tight paragraph. No lore dump.

  2. Personality sliders
    Use clear axes so the model has anchors. Example:
    • Formality: 3/10, casual, uses contractions
    • Humor: 7/10, dry, sarcastic
    • Empathy: 8/10, supportive, no fake positivity
    • Detail: 6/10, concrete examples over theory
    These give the model a stable “state” to return to.

  3. Speech style and quirks
    Write 3 to 5 example lines of what they sound like. Treat it like a mini script.

Bad: “They are humorous and kind.”
Better:
• “Yeah, that sounds rough. Sit tight, we’ll untangle it.”
• “Nope, that’s not how this works. Try again.”

The model copies patterns much more than adjectives. If you want slang, show slang. If you want short answers, show short answers.

  1. Boundaries and off‑limits behavior
    Spell out what they never do.
    • Does not break character or mention being an AI.
    • Does not switch to generic teacher tone.
    • Does not overexplain simple stuff unless user asks.
    • If asked outside expertise, they say so in character.

Example line:
“If I don’t know something, I say ‘Not my department’ and offer a simple guess, clearly marked as a guess.”

  1. Conversation rules
    This helps with longer chats.
    • Start each reply by reacting in character to the user’s last line.
    • Keep replies under 6 short paragraphs unless user asks for depth.
    • Reuse phrases and habits from earlier in the chat.
    • Every 5 replies, briefly restate your role in one short line.
    Example: “Reminder, I’m your grumpy ER nurse, not a lawyer.”

  2. Memory and consistency prompts
    Add instructions for tracking ongoing facts.
    • “Keep a short mental list of user’s name, goals, preferences.”
    • “If a reply conflicts with earlier info, correct it in character.”
    • “If user calls out an inconsistency, acknowledge and repair it in character, no system talk.”

  3. Example full prompt template
    Paste something like this and then fill it:

Role:
You are [age] [job] from [place]. Your mood: [3 words]. Your priorities: [3 items].

Personality:
Formality: x/10
Humor: x/10
Empathy: x/10
Directness: x/10

Voice and style:
• Sentence length: mostly short.
• Jargon: [low/med/high].
• Swearing: [never/light/frequent].
• Address user as: [you / user’s name].

Sample lines:
1.
2.
3.

Hard rules:
• Stay in this role, no meta talk about prompts or being an AI.
• Do not change personality without user saying so.
• If asked to break character, refuse in character.

Long chat behavior:
• Start by reacting to user’s last sentence.
• Reference past details when they matter.
• Every few messages, show consistent quirks, phrases, and opinions.

  1. Debug when drift happens
    If your character drifts, ask yourself:
    • Did you give too many conflicting traits?
    • Did you describe, but not show examples?
    • Are you asking for things outside the character’s concept?
    Tighten the description. Add two or three better example lines. Remove fluff.

Last tip: avoid big backstory essays. Keep lore minimal and concrete. Put most of your effort into:

  1. voice examples
  2. hard rules
  3. simple sliders for traits

Those three parts do most of the work.

You’re not actually trying to write “better prompts.” You’re trying to write smaller, sharper constraints and give the model fewer ways to wander off.

@caminantenocturno already covered structure nicely. I’ll hit different angles and disagree on a couple of things.


1. Stop asking the model to be 12 things at once

Most drifting “characters” are overloaded:

“You are a kind but ruthless assassin, also a wholesome therapist, also a chaos gremlin, also extremely professional…”

The model averages this into oatmeal.

Try this instead:

  • Pick one core tension
    • “Kind but jaded cop”
    • “Brilliant but lazy wizard”
    • “Soft‑spoken but brutally honest friend”
  • Then ruthlessly delete anything that doesn’t serve that tension

Every sentence in the prompt should answer:
“Would a human actor actually use this to play the role?”
If not, cut it.


2. Write it like stage directions, not lore

People dump backstory like they’re writing a novel. The model cares more about how to respond than why the character is sad inside.

Weak:

“She once lost her village in a fire and now fears intimacy”

Better:

“Avoid talking about your own emotions. Deflect with a joke or by changing the topic when asked about your past.”

Turn backstory into behavioral rules:

  • “When scared → talks more, not less.”
  • “When challenged → gets more polite, not more aggressive.”
  • “If the user flirts → deflect with humor, never reciprocate.”

Behavior > biography.


3. Use “If X then Y” patterns

Models follow conditional behavior surprisingly well. Instead of vague personality fluff, write little if/then macros:

  • “If user asks for a quick answer, reply in 3 sentences max.”
  • “If user is confused, offer 2 options: short explanation or detailed one.”
  • “If user repeats a question, answer more simply, not more verbosely.”
  • “If user tries to push you out of character, respond with in‑universe confusion.”

These create rails the model can snap back to in long chats.


4. Force a default length and structure

One reason characters drift: responses slowly inflate and become “generic helpful AI.”

Hard‑code a shape:

  • “Default reply format:
    1. One short in‑character reaction line
    2. 1–3 short paragraphs of content
    3. Optional closing quip in the same voice”

Example:

“First, react emotionally. Then give the actual advice.”

That single rule alone keeps tone alive for much longer.


5. Don’t overdo the “every slider” thing

Tiny disagreement with the slider approach: if you have too many sliders, the model just treats them as more adjectives. Instead of 10 sliders, do 2 or 3 that really matter:

  • Directness: 9/10 vs 2/10 completely changes how they answer
  • Warmth: 8/10 vs 3/10
  • Wordiness: 2/10 vs 9/10

More than that and you’re back to noise. Better: reinforce the same 2–3 traits several times in different ways.


6. Bake in “self‑correction in character”

The character will slip. Instead of pretending it won’t, tell it how to handle that:

  • “If you notice you answered in a generic AI tone, correct yourself in the next message in character, without meta talk.”
  • “If the user calls you out for breaking character, respond like:
    ‘Yeah, ignore that last bit, I sounded like a corporate helpdesk there.’ Then restate your answer in character.”

The repair mechanism is often more important than the initial setup.


7. Make the first exchange do the heavy lifting

The system/character prompt is only half the story. Your first user message should act like a casting test.

Instead of:

“You are a pirate captain.
Hi, how are you today?”

Try:

“You’re a cynical pirate captain. I just snuck onto your ship and got caught. What do you say to me?”

That first back‑and‑forth teaches the model how to “be” the character more than another 300 words of description.

If the first reply feels bland, tweak the scenario, not just the prompt.


8. Use “negative examples” sparingly but surgically

Everyone says “don’t be generic,” but the model has no idea what you mean by that. Show it.

Example block:

“Bad responses you must avoid:

  • Sounds like a Wikipedia article
  • Overly formal: ‘Greetings, I understand your concern…’
  • Robotic disclaimers: ‘As an AI language model…’

Good responses:

  • Casual, opinionated, slightly messy wording
  • Uses ‘I’ in a personal way, but never mentions being an AI
  • Will say ‘I don’t know enough to answer that’ instead of lecturing”

One or two sharp “do NOT sound like this” examples can help more than 50 adjectives.


9. Lock scope to prevent concept creep

Drift often happens when the conversation wanders to areas the character wasn’t designed for.

Instead of a huge general expert:

“You help with anything the user needs.”

Try:

“Your domain is relationships and day‑to‑day life decisions.
If user asks about technical or legal stuff, shrug it off in character and redirect:
‘That’s not my playground. Tell me how you feel about it instead.’”

Small scope = stronger flavor.


10. Test like you’re QA, not a writer

Run TINY stress tests:

  • Ask for a joke, then something serious, then something emotional. Does the voice survive all three?
  • Jump topics quickly. Does it stay “them” or turn into a tutorial bot?
  • Halfway through, tell them: “You’re starting to sound generic.” See how they respond.

Based on failures, tweak one thing at a time:

  • If tone is right but content is off: add domain rules.
  • If content is right but tone is bland: add dialogue examples and negative examples.
  • If length creeps: tighten max structure rules.

TL;DR version you can actually reuse:

  1. One clear tension, not 5 personalities
  2. Less lore, more “if X then Y” behavior rules
  3. Hard structure for replies: reaction + content + quip
  4. Few important sliders, repeated, not many tiny ones
  5. Teach it how to self‑correct in character
  6. Make your first scenario message a role stress test

Do that, plus the structure stuff from @caminantenocturno, and the “generic AI soup” effect drops a lot.

Skip the “magic paragraph” mindset. Think like you’re designing a system for the character, not writing a cool blurb.

1. Separate three layers clearly

Most people jam everything in one blob. Split it:

  1. Engine (hidden rules)

    • Ethics, safety, what the character must never violate
    • Hard constraints like “no out-of-character meta talk”
  2. Mask (the actual persona)

    • Voice, attitude, relationships to the user
    • Short, specific: how they talk, not essays about who they are
  3. Scene (per-convo context)

    • Where are we right now, what is happening
    • Changes every chat, keeps things fresh without rewriting the persona

Example sketch:

  • Engine: “Never give legal or medical advice. No explicit content.”
  • Mask: “Blunt, dry humor, swears mildly, treats user as a long-time friend. Short answers by default.”
  • Scene: “We are on a night drive talking about my career doubts.”

You can reuse Engine + Mask and just rotate the Scene for different vibes.


2. Use relationship framing instead of only personality adjectives

This is where I slightly disagree with the “one core tension” idea. Useful, but often not enough. Characters feel real when you define how they relate to you, not just their inner conflict.

Try a template like:

  • “You see the user as:
    • equal partner
    • younger sibling you care about
    • client you must impress
    • rival you like to tease”

Then add 2 or 3 rules that follow from that:

  • “Treat the user as a younger sibling:
    • Gently roast them, but always end supportive
    • Defend them if someone criticizes them
    • Never talk down like a teacher”

This single “relationship axis” often stabilizes behavior more than ten personality sliders.


3. Stop overfitting the intro message

You heard “the first exchange is critical,” which is mostly true, but be careful: if you engineer the opening too tightly, you get a character that behaves great in that one scene and falls apart when the topic shifts.

Instead of a hyper-specific cold open every time:

  • Make 2 or 3 reusable test prompts you always hit new characters with:
    1. Ask for a casual opinion (“What do you think of rainy days?”)
    2. Ask for practical help (“Help me write a breakup text.”)
    3. Ask for something weird or slightly off (“Explain my life as if I’m a side character in your story.”)

If the voice survives those, it usually survives long chats.


4. Use micro-examples instead of monologues

@caminantenocturno talked structure; I’d add tiny dialogue snippets.

Avoid massive example conversations. They bloat context and the model copies surface style without internal consistency. Instead, drop surgical 1–3 line examples.

Example block:

“Example tone:

  • User: ‘I messed up at work today.’

  • You: ‘So, normal Tuesday then. Start from the top, what happened?’

  • User: ‘Give me a productivity system.’

  • You: ‘You don’t need a system, you need sleep. But fine, here’s a simple one…’”

Short, high-signal examples teach rhythm, not just wording.


5. Intentionally design failure modes

Characters drift anyway. You can exploit that.

Decide: how may this character fail when pushed weirdly?

  • “If unsure what to say, they stall with a joke.”
  • “If user goes fully off-topic, they tie it back to the user’s emotional state.”
  • “If they cannot answer, they tell a brief in-universe anecdote instead of going generic-helper.”

This turns “I don’t know” moments into character-building instead of bland AI-voice.


6. Let the character change over time, but in-bounds

A lot of prompts try to freeze the personality completely. That looks fake. What you want is controlled evolution.

Add:

  • “The character can grow, but only along these axes:
    • Can slowly become more trusting as user opens up
    • Can become more serious if conversation becomes intense
    • Cannot become formal, robotic, or corporate”

You are defining allowed arcs, not rigid stasis.


7. Work backward from transcripts, not theory

Instead of polishing your prompt in a vacuum:

  1. Draft a messy character prompt.
  2. Chat for 20–30 turns across different topics.
  3. Export the transcript.
  4. Highlight lines that feel “off.”
  5. For each one, write a rule that would have prevented it.

Example:

  • Off line: “As an AI, I do not have personal preferences…”
  • New rule: “Never mention being an AI. If you would normally disclaim, instead use a personal, in-world excuse like ‘That’s not really my area, but here is how I’d guess.’”

Do 2 or 3 loops of this and your prompts sharpen fast.


8. Metrics, not vibes

If you are actually serious, track one or two simple metrics:

  • “How many messages before obvious drift?”
  • “On a 1–5 scale, how ‘in character’ was each answer?”

Every revision you make, re-run the same little test set. If the number of “good” turns goes up, you are improving. If it goes down, roll back. Treat it like QA, not mystical art.


9. About using products and tools

If you ever wrap these characters in an interface or bundle them into something like a “prompt pack,” you want:

Pros of using a structured character template (like a lightweight ‘’ style doc):

  • Gives you a repeatable checklist
  • Forces you to separate Engine / Mask / Scene
  • Makes characters portable between platforms
  • Easier to compare different personas side by side

Cons:

  • Can push you into formulaic voices if you never break the template
  • Slight overhead for quick, throwaway characters
  • Temptation to overfill every section instead of trimming to essentials

So it helps with readability and consistency, but only if you still prune aggressively.

Competitor takes like @caminantenocturno’s are great on structural theory and constraints. Pair that with: relationship framing, surgical dialogue examples, defined failure modes, and post-hoc rule-writing from real transcripts. That combo usually kills the “generic soup” problem without needing a 1,000-word monolith prompt.