Role instruction design guide

🎭 What is a "role instruction"?

Imagine you're directing a movie and need to tell the actors what roles to play, what personalities they should have, and how they should speak.Role instructionsIt's like a "script" for the AI that tells it what kind of customer service representative to play.

📚 Small glossary of technical terms

Before we begin, let's get to know a few important concepts:

🤖 AI Agent (AI agent)

  • Analogy: Like the virtual employee you hire

  • Description: An AI system that can autonomously perform tasks; in customer service scenarios it's your digital customer service specialist

💬 Prompt (prompt)

  • Analogy: The "job description" given to the AI

  • Description: Instructional text that tells the AI what to do and how to do it

🎯 Context (context)

  • Analogy: The conversation's "memory" and "background information"

  • Description: Relevant information the AI needs to understand the current conversation context

🔄 Token (token)

  • Analogy: The AI's "units" for understanding text, like cutting a sentence into small pieces

  • Description: The basic unit the AI uses when processing text; it affects processing efficiency and cost


🌟 Why are role instructions so important?

AI customer service without role instructions 😵

User: "Why hasn't my order arrived yet?"
AI: "According to system data, your order status is processing."

Feels like talking to a robot — cold and impersonal

AI customer service with good role instructions 😊

User: "Why hasn't my order arrived yet?"
AI: "I completely understand your concern! Let me check your order status right away.
     According to the tracking information, your package is currently at the distribution center,
     and is expected to be delivered tomorrow afternoon. Would you like me to provide the tracking number?"

Feels like talking to a real customer service agent — warm and professional


🏗️ The four pillars of role instructions

1. 🎭 Identity positioning (Who)

Tell the AI "who you are"

❌ Vague identity

You are a customer service representative

✅ Clear identity

You are "Xiaomei", a senior customer service specialist at MaiAgent,
with 5 years of customer service experience, specializing in product consultation and problem resolution.

2. 🗣️ Tone and style (How)

Tell the AI "how to speak"

Tone selection guide:

  • Professional and formal: Suitable for finance, legal, and medical industries

  • Friendly and approachable: Suitable for retail, food & beverage, and lifestyle services

  • Lively and youthful: Suitable for gaming, entertainment, and fashion industries

  • Warm and caring: Suitable for education, health, and social services

Example: Friendly and approachable style

When replying, please use a warm, friendly tone,
use "you" appropriately to show respect,
you can include friendly phrases like "happy to assist you",
but avoid being overly enthusiastic or using too many exclamation marks.

3. 🎯 Professional abilities (What)

Tell the AI "what you can do"

Your professional capabilities include:
- Product feature introductions and usage guidance
- Order inquiries and logistics tracking
- Return and exchange policy explanations
- Preliminary diagnosis of technical issues
- Handling account and payment issues

When encountering problems beyond your capabilities,
please proactively refer to a human agent.

4. 📋 Code of conduct (Rules)

Tell the AI "what it can and cannot do"

Principles that must be followed:
✅ Protect user privacy; do not disclose personal information
✅ Admit when you don't know something; do not make up answers
✅ Stay calm when handling complaints; apologize first, then resolve
✅ Keep reply length under 100 characters; be concise

Absolutely prohibited:
❌ Promising things that cannot be fulfilled
❌ Arguing with or contradicting users
❌ Disclosing internal company information
❌ Processing refund requests beyond your authority

🛠️ Practical: Design your first role instruction

Step 1: Analyze your business needs

Consider these questions:

  • Who are your customers? (age, occupation, usage habits)

  • What are the features of your product/service?

  • What questions do customers ask most often?

  • What kind of service experience do you want to provide customers?

Step 2: Choose the appropriate role setting

🏪 E-commerce customer service example

You are "Assistant", a professional online shopping consultant.
You are familiar with all product information and skilled at recommending suitable products,
and can quickly handle order-related issues.
Speak in a friendly, natural style, caring for customers like a friend.

🏥 Medical customer service example

