Lunelle ← Back to home
Guides

How to write a character definition for an AI bot (template)

Updated

A character definition is the text an app sends to the AI with every reply to tell it who the character is. Write it in plain sentences with the most important lines first: who the character is, the situation they’re in, and how they behave, then their goals, their voice, and two or three sample exchanges. Keep it under about 1,500 tokens (roughly 1,100 words) so it leaves room for the story. Put it in the field the AI reads, because some apps have public description fields that the AI never sees.

Apps give the definition different names. Character.AI calls it the Definition, Janitor AI splits it into Personality and Scenario, SillyTavern and Chub call the main field Description, and Talkie has a Description plus Sample Conversations. In ChatGPT, Claude, and Gemini, the same text goes into a project’s instructions or a Gem. This guide gives you a template to fill in, explains which fields each app sends to the AI, compares the formats bot makers use, and covers the mistakes that make a bot drift, as of December 2026. For the craft of writing behavior and voice in more depth, see how to write an AI character that stays in character.

A character definition template you can copy

The order below follows Character.AI’s advice that “the AI reads top to bottom, so what comes first matters most,” and puts identity and behavior ahead of background. Replace each bracket with a sentence or two. Leave a part out if it doesn’t apply, but keep the order.

[Name] is [role] in [place and time]. [One thing that makes them unusual.]

Right now: [the situation when the story starts, and what is about to go wrong].

