Overview
Ensure your assistant’s responses maintain safety and brand adherence.
The Response Controls tab enables you to regulate Assistant outputs by defining and managing specific keywords and phrases. These controls ensure appropriate and on-brand interactions while preserving user experience.
Key benefits
- Enhanced safety: Prevent the Assistant from generating inappropriate or off-brand responses.
- Improved brand adherence: Filter out responses that deviate from brand guidelines.
- Operational efficiency: Configure Response Controls directly in the PolyAI UI without backend modifications.
- Custom metrics tracking: Monitor and analyze Assistant behavior for better performance insights.
How it works
Response Controls use string matching and regex patterns to monitor Assistant responses in real time. When a response matches a predefined stop keyword or phrase, the system can:
- Halt the response: Immediately stop response generation.
- Log the occurrence: Track matches for analytics and review.
This functionality helps ensure adherence to safety and brand standards without disrupting the flow of conversations.
Getting started
Accessing Response Controls settings
- Navigate to Response Controls: Access the settings from the Response controls page.
- Create a new phrase:
- Click Add Phrase to open the creation form.
- Fill out the required fields:
- ID: A unique identifier for tracking the stop keyword.
- Description: (Optional) Describe the purpose of the stop keyword for team understanding.
- Regular Expression: Enter a regex pattern to define the keyword or phrase.
- Say Phrases: Toggle to determine whether matching phrases halt the response (TRUE) or are tracked for analytics (FALSE).
[Include a screenshot of the Response Controls configuration page]
Feature details
Response Controls structure
Response Controls are organized as Stop Keywords, each with specific attributes:
- ID (String): Unique identifier for tracking and analytics.
- Description (String): Optional text to clarify the keyword’s purpose.
- Regular Expression (String): Regex pattern that identifies the phrases or words to control.
- Say Phrases (Boolean): Specifies whether matching phrases halt responses (TRUE) or are logged for analysis (FALSE).
Example configuration
ID: stop_inappropriate
Description: Prevent responses containing offensive language.
Regular Expression: /\b(offensiveWord1|offensiveWord2)\b/i
Say Phrases: TRUE
This setup ensures responses containing “offensiveWord1” or “offensiveWord2” are immediately halted.
Advanced configuration
You can use regex to define complex patterns for fine-grained control over responses. For a detailed guide on regex, refer to Regex documentation.
[Include a screenshot of an example Response Control setup]
Custom metrics tracking
Response Controls log all occurrences of matches for analytics. You can view these metrics in the Analytics Dashboard to identify trends, evaluate Assistant behavior, and refine controls over time.
Practical use cases
- Safety compliance: Prevent offensive or harmful language in user interactions.
- Brand adherence: Block responses with phrases outside approved messaging.
- Content moderation: Identify and log responses that require review or adjustment.