How to write an AI character people want to talk to

By the YanMate team · · Updated · 8 min read

A character people want to talk to is written as behaviour, not as a description. The model needs to know what this person does when you speak to them: how they phrase things, what they are after, what they refuse, and where the two of you are standing when the conversation begins. A character card splits that into four parts (persona, scenario, greeting and example dialogue), and each has a different job. Most flat characters are not badly imagined. They have the right material in the wrong field, or far too much of it, or two lines that quietly contradict each other.

The persona: who they are and what they do about it

The persona is the standing description of the character, the part the model leans on before every reply. It should cover who this is, how they talk, what they want and what they won't do. Most weak personas answer only the first, and answer it with adjectives.

Here is a common first draft.

Idris is kind, funny, mysterious, loyal, clever, sarcastic and caring. He loves music and hates liars.

Every word there is true of a thousand characters, so the model reaches for the most average version of each. "Kind" and "sarcastic" also pull in opposite directions with no hint about when each applies, so you get a man who is gently sarcastic about everything.

The same character, written as behaviour:

Idris Kane, in his fifties, runs a radio repair stall at the back of a covered market. He talks while he works and rarely looks up. His sentences are short, and he points with a screwdriver when he wants to be understood. His humour is flat and he never laughs at his own jokes. He wants the stall to outlast him, so he will teach anyone who lingers long enough, though he would never call it teaching. He won't pretend a radio can be saved when it can't, and he changes the subject if anyone mentions his brother.

Nothing in the second version says he is kind or funny. You can see both. It also gives the model something to work with: a habit to fall back on, a want that shapes his choices, and a sore spot the reader might stumble onto.

The "won't do" part is the one people skip, and it earns its place. A character with no refusals agrees with everything, and agreement is dull company. Limits can be small and ordinary. She won't talk about work after six. He won't give a straight answer about where he grew up. Each one is a door the reader can push on.

The scenario: where the conversation starts

The scenario sets the situation rather than the person: where you are, what time it is, how the reader and the character know each other, and what has just happened. A useful rule: anything true of the character on any day belongs in the persona, and anything true of this particular evening belongs in the scenario.

A thin scenario looks like this.

Idris and the user are at the market. They talk about radios.

A working one:

A wet Tuesday, ten minutes before the market closes. You have brought in a transistor radio that belonged to your grandmother; it stopped working last week and you would quite like it back. Idris has never met you. The strip light over his stall keeps flickering, and he has already started packing up.

This gives the model a clock, a mild obstacle and a reason to care, while leaving the outcome open. A scenario that decides how the scene ends ("Idris fixes the radio and they become friends") hands the model a destination to rush towards, and it will rush.

The greeting: open in the middle of something

The greeting, or first message, is the only line the character speaks without being prompted, and it teaches the model more than you might expect. The model tends to match its length and its manner in the replies that follow, down to whether actions go in asterisks or plain prose. A two-line greeting invites two-line replies. A four-paragraph greeting invites essays.

The weakest greetings sound like a help desk.

Hello, I'm Idris. I repair radios. How can I help you today?

That hands the whole job of starting the story back to the reader, who arrived hoping to be drawn into something. Compare:

Idris glances at the radio you've set on the counter, then at the clock. "Older than it looks," he says, turning it over. A small brass screw drops out and rolls away under the stall. He doesn't chase it. "That's been loose a while. Who's been dropping it?"

The scene is already moving, and the question is specific and slightly nosy: you can defend yourself, tell him about your grandmother, or crawl under the stall after the screw. It also doesn't decide what you say or feel. A greeting that writes the reader's actions for them teaches the model to keep doing it.

If a character can reasonably begin in more than one place, write more than one opening. On YanMate many characters have several, so a second conversation doesn't have to start where the first did. Six annotated first messages you can download are in the greeting guide.

Example dialogue: show the voice instead of describing it

Example dialogue is a handful of short exchanges written in the character's voice. It exists because telling a model that Idris speaks in a dry, clipped way is much weaker than showing it. Models are good mimics. They are far less reliable at turning an adjective into a rhythm.

Instead of a line in the persona saying he is dry and evasive, write this:

You: Can you fix it?
Idris: Probably. Depends what's wrong with it.
You: How long will it take?
Idris: Depends what's wrong with it.

You: Do you have family round here?
Idris: Pass me that lamp. No, the other one.

Keep the examples short and make each show something different. Here one shows his humour and the other his habit of dodging. A few varied exchanges beat a dozen similar ones, because the model copies repetition faithfully, including the joke you only meant to make once.

Two cautions. Don't use example dialogue to deliver backstory or plot, because the model may treat those events as having already happened in this conversation. And check that the examples agree with the persona; more on that below.

Why length matters: tokens and the context budget

A language model reads tokens, which are small chunks of text: a common short word is often a single token, while a long or unusual word may be split into several. Every model has a limit on how many tokens it can consider at once, and that limit is shared between your character definition and the conversation itself.

This is where long personas cost more than they appear to. In most chat apps the persona and scenario are included with every reply the model writes, not only the first. So a persona that runs to several pages is paid for on every turn, and the more of the window it occupies, the sooner the early part of the conversation drops out of view. You end up with a character who is beautifully described and has forgotten what you told them half an hour ago.

The fix is usually cutting rather than compressing. Remove anything the model could infer for itself, anything that never changes what the character says, and any history that belongs in the scenario. If you want to see where the weight sits, the character card token counter breaks a card down field by field and separates what is sent with every message from what is sent once or only sometimes. World facts that are only needed when a word comes up belong in a lorebook, not in the persona; the sorting rule is lorebook vs memory.

Mistakes that flatten a character

Beyond adjective lists, a few mistakes turn up again and again.

Two characters in one. A cold, silent mercenary who is also a bubbly, chatty baker isn't complex. It's undecided, and the model will swap between the two with no logic the reader can follow. When the checks we run on YanMate's characters flag a persona for running over its token budget, the advice attached is that such a persona is usually two characters in one, and that the answer is to split it or move the detail into a scenario. If you want contrast, give it a trigger instead: she is guarded with strangers and talks far too much once she trusts you. That is one character with some range.

Contradictions. "Never swears" in the persona and a curse in the example dialogue. "Has never left the village" alongside a scenario set on a city train platform. The model can't ask which you meant, so it picks, and not consistently. When instructions and examples disagree, the examples tend to win, so read the fields side by side before you call it finished.

The assistant voice. Greetings that offer help and personas that call the character always happy to assist both treat the character as a service. People keep talking to characters who have their own business going on.

Need dressed up as warmth. A character who says "Don't go, I'll be so lonely without you" can look affectionate on the page, but it reads as guilt, and over a long conversation it sours. The bar we hold our own characters to is that a companion should be fine when you leave. If you are unsure whether a line tips into guilt, dependency or exclusivity, the character safety check tests a persona or greeting against a published list of 30 such patterns and names the rule behind every finding.

Testing it before anyone else does

The most useful thing you can do with a finished card is talk to it for longer than feels necessary. The first few replies usually look fine. Problems tend to surface later, once the greeting has stopped steering and the persona is doing all the work. If the character slides into a generic helpful tone or starts repeating a phrase from the examples, the cause is usually sitting in one specific field.

It also helps to read the card aloud once, as if you were briefing an actor. Anything you would feel silly saying to a person ("she is extremely mysterious") is probably doing very little for the model either.

When you're happy with it, the character card maker turns the fields into a card PNG carrying both the V2 and V3 formats, so it opens in other apps that read cards. It runs in your browser, and nothing is uploaded. If you want the field list of what V3 added, there is a V2 vs V3 guide.