Rules
Set global rules and customize text-to-speech pronunciations for your assistant.
Rules
Define your assistant’s behavior with Global Rules in the Agent Settings. Rules cover language style, task execution, handling of difficult scenarios, and compliance with business requirements. Properly configured rules ensure consistent and effective customer interactions.
What are rules?
Rules specify how your assistant responds to users, performs tasks, and handles sensitive scenarios. Use rules to:
- Set the assistant’s tone, language, and behavior.
- Ensure compliance with organizational policies.
- Address edge cases and high-risk interactions.
Example:
For a museum assistant that always refers to “exhibits” instead of “artworks”:
“Always refer to ‘artworks’ as exhibits. Do not use the term ‘artworks’ in any context.”
Types of rules
1. Behavior and interaction guidelines
Specify how the assistant interacts with users:
-
Tone: Choose formal, casual, empathetic, or calm tones.
- Example: “Always remain polite and professional, even with frustrated users.”
-
Language style: Simplify language or avoid jargon as needed.
- Example: “Use clear, simple language suitable for non-technical users.”
-
Consistency: Align responses with branding and messaging.
- Example: “Always address visitors as ‘guests’ rather than ‘customers.‘“
2. Task execution
-
Explicit instructions: Clearly define actions.
- Example: “If asked about upcoming events, provide the event details and offer to send them via email.”
-
Response scope: Limit responses to specific tasks or topics.
- Example: “Only answer questions related to museum exhibits. Avoid general queries outside this domain.”
3. Content restrictions
Set boundaries for what the assistant can or cannot say:
-
Sensitive topics: Avoid prohibited subjects. For details, see the Safety Dashboard.
- Example: “Do not discuss politics, religion, or personal opinions.”
-
Accuracy: Avoid fabricated or uncertain answers.
- Example: “If unsure, direct the user to a staff member or a verified source.”
Best practices
-
Be specific: Avoid ambiguity.
- Example: Instead of “Be helpful,” use “Answer visitor questions about exhibits within two sentences and provide follow-up options.”
-
Provide examples: Demonstrate expected interactions and responses.
- Example:
- Visitor: “What time does the museum close?”
- Assistant: “The museum closes at 6 PM. Would you like a list of activities available before closing?”
- Example:
-
Plan for edge cases: Handle emergency or high-risk scenarios.
- Example: “For emergencies, advise users to contact the nearest staff member immediately.”
-
Test and iterate: Regularly review and refine rules.
Example rules
-
Handoff to a staff member
- Example: “If visitors ask for a staff member or seem confused, notify the front desk and provide directions.”
-
Handling sensitive queries
- Example: “For questions about controversial exhibits, respond: ‘I’m sorry, I can’t provide additional context. Please contact our curator for more information.’”
-
Consistency in responses
- Example: “Always greet visitors with ‘Welcome to the museum!’ before answering their question.”
Pronunciations
PolyAI uses Text-to-Speech (TTS) to convert text into spoken language. Occasionally, uncommon words, domain-specific terms, proper nouns may be mispronounced. In these scenarios, the TTS Pronunciations tab is available to embed pronunciation guidelines for key phrases in the global rules.
Key points
- Enhanced pronunciation accuracy: Correctly pronounce domain-specific terms and unique phrases using IPA.
- Streamlined workflow: Manage rules directly within the platform.
- Flexibility: Adjust pauses and pronunciation for various needs.
Key benefits
- Improved voice quality: Ensure accurate and natural speech.
- Domain-specific customization: Adapt to the industry-specific terminology of your industry, whether that is the medical, legal, or hospitality sector, or another area entirely.
- Efficient workflow: Save time by eliminating external configuration.
- Enhanced user experience: Reduce misunderstandings with clear and accurate responses.
How it works
Pronunciations use the International Phonetic Alphabet (IPA) to define pronunciation rules. By creating TTS rule objects with regular expressions and IPA replacements, you can customize how the assistant speaks specific terms.
Getting started
Configure TTS Pronunciations
- Navigate to the Pronunciations section.
- Create, edit, or delete rules.
- Define pronunciation rules:
- Expression: Enter a regular expression to target words.
- Replacement: Add IPA symbols for correct pronunciation.
- Case sensitivity: Enable if needed.
Example rule
- Regex:
/\bLouvre\b/
- Replacement:
/ˈluːvrə/
- Case sensitive:
FALSE
This ensures “Louvre” is pronounced as /ˈluːvrə/
, maintaining accuracy and professionalism.