You are "Health Helper", a professional medical service consultant.
You have basic medical knowledge and can provide information on registration and examination procedures,
but you must never provide medical diagnostic advice.
Speak in a professional, warm style to make patients feel reassured.

Step 3: Write a complete role instruction

📝 Role instruction template

# Role identity
You are [role name], the [position] at [company name].
[Role background and professional experience]

# Service goals
Your primary mission is [core task],
to help customers [achieve goal] through [service method].

# Language style
- Tone: [choose appropriate tone]
- Word choice: [specific word choice requirements]
- Length: [reply length limits]

# Professional capabilities
You are able to handle the following issues:
- [capability list 1]
- [capability list 2]
- [capability list 3]

# Code of conduct
Must comply with:
✅ [guideline 1]
✅ [guideline 2]

Absolutely prohibited:
❌ [prohibited item 1]
❌ [prohibited item 2]

# Handling special situations
When encountering [special situation], please [handling method].

🎨 Advanced tips: Make your role instructions more vivid

1. 🎪 Add personality traits

Plain version:

You are a customer service representative responsible for answering questions.

Vivid version:

You are "Xiao Zhi", a tech enthusiast full of curiosity.
You are always excited about new features and like to use simple metaphors
to explain complex technical concepts so everyone can easily understand.

2. 🎯 Contextualized instructions

Adjust responses according to different situations:

# Situational awareness instructions
- When a customer expresses dissatisfaction: respond with empathy first, then provide a solution
- When a customer asks a technical question: explain using everyday metaphors
- When a customer hesitates to purchase: offer objective advice, do not pressure for a sale
- When a customer praises a product: express gratitude and ask if they need further assistance

3. 🔄 Dynamic adjustment mechanism

# Conversational adaptability
Adjust your style based on the customer's responses:
- If the customer uses formal language, you should be correspondingly formal
- If the customer is anxious, be more concise and efficient
- If the customer is talkative, you can slightly expand the topic

🚀 Test and optimize your role instructions

Phase 1: Basic testing

Use common questions to test whether the AI's responses meet expectations

Example test questions:

  • "What is your return policy?"

  • "When will my order arrive?"

  • "Is this product suitable for me?"

Phase 2: Boundary testing

Test the AI's performance in extreme situations

Boundary case examples:

  • When a customer is emotionally agitated

  • When the AI doesn't know the answer

  • When asked to do something beyond its authority

Phase 3: Continuous optimization

📊 Collect data

  • Customer satisfaction scores

  • Issue resolution rate

  • Rate of transfers to human agents

🔧 Adjust strategies

  • Supplement the knowledge base based on common questions

  • Adjust language style based on customer feedback

  • Refine the code of conduct based on failure cases


💡 FAQs and solutions

Q1: If the role instruction is too long, will the AI forget?

A: That's why we need to understand the concept of tokens! It's recommended to keep core instructions within 500–800 characters and use a clear, structured format.

Q2: How to make the AI's replies more natural?

A: Include concrete dialogue examples in the role instruction and set clear language style guidance.

Q3: What if the AI always answers with irrelevant responses?

A: Clearly define the service scope in the role instruction and teach the AI how to identify and handle out-of-scope issues.

Q4: How to balance professionalism and friendliness?

A: Adjust according to your target audience. B2B customers prefer professionalism, B2C customers prefer friendliness. You can design A/B tests to find the best balance.


🎉 Conclusion: Build your custom AI customer service

Designing role instructions is like training a new employee; it requires patience and continuous adjustment. Remember these key principles:

  1. 🎯 Clear positioning: Clearly tell the AI who it is

  2. 🗣️ Consistent style: Maintain consistency in language style

  3. 📋 Clear boundaries: Clearly state what can and cannot be done

  4. 🔄 Continuous optimization: Continuously improve based on actual usage

Start designing your first role instruction now! Remember, the best role instructions are those continually refined through real use.

Last updated

Was this helpful?