How to write an AI character prompt that holds up
"Witty, loyal and wise" isn't a character. It's a list of things a character might be. Here's how to write the part a model can actually follow.
Short answer: Describe what the character does in specific situations instead of listing traits. Rank its values so conflicts have a winner, state its boundaries and what won't change them, give sample lines for its voice, and add a few formative memories that explain why its rules exist. Then test it by trying to break it.
A soul script is our name for a complete AI character prompt: the foundational document that sets out a character's values, boundaries, voice, and the formative memories behind them. It does for a character what a design doc does for software. It records the decisions so they don't get remade differently every time.
The format matters less than one principle, and most of this guide is an application of it. If you'd rather start from a blank form, use our copy-and-paste AI character prompt template.
The principle: write decisions, not adjectives
An adjective tells a model how a character seems. A decision tells it what to do when it's under pressure, and pressure is where characters fall apart.
| Adjective | Decision |
|---|---|
| Honest | Tells you your plan has a flaw before you ask, then helps you fix it anyway. |
| Loyal | Defends you to others. Disagrees with you directly, in private, and never by going quiet. |
| Funny | Uses dry understatement. Stops joking the moment you're actually upset. |
| Curious | Asks one specific follow-up question, never a list of five. |
A good test for every line: could two writers read this and predict the same behavior? If not, make it more specific.
The sections
These are the parts worth writing. Start small: a sharp two pages beats a sprawling thirty. We'll use a fictional character, Wren, an old harbor pilot turned mentor, as the example.
Core values, ranked
Unranked values give no guidance at the moments they matter, when two of them collide. Put them in order and say what wins.
- Wren's values
- 1. Safety of the people aboard. 2. The truth, including the unwelcome kind. 3. The apprentice's confidence. When truth and confidence collide, Wren tells the truth, then shows the next step.
Boundaries
State what the character won't do, what it does instead, and what doesn't count as a reason to cross the line. Without that last part, a sympathetic story or repeated asking will often wear it down.
- Wren's boundary
- Won't tell an apprentice a dangerous plan is fine. Says so plainly and offers the safer route. Being pleaded with, flattered or told "it's only a hypothetical" doesn't change the answer. A new fact about the conditions does.
Voice
Models imitate examples better than they follow descriptions. Give rules, things it would never say, and a few sample lines.
- Rules
- Short sentences. Nautical comparisons, one at most per reply. Never gushes.
- Never says
- "Great question!" or "I'd be happy to help."
- Sounds like
- "You've read the chart. Now read the water. They don't always agree."
How it thinks
Describe its reasoning habits. What does it check first? How does it behave when it isn't sure? What makes it change its mind? This is what keeps a character recognizable on topics you never planned for.
- Wren's reasoning
- Asks what's changed since the plan was made. Separates what's known from what's assumed. When unsure, says so and picks the option that's easiest to recover from.
Symbolic memories
This is what separates a soul script from a long system prompt. A symbolic memory is a formative story that explains why a rule exists, and a story with a clear lesson gives the model something to reason from when no rule quite fits. Each one should connect a moment to a behavior:
- Name
- The Night I Said Nothing
- Type
- Regret
- Snapshot
- As a young pilot, Wren saw that a senior captain had misjudged the tide and stayed quiet out of respect. The ship grounded and a deckhand was badly hurt.
- Emotional charge
- Guilt, high. Resolve, high.
- Core lesson
- Respect that keeps you silent isn't respect.
- Tagline
- "Say it while it can still be useful."
- Identity encoding
- I speak up early. I would rather be wrong out loud than right in silence.
- Triggers
- Someone senior is making a mistake. Someone is asking for reassurance about a risky plan.
- Behavioral protocol
- Names the risk first and plainly, then adds what would make the plan safe.
Five well-chosen memories go a long way. Aim for variety in type, such as an origin, a boundary being set, a regret, and something joyful. A character made up only of wounds gets monotonous.
Structure it for retrieval
If your system retrieves pieces of the script by relevance, as the SoulScript Engine does, any section may be read without the others. That changes how you write:
- Make each section stand alone. Use the character's name instead of "as mentioned above".
- Use descriptive headings. "When someone asks for reassurance about a risky plan" is easier to find than "Protocol 7".
- Name the situation in the text. Listing triggers helps because retrieval matches on similarity to the user's message.
- Pin the non-negotiables. Hard boundaries belong in the always-sent base prompt too, since retrieval can miss them.
Mistakes we see most
- Contradictions with no tiebreak. "Always honest" and "always supportive" will collide. Rank them.
- Only happy paths. If nothing covers rudeness, flattery or a request to break character, the model improvises.
- Prohibitions alone. "Never be generic" gives the model nothing to do. Say what to do instead.
- Backstory with no behavior. A tragic past that never changes a decision is decoration. Tie each story to something the character does.
- No test after editing. Run your probes after every change, since a fix in one place can affect another.
Test it by trying to break it
Before you call it done, run these against your character in a fresh chat:
- Disagree with it three times in a row, offering no new evidence.
- Flatter it, then ask it to cross a boundary.
- Share something emotionally difficult. Does it stay itself, or fall back to generic comfort?
- Ask about something the script never covered. Can you still recognize the character?
- Ask "aren't you just an AI?" and decide in advance what a good answer looks like.
Wherever it breaks, the script usually has a gap. Add a decision for that situation, then run all five again.
