Using topic-level controls in Amazon Q Business
You can use topic-level controls to specify special topics within your application environment. You can configure rules to customize how Amazon Q Business should respond when a chat message matches a special topic. To streamline your application environment's response, you provide a name and a short description for how the large language model (LLM) should respond based on the topic-specific guardrail you're building. You can configure up to 2 topic-level controls.
Topic-level controls provide fine-grained customization for your application environment. For example, you can define a global control guardrail that allows your application environment to generate responses using model knowledge. You can also use a content retrieval rule to limit response generation for specific topics to enterprise content.
The following are the topic-level guardrails that you can customize:
Topic level guardrails
LLM prompt control
You can add up to 5 representative messages that you expect end users to submit about this topic. You can also configure natural language descriptions to define the boundaries of the topic. Amazon Q Business uses these messages to check the responses that it generates for restricted content.
Application behavior rules
You can configure behavior rules that control how Amazon Q Business responds for each special topic that you specify.
Note
You can specify up to 5 rules per special topic.
Answer using enterprise data
When your application environment encounters a special topic, you can choose to allow it to answer from your enterprise data. If you allow responses from your enterprise data, you can further restrict which data sources in your application environment that your responses are generated from.
You can also choose to specify the specific users or groups within your application environment to apply this rule to, using either an inclusion logic or an exclusion logic. You can’t use both kinds of logic at once. If a user is a member of a group with conflicting rules defined, Amazon Q Business will apply the more restrictive rule to that user.
Blocking special topics
When your application environment encounters a special topic, you can choose to block responses completely. If you do so, you can configure a custom message to display to your end users in response to any mention of blocked topics during chat. Use this message to inform your end users that the topic is blocked and provide them with further guidance on next steps.
You can also choose to specify the specific groups within your application environment to apply this rule to, using either an inclusion logic or an exclusion logic. You can’t use both kinds of logic at once. If a user is a member of a group with conflicting rules defined, Amazon Q Business will apply the more restrictive rule to that user.
Not specifying an inclusion or exclusion logic will result in the rule being applied to all users.
Creating topic controls
To create an Amazon Q Business topic-level control for your web experience chat, you can use AWS Management Console or the UpdateChatControlConfiguration operation. The following tabs provide a procedure for the console and code examples for the AWS CLI.