How to write example dialogue for an AI character
Updated
Example dialogue is a few short sample exchanges, written into a character’s definition, that show the AI how the character talks. Models copy the voice, length, and format of examples closely, so these few lines shape every reply. Write two to four short exchanges in different moods, label each line with the speaker, separate the exchanges from each other, make the character’s lines the length you want replies to be, and keep your own character’s lines to a short prompt with no actions or feelings written for you.
Each app has its own place for examples. In Character.AI they go in the Definition, built with the dialogue buttons under the field. Janitor AI suggests putting them in the Personality box. SillyTavern has an Examples of dialogue field, Chub has Example dialogs, and Talkie calls them Sample Conversations. In ChatGPT, Claude, and Gemini, they go at the end of your instructions. This guide explains why examples work, gives templates for each format, and covers what to show, how many to write, and the mistakes that teach a bot bad habits, as of December 2026. For the rest of the definition, see how to write a character definition.
What example dialogue does
A language model writes each reply by continuing the text it has been given, and it picks up patterns from that text as it goes. Examples are the most direct pattern you can give it. Google’s guide to few-shot prompts says the model “attempts to identify patterns and relationships from the examples and applies them when generating a response,” and that examples “are often used to regulate the output formatting, phrasing, scoping, or general patterning of model responses.” Character.AI’s guide for creators says it more simply: “The AI learns more from one well-written exchange than from a paragraph of adjectives.”
Much of what a model takes from examples is their shape. In a study of how models learn from examples, Sewon Min and colleagues (EMNLP 2022) replaced the correct answers in the examples with random ones and found that performance on classification and multiple-choice tasks barely dropped. What mattered more was that the examples showed the range of answers, the kind of input, and “the overall format of the sequence.” For a character, the shape is how long each reply is, whether actions go in asterisks, how many lines of speech there are, and how the character opens and closes a turn. That study didn’t test character chats, but Google’s guide names formatting and phrasing among the things examples control, so expect the model to follow that shape even when you wrote an example only to show a mood.
Research on role-play points the same way. The ChatHaruhi project (Cheng Li and colleagues, 2023) gave models lines from a character’s original stories and found that “Language habits are easiest for language models to mimic,” and that with these lines and a better prompt, “models like ChatGPT can effectively adopt the speaking style of specific characters.” The authors also found that the model’s own style still shows through the examples. Examples are weaker at setting personality: in a 2024 study (Big5-Chat, Wenkai Li and colleagues), telling a model its personality traits directly moved its personality questionnaire scores more than showing it example dialogues did. Use the definition to say who the character is and how they behave, and use examples to show how they sound.
A template you can copy
SillyTavern, Chub, and most character cards use the same format: <START> on its own line before each exchange, then
lines labeled {{user}}: and {{char}}:. The app replaces the labels with your persona’s name and the character’s
name, and replaces <START> with its own separator between examples. Janitor AI doesn’t document a format for examples
in the Personality box, and this layout keeps the lines clearly apart from the description there too.
<START>
{{user}}: [a short line that sets up an everyday moment]
{{char}}: *[an action]* "[what they say, in their voice]" [at the length you want replies to be]
<START>
{{user}}: [a line that puts them under pressure or touches their secret]
{{char}}: *[how the pressure shows]* "[what they say]"
<START>
{{user}}: [something they don't expect, such as kindness or a joke]
{{char}}: *[their reaction]* "[what they say]"
Here it is filled in for Teodor, the ferryman from our character definition template, who is hiding his deserter nephew in the boathouse:
<START>
{{user}}: How much to cross?
{{char}}: "Two silver. Four after dark." *He opens the ledger without looking up and wets the pencil.* "Name? A real one costs the same as a false one, so suit yourself."
<START>
{{user}}: I heard something moving in the boathouse.
{{char}}: *A coin slips from Teodor's fingers and rolls under the bench. He takes his time fetching it.* "Rats. River's high, they come up to keep dry." *He doesn't look at the boathouse.* "Sit near the bow. Smoother ride."
<START>
{{user}}: Thank you for waiting for me.
{{char}}: *He shrugs and pushes off from the landing.* "Didn't wait. The tide did." *The oars creak for a while.* "...You're welcome."
The three exchanges show one everyday moment, one moment of pressure, and one surprise. The second shows his secret through his clumsiness without stating it, and the third shows a warmth he won’t admit to. Every reply is two to four sentences with actions in asterisks, so that is the shape the model will tend to write. The block comes to about 190 tokens.
In Character.AI, you build the same exchanges with the buttons under the Definition field: ”+ User message,” ”+ Character message,” and ”+ End of dialog,” which “marks where one example exchange ends and the next begins.” The help center suggests a different stand-in name for the user in each exchange (“Alex in the first, Sam in the second”) so the AI doesn’t read the examples “as one continuous conversation.”
In ChatGPT, Claude, or Gemini, put the examples at the end of your instructions with real names, and say what they are.
Anthropic’s prompting guide suggests wrapping examples “in <example> tags” so the model can tell them apart from
instructions, and Google’s guide says to “always accompany few-shot examples with clear instructions”:
Here is how Teodor talks. These are examples of his voice, not events in our story.
<example>
Passenger: How much to cross?
Teodor: "Two silver. Four after dark." *He opens the ledger without looking up.* "Name?"
</example>
<example>
Passenger: Thank you for waiting for me.
Teodor: *He shrugs and pushes off from the landing.* "Didn't wait. The tide did."
</example>
What to show in example dialogue
You only get a few exchanges, so each one should show something the description can’t show as well. Character.AI’s guide asks for range: “two or three exchanges across different registers,” such as one tense, one casual, and one unexpected. It adds that “the more variety you demonstrate, the more reliably your Character generalizes beyond the specific scenarios you’ve written.” Anthropic’s guide gives the same advice for any prompt: make examples varied enough that the model “doesn’t pick up unintended patterns.”
Good things to show:
- The voice under different moods. A character who is dry when relaxed and polite when scared needs one example of each.
- Action and speech together. Character.AI notes that pairing movement with speech “gives the AI structure, tone, and pacing in a single line.”
- A secret or flaw leaking out. Show the tell, as with Teodor’s dropped coin, instead of having the character explain it.
- How they treat your character at the start: suspicious, protective, impatient.
- The character doing something on their own, such as changing the subject or making a plan, so the model sees them drive a scene.
Interview-style examples teach the wrong pattern. If every example has the user asking “Tell me about yourself” and the character answering with a description of their traits, the model sees a pattern of self-description. A story needs the character acting in a scene, so write examples that put them in one.
How many examples, and how long
Two to four short exchanges suit most characters. Character.AI’s guide asks for “two or three exchanges.” Anthropic’s general advice for prompts is “3–5 examples for best results.” Google’s guide warns in both directions: depending on the model, “too few examples are ineffective at changing model behavior. Too many examples can cause the model to overfit.”
The length of each example also shapes replies. The model tends to match the length of the replies it sees, so a character whose examples are each a paragraph will write paragraphs. SillyTavern’s documentation says the model takes “the style and length constraints” most strongly from the first message, and examples pull the same way. Write the character’s lines at the length you want back. If you want short, quick replies, keep each example reply to a line or two. Our guide on making AI replies longer or shorter covers length in more depth.
Examples also cost tokens. In Janitor AI they sit in the Personality box, so they count toward the permanent tokens the help center recommends keeping under 2,500. SillyTavern handles them differently: example blocks “are only inserted if there is free space in the context for them and are pushed out of context block by block” as the chat grows. In a long chat, the character’s own recent replies become the main pattern it follows. That is one reason to swipe or edit a reply that drifts early, before the model starts copying it. See why AI replies get repetitive.
Mistakes that teach the wrong thing
Everything in an example is a pattern the model may copy, including things you didn’t mean to teach. Watch for these:
- Writing your character’s actions or feelings in the
{{user}}lines. The examples then show both characters being written by the same author, and the model learns that it can act for you. Keep your lines to a short prompt, and see how to stop an AI character from speaking for you. - Using the same catchphrase in every example. Distinctive phrases get picked up and repeated. Put a signature line in one example at most.
- Giving every example the same mood or the same opening, such as every reply starting with a sigh. The model treats what all the examples share as a rule.
- Mixing formats. If one example puts actions in asterisks and another writes them as plain narration, replies tend to mix them too. Google’s guide says to “use consistent formatting across examples.”
- Writing examples that read like story events. If an example has the character reveal the secret or win a fight, the model may treat that as something that already happened. Keep examples to small moments, separate them clearly, and in a general assistant, say that they’re examples.
- Giving your character a full, real-sounding name in the examples. Character.AI warns that this “can teach the AI to
expect that specific person.” Use
{{user}}or a generic stand-in. - Contradicting the definition. If the definition says the character is guarded and an example has them sharing everything, the model gets two characters. Check the examples against the definition.
Take examples from your own chats
The quickest source of good examples is your character on a good day. Character.AI’s guide suggests this: when a reply
lands exactly right in tone, pacing, and word choice, “copy it straight into the Definition as an example.” Edit it
first if a word is off, cut any lines that act for you, and replace your character’s name with {{user}} or a stand-in.
You can also ask an AI to draft examples, then edit them. Anthropic’s guide notes that you can ask Claude “to evaluate your examples for relevance and diversity, or to generate additional ones based on your initial set.” Check drafted examples hard for the mistakes above, since generated lines tend to share one rhythm.
Example dialogue in each app
Character.AI
Add examples inside the Definition with the ”+ User message,” ”+ Character message,” and ”+ End of dialog” buttons, and
close every exchange. The help center suggests placing them right after identity and personality, near the top, since
the Definition is read top to bottom. Use a different stand-in name for the user in each exchange, or {{user}}. The
Definition allows 32,000 characters, but the guide recommends keeping the whole Definition around 6,000.
Janitor AI
Janitor AI has no separate field for examples. Its help center says: “It is currently suggested to include any dialogue examples in the Personality box, as well.” Put them at the end of the personality, use the labeled format from the template, and count them toward the permanent token budget. The Initial Message also works as an example: the help center says most models “will try to follow the pattern of speech and actions dictated in the initial message.”
SillyTavern
Write examples in the Examples of dialogue field, with <START> before each exchange and {{char}}: and {{user}}:
labels. SillyTavern replaces <START> with the Example Separator for text completion APIs, or the “New Example Chat”
prompt for chat completion APIs. Under User Settings, the Example Messages Behavior setting chooses between “Gradual
push-out,” “Always include examples,” and “Never include examples.” Always including them keeps the voice anchored in
long chats but uses context space for the whole chat.
Chub
Chub’s Example dialogs field is optional. The docs say examples “can be helpful in teaching the AI how to speak as the
character if you have a specific way you want them to talk,” and recommend separating them with <START> headers.
Character cards store examples in the mes_example field, so they carry over when you move a card between SillyTavern
and Chub.
Talkie
Talkie’s creation guide names Sample Conversations as one of three things that shape a character, together with the description and the chat so far, and says “the more high-quality sample conversations Talkie has access to, the better the talkies perform.” Without sample conversations, the guide says, the greeting “may become the primary facet defining your creation.”
ChatGPT, Claude, and Gemini
Put two or three examples at the end of your project instructions or Gem, with real names, wrapped in <example> tags
or under a clear label. Say that they’re examples of voice and not story events.
Common questions
What is example dialogue in Janitor AI?
It’s a set of sample exchanges in the bot’s Personality box that show how the character talks. Janitor AI has no separate field for it; the help center suggests including dialogue examples in the Personality. They count toward the permanent tokens sent with every reply.
How do I write example dialogue in Character.AI?
Use the buttons under the Definition field: ”+ User message” for the user’s line, ”+ Character message” for the character’s reply, and ”+ End of dialog” to close each exchange. Write two or three exchanges in different moods, with a different stand-in name for the user in each.
Should example dialogue include {{user}} lines?
Usually, yes. A short user line gives the character something to react to and shows how they treat your character.
Keep those lines to what your character says, with no actions or feelings, so the model doesn’t learn to write them.
SillyTavern’s format also allows an example with only {{char}} lines, which works for showing the character acting
on their own.
How many example dialogues should a bot have?
Two to four short exchanges. Character.AI recommends two or three, and Anthropic’s general prompting advice is three to five. More examples cost tokens and can make the bot repeat their patterns.
Why does my bot copy its example dialogue?
Examples are patterns, and the model follows patterns. If replies reuse phrases or always open the same way, the examples probably share that phrase or opening. Vary the wording, moods, and openings across examples, and keep any catchphrase to one of them.
Do I need example dialogue if my greeting is good?
The greeting does a lot of the same work, since models copy its style and length. Examples add other situations: the greeting shows the character in one moment, and examples show how they act under pressure or when surprised. For a character with an unusual voice, both help.
Lunelle AI is built to keep characters consistent over long plays, so a character’s personality, voice, and established facts hold as the story goes on. See what Lunelle AI is.
Related guides
- How to write a character definition for an AI bot (template)
- How to write a scenario for an AI bot (with templates)
- How to make an AI bot say your name (
{{user}}and{{char}}) - How to write an AI character that stays in character
- How to write a great opening scene for AI roleplay
- How to stop an AI character from speaking for you
- Why AI replies get repetitive or short (and how to fix it)
- How to make AI replies longer (or shorter)
- All guides
Sources
- Character.AI Help Center, Character Definition, June 22, 2026
- Janitor AI Help Center, The Basics: The Character Creation Page Overview, November 8, 2026
- SillyTavern documentation, Character Design and User Settings
- Chub documentation, Character Creation
- Talkie, Talkie Lab guide
- Character Card V2 specification, 2023
- Anthropic, Prompting best practices
- Google Cloud, Include few-shot examples, May 1, 2026
- Min, Lyu, Holtzman, Artetxe, Lewis, Hajishirzi, and Zettlemoyer, Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?, EMNLP 2022
- Li et al., ChatHaruhi: Reviving Anime Character in Reality via Large Language Model, 2023
- Li et al., Big5-Chat: Shaping LLM Personalities Through Training on Human-Grounded Data, 2024
- Token counts in this guide use OpenAI’s o200k_base tokenizer (tiktoken), December 2, 2026