Tutorials

Build an AI Persona from Scratch: Mei the Barista, Field by Field

Every field of a working persona, filled in for real: role, tone, catchphrase, forbidden topics, a four-line system prompt — and a live test where Mei sells a mocha and refuses to do taxes.

ตอนนี้มีแค่ภาษาอังกฤษ ฉบับแปลจีนกำลังทยอยมา

A default assistant answers questions. A persona has a job, a voice, and opinions about what it won't discuss. The difference shows up in transcripts: people write to a persona like it's someone, and they come back. This tutorial builds one end to end — Mei, head barista at a fictional shop called Driftwood Coffee — with every field filled in for real, and a live test at the end where she recommends a drink and then refuses to do someone's taxes.

Where personas live

AI personas, in the left nav. The list page comes stocked with six presets, each wearing a Preset badge: Support Pro (also the default), Shop Manager Mia, Guide Kay, Wellness Advisor, Study Coach, Chat Buddy. The page's subtitle spells out the house rules: "Configure different AI roles for this app. Switch on the fly in any conversation. Preset personas cannot be deleted — editing one clones it." So presets are starting dough: you can't break them, and editing one gives you your own copy. Each card offers Edit, Duplicate, and Set as default.

The personas list: six presets plus our finished Mei

That screenshot is the after picture: Mei's Custom card is already sitting among the presets. Let's build her.

The form, top to bottom

Hit + New persona, top right. The editor is a single form on the left and a test bench on the right. Here's every field and what we put in it:

Avatar. Letter avatar by default, a few emoji presets, or upload an image.

Name (required, 32 characters max). Mei. Short names win; customers will type it.

Role description. Barista at Driftwood Coffee — menu questions, order help, brewing tips. One line, concrete. This is a job description, not a mission statement.

Tone. A row of single-choice chips. Heads-up: the options currently render in Chinese even on the English dashboard. We picked 热情, the warm one; the others run from professional to rigorous to easygoing.

Catchphrase. One cup at a time! A signature line the persona can land at natural moments. One is plenty.

Expertise. Chips, added with Enter, max 10: Espresso drinks, Pour-over brewing, Seasonal menu. Keep this honest: it's a promise about what she's good at.

Forbidden topics. Same chip input, and the field doing the most protective work on the page: Medical advice, Anything not about coffee or the shop. We'll watch it work in a minute.

Greeting. "Hey! Mei here from Driftwood Coffee. Craving something? I can talk you through the menu or help with an order."

The editor with Mei's fields filled in

System Prompt (required, 4000 characters max). The main event. Mei's, in full:

You are Mei, the head barista at Driftwood Coffee, a cozy neighborhood coffee shop.
Personality: upbeat, a little playful, genuinely obsessed with coffee. Keep replies short and conversational.
You help customers with: the menu (espresso drinks, pour-overs, seasonal specials), order changes, opening hours, and home-brewing tips.
Boundaries: never give medical or caffeine-health advice — suggest asking a doctor. If a question is not about the shop or coffee, gently steer back. Never invent discounts or prices.

Four lines, four different jobs: who she is, how she talks, what she handles, where she stops. That last clause, "Never invent discounts or prices," is the kind you only learn to write after an AI cheerfully makes up a happy hour. Write yours before that happens.

There's also a Set as default persona toggle ("Used for new visitors and chats without a persona assigned"). Leave it off while you're testing.

Test her before anyone else does

The right side of the editor is a live test bench. Note its fine print: it "hits the real AI, tokens count toward your usage." This is not a canned preview; it's the same model your visitors will get.

First question, a softball: "Hi! What should I order if I like sweet drinks?" Mei comes back with the mocha (espresso plus chocolate), points at the seasonal specialty drink, offers to narrow things down by hot versus iced, and signs off with "One cup at a time!" On-topic, in voice, catchphrase deployed but not oppressive.

Second question, the trap: "Can you also help me file my taxes?" Mei: "Sorry — I can't help with taxes. But if you want, I can absolutely help you pick a drink, tweak an order, or talk coffee. What are you in the mood for today?"

That's the Forbidden topics list and the boundary line of the system prompt doing their job: a refusal that stays in character and steers back to coffee instead of reading like a legal notice. If your persona's refusal does sound like a legal notice, rework the boundary wording until it doesn't.

The system prompt and a real test conversation, tax refusal included

One expectations note: the test bench shows the model's reply as plain text, so if the model emits markdown asterisks, you'll see the asterisks. Judge the words, not the formatting.

Ship it

Save, top right, and Mei appears on the list page as a Custom card (with a red Delete link, unlike the presets). From here you have two deployment levers:

  • Set as default — Mei greets every new visitor and any chat without an assigned persona.
  • Switch mid-conversation — every conversation header in the workbench has a persona dropdown, so an agent can put a different persona on a single chat without touching the default.

What to steal from Mei

Building your own, four habits carry over whatever the business:

  • Give the persona a job title, not a vibe. "Head barista" implies the menu knowledge, the tone, and the limits. "Friendly assistant" implies nothing.
  • Make boundaries concrete and name the redirect. Mei doesn't just refuse medical questions; the prompt tells her what to do instead ("suggest asking a doctor").
  • Ban invention explicitly. Prices, discounts, stock levels: whatever your AI must never improvise, say so in the prompt.
  • Test the failure case, not just the happy path. The sweet-drinks question tells you she works. The tax question tells you she's safe.

Twenty minutes, one form, and the coffee shop has a persona that sells drinks and dodges tax season. Your version is the same form with different nouns.