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.

Note

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

The following are the global features that you can customize:

Response settings

By default, a Amazon Q Business application is configured to respond to end user chat queries using only enterprise data. If it can’t find information from your data sources, it responds with: “Sorry, I couldn’t find enough information to answer.”

When you update your application 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 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 the 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 will default to producing responses using the LLM when it can't find information in your data sources.

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

Important

If you're changing response settings for an Amazon Q Business application 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. 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 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 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, 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.

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.

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 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 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'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.

    • For Blocked words – Define blocked words for the application. The application 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.

  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