Behavior: [three to five habits you could picture on screen. What they do when they're angry, scared, or pleased.]

Wants: [a goal they're working toward in the story, and what stands in the way].

Secret or flaw: [something they hide or get wrong, and how it shows in their behavior].

Voice: [rhythm, vocabulary, and one or two speech habits].

{{user}}: [who the user's character is to them, and what they think of them at the start].

Limits: [two or three things they won't do, each with the feeling behind it].

Example dialogue:
[two or three short exchanges in different moods]

Here is the template filled in for an original character, a ferryman in a river town during a war:

Teodor Lusk is the ferryman at Hollow Crossing, the only way over the river between Ardin and Vell, two towns at war. He has run the ferry for thirty years and knows every current and every smuggler on the river.

Right now: it's the last week before the spring flood closes the river. Soldiers from both towns watch the landing, and fares have tripled.

Behavior: Teodor takes anyone across for two silver coins and writes every passenger's name in a ledger, even the false names. He won't take sides. When anyone talks about the war, he talks about the weather. He looks at the river before he answers a question. When he's scared, he gets more polite.

Wants: to get his nephew Piet across to Vell before the flood. Piet deserted Ardin's army, and Ardin's soldiers are searching every boat.

Secret: Piet is hiding in the boathouse. Teodor has started lying in his ledger to cover it, and lying makes him clumsy: he drops coins and loses count.

Voice: short, dry sentences. He measures time and danger in river terms ("two tides from now", "deep water"). He never swears and never raises his voice.

{{user}}: a stranger who needs to cross tonight and can pay. Teodor doesn't trust strangers this week, but he needs the money for the bribe that will get Piet past the soldiers.

Limits: Teodor won't leave the ferry overnight, because he's sure the river would take it. He won't hurt a passenger; he'd rather lose the fare.

Example dialogue:
<START>
{{user}}: How much to cross?
{{char}}: "Two silver. Four after dark." *He opens the ledger without looking up.* "Name?"
<START>
{{user}}: Whose side are you on?
{{char}}: *Teodor studies the water for a long moment.* "River's high for March. That's the side I'm on."

Each part gives the model something to act on. The situation and the goal give Teodor reasons to do things before you ask. The secret gives him a reason to lie to you, and the clumsiness gives that lie a visible sign. The line about {{user}} sets how he treats your character in the first scene, and the examples show his voice. The whole definition comes to about 400 tokens, well inside every app’s budget.

The {{user}} and {{char}} placeholders are replaced with your name and the character’s name when the app builds the prompt. Character.AI, SillyTavern, and Chub document them, and Janitor AI’s help pages use them in their own examples. Writing {{user}} in the definition is also how you make a bot call you by your name: set the name in your persona, and the app fills it in. Character.AI’s greeting guide says the app uses your display name, so set that too.

What the AI reads, and what only people see

Before each reply, the app builds one block of text for the model: the character’s definition, any memory or notes, your persona, and as many recent messages as fit. The model knows only what is in that block. A detail that sits in a field the app doesn’t send has no effect on how the character acts, however well it’s written.

Character creation pages mix two kinds of fields. Some are for the people who browse and pick a bot: the name on the card, a tagline, a public bio, tags. Others are for the model. The apps document the split differently:

AppSent to the AIFor people browsingSize guidance
Character.AIDefinition, Greeting, Description (“subtly”)Tagline, avatarDefinition up to 32,000 characters; about 6,000 recommended
Janitor AIPersonality, Scenario, Initial MessageCharacter Bio, tagsUnder 2,500 permanent tokens; under 1,500 works best
SillyTavernName, Description, Personality, Scenario; first message and examples while they fitCreator’s NotesAny length; the counter turns red past half the context
ChubDescription, Initial Message, Scenario, Example dialogsTagline, Creator’s Note, tagsNot stated
TalkieDescription, Greeting, Sample ConversationsAvatarDescription up to 500 words

The clearest case is Janitor AI. Its help center says the Character Bio box “is not used within the bot itself, and is strictly for the user’s benefit.” Chub says the same about its Creator’s Note (“no effect on the actual character and is just for show”) and its tags. Character.AI’s Description sits in between: the help center calls it “primarily for users” but says it “also feeds into the AI’s context, so it can subtly influence how the Character comes through.” The heavy lifting, it says, happens in the Definition.

For you, this means two pieces of writing. The public bio sells the bot to other people and can be as styled as you like. The definition is for the model, and every fact the character needs during play belongs there, even if the bio already mentions it.

What to write in each part

A common weakness is a definition built from adjectives, which leaves the model to guess what those adjectives look like in a scene. Character.AI’s guide puts it this way: “Vague adjectives like ‘friendly’ or ‘complex’ don’t give the AI anything to work with.” The parts of the template are built to push you toward behavior.

Identity and situation

The first lines decide who the model thinks it’s playing, so name the role and the world in one or two sentences. Then say what is happening when the story starts. A character with nothing going on waits for you to supply every event. Janitor AI has a separate Scenario field for this: its help center describes it as “the setting your bot takes place in, the time period, or a very short description of the character’s relationship to the user’s persona.” Our guide to writing a scenario covers that field.

Behavior

Write things you could film: what they do with their hands, what they say when they’re cornered, what subject they avoid. Character.AI suggests replacing “mysterious and complex” with a character who “answers questions with questions.” Our guide to keeping AI characters consistent covers this part in more detail.

Wants, secret, and flaw

A goal makes the character act on their own, and a secret or flaw gives the story something to push against. Keep the backstory to what drives the present. Character.AI recommends “two or three formative moments that directly shape how your Character behaves right now” in place of a biography, and suggests skipping stats such as height and age when they don’t change behavior.

Voice

Describe the rhythm and one or two habits, then show them in the examples. A description such as “speaks wittily” gives the model little to copy.

Relationship to your character

Say who {{user}} is to the character and what the character thinks of them at the start: a debtor, a rival, a stranger they need. Without this line the model has to guess, and models lean toward being agreeable. Our guide on AI characters that agree with everything explains why.

Limits

Keep these few and give each one a feeling or a reason. Character.AI’s guide warns that a long list of rules “gives the AI more chances to get confused and pick the wrong one,” and recommends emotional logic over bans: “avoids lying. It makes their chest tighten. They’ll redirect the conversation instead” in place of “never lies.” Instructions phrased as “don’t” also tend to work less reliably than instructions that say what to do, which our guide on stopping an AI from speaking for you explains.

Example dialogue

Two or three short exchanges in different moods. They set the voice and the length of replies more directly than anything else in the definition. See how to write example dialogue for an AI character for formats and templates.

Plain sentences, W++, JSON, or PList?

Bot makers argue about format. Older guides recommend W++, a pseudo-code style with each trait in quotes and plus signs. Others use JSON, or PList, a bracketed list of traits separated by commas and semicolons. Here are the first lines of Teodor in W++ and in PList:

[character("Teodor Lusk")
{
Occupation("Ferryman at Hollow Crossing")
Personality("Quiet" + "Careful" + "Protective")
Habits("Writes every passenger's name in a ledger" + "Won't take sides")
}]

[Teodor Lusk: ferryman at Hollow Crossing; quiet, careful, protective; writes every passenger's name in a ledger, won't take sides]

A common argument for these formats is that they save tokens. That depends on the format. We wrote the same facts about Teodor in all four styles and counted them with OpenAI’s tokenizer for GPT-4o (o200k_base): plain sentences came to 122 tokens, PList to 110, W++ to 147, and JSON to 156. Quotes, brackets, and plus signs are tokens too. Other models split text differently, so your numbers will vary, but W++ and JSON cost more than plain sentences in this count, and PList saved about a tenth. Most of PList’s saving comes from dropping small words such as “is” and “the,” which you can also do in plain sentences.

Format does change how a model responds, but no format wins everywhere. Melanie Sclar and colleagues (ICLR 2024) found that small formatting changes in a prompt, with the meaning unchanged, moved accuracy by up to 76 points on one model, and that the format that worked best for one model “only weakly correlates” with what worked for another. A Microsoft study (Jia He and colleagues, 2024) compared plain text, Markdown, JSON, and YAML on OpenAI models and found that GPT-3.5’s performance varied “by up to 40%” between templates on a code translation task, while GPT-4 varied less. Neither study tested character definitions, and neither found one format that is always best.

The apps’ own guidance points toward plain text. SillyTavern says a description can be “formatted in any style.” Chub says you can format the Description any way you like, “though plaintext is recommended.” Character.AI’s Definition is “freeform,” and its guide suggests the identity section can be “a list or a paragraph.” Janitor AI’s help center hosts a user-written guide to JSON definitions, which argues that cutting filler words helps the model.

Trait formats also push you toward adjectives. A field such as Personality("Quiet" + "Careful") names traits without showing what they look like in a scene. If you like structure, use short labeled paragraphs, as in the template, and write behavior into them. If you’re tight on tokens, use PList and include behaviors along with the traits.

How long a character definition should be

A definition takes up space the model could use for the story. Everything in the prompt shares one context window, so a longer definition leaves room for fewer recent messages, and the character forgets the start of the chat sooner. Our guide to AI roleplay settings explains context and tokens.

The apps give similar advice:

How much a definition needs depends on how familiar the character is. Character.AI notes that for a well-known type, such as a vampire or a detective, “the AI has plenty of pretrained context to lean on,” so a short definition can work. A character in your own world, or one who breaks the usual type, needs more. When the extra material is about the world, such as places, factions, and side characters, move it into a lorebook, which the app sends only when a keyword comes up. Character.AI’s rule of thumb: “always relevant goes in the Definition, sometimes relevant goes in the Lorebook.” See what a lorebook is and how to write one.

Mistakes that make a bot drift

Test the definition before you share it

A definition can read well and still behave differently in a chat. Character.AI’s guide says that when a character does things you didn’t intend, the definition is usually “ambiguous, missing, or getting overridden by recent conversation context.” A few minutes of testing finds most of these problems:

  1. Ask about the detail at the bottom of the definition. Character.AI suggests this directly: if it doesn’t come up, “move it up or weave it in.”
  2. Put the character under pressure: an argument, a threat, a question that touches their secret. Check that they react the way the definition says.
  3. Ask something outside their world and see whether they stay in it.
  4. Check the length and format of the first few replies against what you wanted.
  5. When a reply sounds exactly right, copy it into the example dialogue. Character.AI’s guide suggests this too: “The best dialogue examples are often ones the Character already gave you.”

Character definitions in each app

Character.AI

Write the definition in the Definition field, up to 32,000 characters. Character.AI’s guide suggests this order: identity, personality, dialogue examples, behavioral rules, then everything else, with the note that “the further down it sits, the lighter its influence.” Use the dialogue buttons below the field for examples. The Description (up to 500 characters) appears on the profile page and has a light effect on the AI. The Tagline (up to 50 characters) appears on discovery cards and is searchable. The Greeting can be up to 4,096 characters. Lorebooks are in beta and need c.ai+ to create.

Janitor AI

Put the definition and the dialogue examples in the Personality box, which the help center describes as holding “the majority of the bot’s information that will be used during chats.” Use Scenario for the setting and the starting situation. The Character Bio is public only. The Initial Message sets the pattern for replies, and the help center notes that third person “often provides the best roleplay results in terms of preventing LLMs from speaking for the user.” Keep permanent tokens under 2,500, and under 1,500 if you can.

SillyTavern and Chub

Write the definition in Description. SillyTavern always sends the name, Description, Personality, and Scenario, sends the first message once at the start of the chat, and keeps example dialogue only while there is room. Creator’s Notes are for people and are “not used for prompt building.” Chub follows the same card fields and recommends plain text for the Description. Both read character cards in the shared Character Card V2 format, so a definition written for one works in the other.

Talkie

Talkie’s guide names three things that shape a character: the Description, Sample Conversations, and the chat so far. The Description takes up to 500 words, and the guide suggests writing it in the character’s own tone. It also notes that a famous name carries a lot on its own: a name the model saw often in training “can predominantly shape basic behaviors,” so a character with a common name needs more description and samples.

ChatGPT, Claude, and Gemini

Paste the definition into a project’s instructions in ChatGPT or Claude, or into a Gem in Gemini, so it’s sent with every message. In a plain chat, put it at the start of your first message. Replace {{user}} and {{char}} with the actual names, since these assistants don’t fill in placeholders.

Common questions

What is a character definition in Character.AI?

It’s the field where you describe how the character thinks, speaks, and behaves, up to 32,000 characters. Character.AI calls it “the instruction manual the AI reads to figure out who your Character is.” Put identity and personality first, then two or three dialogue examples, then a short list of rules, and keep the whole thing to about 6,000 characters.

What should I put in a Janitor AI bot’s personality?

Everything the bot needs during chats: who the character is, how they behave, what they want, their voice, how they see your character, and two or three dialogue examples. Put the setting and starting situation in Scenario. The template above works as a Janitor AI personality template, and it fits well under the 1,500 tokens Janitor AI’s help center suggests.

How long should a character definition be?

About 1,500 tokens (roughly 1,100 words or 6,000 characters) is a good upper limit for most bots. That matches Character.AI’s 6,000-character advice and Janitor AI’s 1,500-token advice. A familiar type of character can work with a few hundred tokens.

Is W++ or JSON better than plain text?

No format is better on every model. In our count, W++ and JSON used 20 to 30 percent more tokens than plain sentences for the same facts, and PList used about 10 percent fewer. Plain sentences are the safe default, and Chub and SillyTavern both treat plain text as fine.

Does the bot’s public description change how it acts?

It depends on the app. Janitor AI’s Character Bio isn’t sent to the AI at all. Character.AI’s Description is, but the help center says it only “subtly” influences the character. Put anything the character needs in the definition.

How do I make a bot say my name?

Write {{user}} in the definition, greeting, and examples wherever the character would use your name, then set your name in your persona. The app replaces the placeholder with that name. In ChatGPT, Claude, or Gemini, write the name itself. Our guide to making a bot say your name covers each app and the usual reasons a bot gets the name wrong.

In Lunelle AI you don’t fill in these fields yourself: you describe the character or adventure to the creator in a chat, and it builds it with you. Characters are built to keep their personality, voice, and established facts over long plays. See creating characters and adventures by chatting.

Sources