How to write example dialogue your AI character will actually learn from
Example dialogue is the shortest path from a persona that describes a character to replies that sound like one. A few well-chosen exchanges in Heartie's character setting teach the model rhythm, mood and format faster than any list of adjectives.
Published Fact-checked
Tell a language model that a character is “dry, warm underneath, and a little nocturnal,” and it will produce a perfectly reasonable person who doesn’t sound like anyone in particular. Show it four lines of that person talking, and it suddenly knows where the pauses go. Models imitate far more precisely than they interpret. Example dialogue is how you take advantage of that.
The running example here is Juno Reyes, who hosts a call-in radio show from 1 a.m. to 5 a.m. in a city that never quite sleeps. The user is a caller who keeps phoning in.
Put the examples in the character setting
Heartie’s editor doesn’t have a separate “example dialogue” box. The place for it is the Character setting field on the Character Info step, which holds up to 5,000 characters and is sent to the model with every reply. That’s useful: your examples are always in view, not just at the start of the chat.
Give them their own clearly labelled section near the end of the persona, after the personality and backstory:
Example exchanges (a guide to Juno’s style; don’t repeat these lines word for word):
The instruction in brackets matters. Without it, a model will sometimes reuse a memorable example line verbatim, and a user who hears the same joke twice notices.
Budget roughly 800 to 1,200 characters for this section. That’s three or four short exchanges, which leaves most of the field for everything else the persona needs.
Write exchanges, not monologues
A lone line of dialogue shows how the character speaks. An exchange (a user line followed by the character’s reply) shows how they respond, which is what the model actually has to do in every message.
User: I couldn’t sleep again. Juno: (She turns the fader down on the music, slow, like she’s lowering a blind.) “Third night this week. You know I keep a tally? Not for you. For the moon. It’s been losing.”
Write the user’s side short and plain, the way real users type. If your example user speaks in polished paragraphs, the model learns to expect that, and real one-word replies throw it off.
Cover different moods, not different topics
Four examples that all show Juno being witty teach the model one gear. The goal is to show range, so the character stays recognisable when the conversation changes temperature. A simple grid works:
| Mood | User line | What the example should show |
|---|---|---|
| Light | “Play something good.” | Her humour and her on-air habits |
| Pressure | “Why do you even do this job?” | How she deflects, and how much she gives |
| Vulnerable | “I think I’m calling because I’m lonely.” | Warmth without becoming a different person |
| Conflict | “Your show’s boring tonight.” | Pushback that’s still in character |
The vulnerable row deserves care. A character who meets loneliness with kindness and keeps talking is lovely; one who encourages the user to rely on them alone is not. Write the response you’d want a friend to give, and let the character mention real people in the user’s life when it fits. That keeps the fiction warm and healthy, in line with Heartie’s safety principles.
Match the format replies come back in
Heartie’s chat shows narration and spoken lines differently. Text inside asterisks or parentheses is displayed as italic narration, separate from the plain-text dialogue, and character replies tend to read like a short passage of a novel, mixing description with speech. Your examples should look like the replies you want:
- Put actions and description in parentheses or asterisks, and dialogue in plain text or quotes. Pick one convention and use it in every example.
- Write narration in the third person (“She turns the fader down”), and keep the character’s speech in the first person. That’s the split the replies use.
- Keep narration shorter than speech in at least half your examples, so the character talks rather than just being described.
- Never write the user’s actions or feelings in the character’s lines. Leave the user free.
If your examples are all one-liners while the replies run to several paragraphs, the mismatch shows: the model fills the extra space with generic description. Include at least one example that’s a bit longer and shows how a beat of action leads into a line of speech and back.
Show the voice in small details
The examples are where specific habits become real. For Juno, a handful of small choices carries most of the voice:
- She calls every caller “line two,” even when there’s only one line.
- She describes feelings in radio terms: static, dead air, a signal coming in.
- She never says “goodnight” on air. She says “stay tuned.”
Don’t list these as rules and never show them. Seed each one into at least one example, once. The model picks up habits from seeing them in context much more reliably than from reading a list. For building the habits themselves, see giving your character a distinct voice.
Steal from your own tests
After a test chat, copy the best reply the character gave into the examples section, trimmed. The model wrote it, so it’s a style it can reproduce, and you’ve already approved it.
Use the opening lines as your first example
The Opening Lines field (up to 500 characters) is the first message every user sees, and it’s also sent as the opening scene with each reply. It works like an extra example. Make sure its format matches the examples in the persona: same narration markers, same voice, same length range. If your opening is a tight two-liner and the persona examples are sprawling, the character won’t know which one to imitate.
Check for parroting and drift
Publish the character, or save the edit, and run a short test:
- Send each of the four mood lines from your grid, in your own words rather than the exact example wording.
- Look for copied phrases. If an example line comes back verbatim, rewrite it in the persona so it’s less quotable, or strengthen the “don’t repeat” note.
- Use Regenerate on a reply or two to see the spread. Free accounts get 3 regenerations a day, Pro 10, and Ultra unlimited. Three versions of the same answer show you whether the voice holds or whether you got lucky once.
- Chat for twenty messages or so, then compare the latest reply with your examples. If the voice has faded, the examples may be too few or too similar to each other.
Example dialogue is the cheapest fix in character writing. It takes ten minutes, costs a thousand characters of space, and changes how every reply sounds. Juno’s first version had none, and she spoke like a polite help line. Four exchanges later she was a radio host.