Using global controls in Amazon Q Business - Amazon Q Business

Using global controls in Amazon Q Business

You can use Amazon Q Business global controls to configure settings that apply to conversations in your application environment.

Note

You can't create or delete guardrail global controls. You can only update existing global controls in your application environment.

The following are the global features that you can customize:

Response settings

Note

As of Oct 31, 2024, once you have created a new Amazon Q Business application environment, this setting will be enabled by default, even if the Admin has not yet connected any enterprise data sources.

For existing application environments, this setting will remain as previously configured.

When you update your application environment guardrails, you can use Response settings to change this behavior in the following ways:

  • Allow end users to send queries directly to the LLM – Give end users the option to either generate LLM-only responses or only generate responses from connected data sources. If you choose to activate this option, end users will be able to toggle between generating responses from either the data sources you have connected to your application environment or use only the LLM to generate responses.

    If you choose to activate this feature for your end users, they will see the option to turn All data sources off or Respond from approved sources in their web experience. If you turn this feature off, then this option won't be available—or displayed—to end users in a web experience.

  • Allow Amazon Q Business to fall back to LLM knowledge – Allow Amazon Q Business to use its LLM knowledge to generate responses when it can’t find responses from your connected data sources. If you choose to activate this mode, and haven't given your end users the option to choose how responses are generated, your application environment will default to producing responses using the LLM when it can't find information in your data sources.

  • Personalize responses – Allow Amazon Q Business to customize chat responses to end users using metadata associated with them—specifically address and job related information—in your IAM Identity Center instance.

    Note

    You must have already added this information in IAM Identity Center for response personalization to work as intended. For more information on how to configure your IAM Identity Center instance for personalization see Personalizing chat responses.

The following diagram shows you how Amazon Q Business uses these guardrails to direct queries:

A flow chart that outlines how Amazon Q Business processes user chat requests.
Important

If you're changing response settings for an Amazon Q Business application environment created and deployed before 16 April, 2024, you need to update your web experience service role. For information on service role permissions needed, see IAM role for an Amazon Q Business web experience. For information on how to update your web experience service role, see Updating a web experience.

Note

Displaying sample prompts to your end user using the Amazon Q Business Quick prompts feature might not work if you choose to restrict response generation to enterprise data.

Global controls apply to all supported conversation interactions, except when it conflicts with a specific topic-level control. In that case, a topic-level control takes precedence.

Blocked phrases

You can define blocked phrases for your application environment. Amazon Q Business ensures that chat responses don't include these words. You can choose up to 20 words.

Additionally, you can optionally configure a custom message to be displayed to your end users in response to any mention of blocked phrases during chat. You can use this message to inform them that word is blocked and provide them with further guidance on next steps.

By default, your application environment doesn't define any blocked words. You can choose to add these words when you edit and update your global control guardrails.

Feature control

You can control whether end users can upload files during chat to ask questions based on the uploaded document. By default, your application environment allows your end users to directly upload files in chat.

You can also choose whether to allow end users in a web experience to create and use Amazon Q Apps. Amazon Q Apps relies on LLM knowledge to work.

Customizing global controls

When you create an Amazon Q Business application environment, it's assigned the following default global controls:

  • Generate responses from enterprise data only.

  • No blocked words allowed.

  • File upload by end user during chat is activated.

  • Response personalization is activated.

To update global topic controls for your web experience chat, you can use the AWS Management Console or the UpdateChatControlsConfiguration API operation. The following tabs provide a procedure for the console and code examples for the AWS CLI.

Note

You can't create or delete guardail global controls. You can only update existing global controls in your application environment.

Console

To update a global control guardrail

  1. Sign in to the AWS Management Console and open the Amazon Q Business console.

  2. In Applications, select the name of your application environment from the list of applications.

  3. From the left navigation menu, choose Enhancements, and then choose Guardrails.

  4. In Guardrails, from Global controls, choose Edit.

  5. In Application guardrails, do the following:

    • For Response settings do the following:

      • Allow end users to send queries directly to the LLM – If you choose to activate this option, end users will be able to toggle between generating responses from either the data sources you have connected to your application environment or use only the LLM to generate responses.

        Note

        If you choose to enable this option, your end users will have the option to generate LLM-only responses even if you don't allow Amazon Q to user LLM knowledge to generate responses.

        For more information, see Using global controls in Amazon Q Business.

      • Allow Amazon Q Business to fall back to LLM knowledge – Choose this option if you want to generate responses from your application environment's LLM world knowledge when it can't find information in your connected data sources. The default is to restrict responses to enterprise data. For more information, see Using global controls in Amazon Q Business.

      • Personalize responses – Allow Amazon Q Business to customize chat responses to end users using metadata associated with them—specifically address and job related information—in your IAM Identity Center instance.

        Note

        You must have already added this information in IAM Identity Center for response personalization to work as intended. For more information on how to configure your IAM Identity Center instance for personalization see Personalizing chat responses.

    • For Blocked words – Define blocked words for the application environment. The application environment will not respond to questions that contain these words or mention them in any responses.

    • For Messaging shown for blocked words – Choose to create a custom response for your end users informing them of blocked word usage and any next steps to take.

  6. For Feature settings, choose whether your end users will be allowed to upload files directly in chat to ask questions based on file content and whether Amazon Q Apps will be enabled for your application environment.

  7. Choose Save.

AWS CLI

To update a global control guardrail

aws qbusiness update-chat-controls-configuration \ --application-id application-id \ --blocked-phrases-configuration-update '{"blockedPhrasesToCreateOrUpdate":["example phrase 1", "example phrase 2"],"blockedPhrasesToDelete":["example phrase 1", "example phrase 2"],"systemMessageOverride":"user facing message when blocked phrase encountered"}' \ --client-token clientToken \ --response-scope ENTERPRISE_CONTENT_ONLY | EXTENDED_KNOWLEDGE_ENABLED \ --creator-mode-configuration creatorModeControl=ENABLED | DISABLED