QBusiness

2025/04/10 - QBusiness - 3 updated api methods

Changes  Adds functionality to enable/disable a new Q Business Hallucination Reduction feature. If enabled, Q Business will detect and attempt to remove Hallucinations from certain Chat requests.

Chat (updated) Link ¶
Changes (response)
{'outputStream': {'textEvent': {'systemMessageType': 'RESPONSE | '
                                                     'GROUNDED_RESPONSE'}}}

Starts or continues a streaming Amazon Q Business conversation.

See also: AWS API Documentation

Request Syntax

client.chat(
    applicationId='string',
    userId='string',
    userGroups=[
        'string',
    ],
    conversationId='string',
    parentMessageId='string',
    clientToken='string',
    inputStream={...}
)
type applicationId:

string

param applicationId:

[REQUIRED]

The identifier of the Amazon Q Business application linked to a streaming Amazon Q Business conversation.

type userId:

string

param userId:

The identifier of the user attached to the chat input.

type userGroups:

list

param userGroups:

The group names that a user associated with the chat input belongs to.

  • (string) --

type conversationId:

string

param conversationId:

The identifier of the Amazon Q Business conversation.

type parentMessageId:

string

param parentMessageId:

The identifier used to associate a user message with a AI generated response.

type clientToken:

string

param clientToken:

A token that you provide to identify the chat input.

This field is autopopulated if not provided.

type inputStream:

dict

param inputStream:

The streaming input for the Chat API.

rtype:

dict

returns:

The response of this operation contains an :class:`.EventStream` member. When iterated the :class:`.EventStream` will yield events based on the structure below, where only one of the top level keys will be present for any given event.

Response Syntax

{
    'outputStream': EventStream({
        'textEvent': {
            'systemMessageType': 'RESPONSE'|'GROUNDED_RESPONSE',
            'conversationId': 'string',
            'userMessageId': 'string',
            'systemMessageId': 'string',
            'systemMessage': 'string'
        },
        'metadataEvent': {
            'conversationId': 'string',
            'userMessageId': 'string',
            'systemMessageId': 'string',
            'sourceAttributions': [
                {
                    'title': 'string',
                    'snippet': 'string',
                    'url': 'string',
                    'citationNumber': 123,
                    'updatedAt': datetime(2015, 1, 1),
                    'textMessageSegments': [
                        {
                            'beginOffset': 123,
                            'endOffset': 123,
                            'snippetExcerpt': {
                                'text': 'string'
                            },
                            'mediaId': 'string',
                            'mediaMimeType': 'string',
                            'sourceDetails': {
                                'imageSourceDetails': {
                                    'mediaId': 'string',
                                    'mediaMimeType': 'string'
                                },
                                'audioSourceDetails': {
                                    'mediaId': 'string',
                                    'mediaMimeType': 'string',
                                    'startTimeMilliseconds': 123,
                                    'endTimeMilliseconds': 123,
                                    'audioExtractionType': 'TRANSCRIPT'|'SUMMARY'
                                },
                                'videoSourceDetails': {
                                    'mediaId': 'string',
                                    'mediaMimeType': 'string',
                                    'startTimeMilliseconds': 123,
                                    'endTimeMilliseconds': 123,
                                    'videoExtractionType': 'TRANSCRIPT'|'SUMMARY'
                                }
                            }
                        },
                    ]
                },
            ],
            'finalTextMessage': 'string'
        },
        'actionReviewEvent': {
            'conversationId': 'string',
            'userMessageId': 'string',
            'systemMessageId': 'string',
            'pluginId': 'string',
            'pluginType': 'SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK'|'CUSTOM'|'QUICKSIGHT'|'SERVICENOW_NOW_PLATFORM'|'JIRA_CLOUD'|'SALESFORCE_CRM'|'ZENDESK_SUITE'|'ATLASSIAN_CONFLUENCE'|'GOOGLE_CALENDAR'|'MICROSOFT_TEAMS'|'MICROSOFT_EXCHANGE'|'PAGERDUTY_ADVANCE'|'SMARTSHEET'|'ASANA',
            'payload': {
                'string': {
                    'displayName': 'string',
                    'displayOrder': 123,
                    'displayDescription': 'string',
                    'type': 'STRING'|'NUMBER'|'ARRAY'|'BOOLEAN',
                    'value': {...}|[...]|123|123.4|'string'|True|None,
                    'allowedValues': [
                        {
                            'value': {...}|[...]|123|123.4|'string'|True|None,
                            'displayValue': {...}|[...]|123|123.4|'string'|True|None
                        },
                    ],
                    'allowedFormat': 'string',
                    'arrayItemJsonSchema': {...}|[...]|123|123.4|'string'|True|None,
                    'required': True|False
                }
            },
            'payloadFieldNameSeparator': 'string'
        },
        'failedAttachmentEvent': {
            'conversationId': 'string',
            'userMessageId': 'string',
            'systemMessageId': 'string',
            'attachment': {
                'name': 'string',
                'status': 'FAILED'|'SUCCESS',
                'error': {
                    'errorMessage': 'string',
                    'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound'
                },
                'attachmentId': 'string',
                'conversationId': 'string'
            }
        },
        'authChallengeRequestEvent': {
            'authorizationUrl': 'string'
        }
    })
}

Response Structure

  • (dict) --

    • outputStream (:class:`.EventStream`) --

      The streaming output for the Chat API.

      • textEvent (dict) --

        Information about the payload of the ChatOutputStream event containing the AI-generated message output.

        • systemMessageType (string) --

          The type of AI-generated message in a TextOutputEvent. Amazon Q Business currently supports two types of messages:

          • RESPONSE - The Amazon Q Business system response.

          • GROUNDED_RESPONSE - The corrected, hallucination-reduced, response returned by Amazon Q Business. Available only if hallucination reduction is supported and configured for the application and detected in the end user chat query by Amazon Q Business.

        • conversationId (string) --

          The identifier of the conversation with which the text output event is associated.

        • userMessageId (string) --

          The identifier of an end user message in a TextOutputEvent.

        • systemMessageId (string) --

          The identifier of an AI-generated message in a TextOutputEvent.

        • systemMessage (string) --

          An AI-generated message in a TextOutputEvent.

      • metadataEvent (dict) --

        A metadata event for a AI-generated text output message in a Amazon Q Business conversation.

        • conversationId (string) --

          The identifier of the conversation with which the generated metadata is associated.

        • userMessageId (string) --

          The identifier of an Amazon Q Business end user text input message within the conversation.

        • systemMessageId (string) --

          The identifier of an Amazon Q Business AI generated message within the conversation.

        • sourceAttributions (list) --

          The source documents used to generate the conversation response.

          • (dict) --

            The documents used to generate an Amazon Q Business web experience response.

            • title (string) --

              The title of the document which is the source for the Amazon Q Business generated response.

            • snippet (string) --

              The content extract from the document on which the generated response is based.

            • url (string) --

              The URL of the document which is the source for the Amazon Q Business generated response.

            • citationNumber (integer) --

              The number attached to a citation in an Amazon Q Business generated response.

            • updatedAt (datetime) --

              The Unix timestamp when the Amazon Q Business application was last updated.

            • textMessageSegments (list) --

              A text extract from a source document that is used for source attribution.

              • (dict) --

                Provides information about a text extract in a chat response that can be attributed to a source document.

                • beginOffset (integer) --

                  The zero-based location in the response string where the source attribution starts.

                • endOffset (integer) --

                  The zero-based location in the response string where the source attribution ends.

                • snippetExcerpt (dict) --

                  The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response.

                  • text (string) --

                    The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q chat response.

                • mediaId (string) --

                  The identifier of the media object associated with the text segment in the source attribution.

                • mediaMimeType (string) --

                  The MIME type (image/png) of the media object associated with the text segment in the source attribution.

                • sourceDetails (dict) --

                  Source information for a segment of extracted text, including its media type.

                  • imageSourceDetails (dict) --

                    Details specific to image content within the source.

                    • mediaId (string) --

                      Unique identifier for the image file.

                    • mediaMimeType (string) --

                      The MIME type of the image file.

                  • audioSourceDetails (dict) --

                    Details specific to audio content within the source.

                    • mediaId (string) --

                      Unique identifier for the audio media file.

                    • mediaMimeType (string) --

                      The MIME type of the audio file (e.g., audio/mp3, audio/wav).

                    • startTimeMilliseconds (integer) --

                      The starting timestamp in milliseconds for the relevant audio segment.

                    • endTimeMilliseconds (integer) --

                      The ending timestamp in milliseconds for the relevant audio segment.

                    • audioExtractionType (string) --

                      The type of audio extraction performed on the content.

                  • videoSourceDetails (dict) --

                    Details specific to video content within the source.

                    • mediaId (string) --

                      Unique identifier for the video media file.

                    • mediaMimeType (string) --

                      The MIME type of the video file (e.g., video/mp4, video/avi).

                    • startTimeMilliseconds (integer) --

                      The starting timestamp in milliseconds for the relevant video segment.

                    • endTimeMilliseconds (integer) --

                      The ending timestamp in milliseconds for the relevant video segment.

                    • videoExtractionType (string) --

                      The type of video extraction performed on the content.

        • finalTextMessage (string) --

          The final text output message generated by the system.

      • actionReviewEvent (dict) --

        A request from Amazon Q Business to the end user for information Amazon Q Business needs to successfully complete a requested plugin action.

        • conversationId (string) --

          The identifier of the conversation with which the action review event is associated.

        • userMessageId (string) --

          The identifier of the conversation with which the plugin action is associated.

        • systemMessageId (string) --

          The identifier of an Amazon Q Business AI generated associated with the action review event.

        • pluginId (string) --

          The identifier of the plugin associated with the action review event.

        • pluginType (string) --

          The type of plugin.

        • payload (dict) --

          Field values that an end user needs to provide to Amazon Q Business for Amazon Q Business to perform the requested plugin action.

          • (string) --

            • (dict) --

              A user input field in an plugin action review payload.

              • displayName (string) --

                The name of the field.

              • displayOrder (integer) --

                The display order of fields in a payload.

              • displayDescription (string) --

                The field level description of each action review input field. This could be an explanation of the field. In the Amazon Q Business web experience, these descriptions could be used to display as tool tips to help users understand the field.

              • type (string) --

                The type of field.

              • value (:ref:`document<document>`) --

                The field value.

              • allowedValues (list) --

                Information about the field values that an end user can use to provide to Amazon Q Business for Amazon Q Business to perform the requested plugin action.

                • (dict) --

                  Information about the field values that an end user can use to provide to Amazon Q Business for Amazon Q Business to perform the requested plugin action.

                  • value (:ref:`document<document>`) --

                    The field value.

                  • displayValue (:ref:`document<document>`) --

                    The name of the field.

              • allowedFormat (string) --

                The expected data format for the action review input field value. For example, in PTO request, from and to would be of datetime allowed format.

              • arrayItemJsonSchema (:ref:`document<document>`) --

                Use to create a custom form with array fields (fields with nested objects inside an array).

              • required (boolean) --

                Information about whether the field is required.

        • payloadFieldNameSeparator (string) --

          A string used to retain information about the hierarchical contexts within an action review event payload.

      • failedAttachmentEvent (dict) --

        A failed file upload event during a web experience chat.

        • conversationId (string) --

          The identifier of the conversation associated with the failed file upload.

        • userMessageId (string) --

          The identifier of the end user chat message associated with the file upload.

        • systemMessageId (string) --

          The identifier of the AI-generated message associated with the file upload.

        • attachment (dict) --

          The details of a file uploaded during chat.

          • name (string) --

            The name of a file uploaded during chat.

          • status (string) --

            The status of a file uploaded during chat.

          • error (dict) --

            An error associated with a file uploaded during chat.

            • errorMessage (string) --

              The message explaining the Amazon Q Business request error.

            • errorCode (string) --

              The code associated with the Amazon Q Business request error.

          • attachmentId (string) --

            The unique identifier of the Amazon Q Business attachment.

          • conversationId (string) --

            The unique identifier of the Amazon Q Business conversation.

      • authChallengeRequestEvent (dict) --

        An authentication verification event activated by an end user request to use a custom plugin.

        • authorizationUrl (string) --

          The URL sent by Amazon Q Business to a third party authentication server in response to an authentication verification event activated by an end user request to use a custom plugin.

GetChatControlsConfiguration (updated) Link ¶
Changes (response)
{'hallucinationReductionConfiguration': {'hallucinationReductionControl': 'ENABLED '
                                                                          '| '
                                                                          'DISABLED'}}

Gets information about chat controls configured for an existing Amazon Q Business application.

See also: AWS API Documentation

Request Syntax

client.get_chat_controls_configuration(
    applicationId='string',
    maxResults=123,
    nextToken='string'
)
type applicationId:

string

param applicationId:

[REQUIRED]

The identifier of the application for which the chat controls are configured.

type maxResults:

integer

param maxResults:

The maximum number of configured chat controls to return.

type nextToken:

string

param nextToken:

If the maxResults response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q Business chat controls configured.

rtype:

dict

returns:

Response Syntax

{
    'responseScope': 'ENTERPRISE_CONTENT_ONLY'|'EXTENDED_KNOWLEDGE_ENABLED',
    'orchestrationConfiguration': {
        'control': 'ENABLED'|'DISABLED'
    },
    'blockedPhrases': {
        'blockedPhrases': [
            'string',
        ],
        'systemMessageOverride': 'string'
    },
    'topicConfigurations': [
        {
            'name': 'string',
            'description': 'string',
            'exampleChatMessages': [
                'string',
            ],
            'rules': [
                {
                    'includedUsersAndGroups': {
                        'userIds': [
                            'string',
                        ],
                        'userGroups': [
                            'string',
                        ]
                    },
                    'excludedUsersAndGroups': {
                        'userIds': [
                            'string',
                        ],
                        'userGroups': [
                            'string',
                        ]
                    },
                    'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE',
                    'ruleConfiguration': {
                        'contentBlockerRule': {
                            'systemMessageOverride': 'string'
                        },
                        'contentRetrievalRule': {
                            'eligibleDataSources': [
                                {
                                    'indexId': 'string',
                                    'dataSourceId': 'string'
                                },
                            ]
                        }
                    }
                },
            ]
        },
    ],
    'creatorModeConfiguration': {
        'creatorModeControl': 'ENABLED'|'DISABLED'
    },
    'nextToken': 'string',
    'hallucinationReductionConfiguration': {
        'hallucinationReductionControl': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) --

    • responseScope (string) --

      The response scope configured for a Amazon Q Business application. This determines whether your application uses its retrieval augmented generation (RAG) system to generate answers only from your enterprise data, or also uses the large language models (LLM) knowledge to respons to end user questions in chat.

    • orchestrationConfiguration (dict) --

      The chat response orchestration settings for your application.

      • control (string) --

        Information about whether chat orchestration is enabled or disabled for an Amazon Q Business application.

    • blockedPhrases (dict) --

      The phrases blocked from chat by your chat control configuration.

      • blockedPhrases (list) --

        A list of phrases blocked from a Amazon Q Business web experience chat.

        • (string) --

      • systemMessageOverride (string) --

        The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.

    • topicConfigurations (list) --

      The topic specific controls configured for a Amazon Q Business application.

      • (dict) --

        The topic specific controls configured for an Amazon Q Business application.

        • name (string) --

          A name for your topic control configuration.

        • description (string) --

          A description for your topic control configuration. Use this to outline how the large language model (LLM) should use this topic control configuration.

        • exampleChatMessages (list) --

          A list of example phrases that you expect the end user to use in relation to the topic.

          • (string) --

        • rules (list) --

          Rules defined for a topic configuration.

          • (dict) --

            Guardrail rules for an Amazon Q Business application. Amazon Q Business supports only one rule at a time.

            • includedUsersAndGroups (dict) --

              Users and groups to be included in a rule.

              • userIds (list) --

                The user ids associated with a topic control rule.

                • (string) --

              • userGroups (list) --

                The user group names associated with a topic control rule.

                • (string) --

            • excludedUsersAndGroups (dict) --

              Users and groups to be excluded from a rule.

              • userIds (list) --

                The user ids associated with a topic control rule.

                • (string) --

              • userGroups (list) --

                The user group names associated with a topic control rule.

                • (string) --

            • ruleType (string) --

              The type of rule.

            • ruleConfiguration (dict) --

              The configuration information for a rule.

              • contentBlockerRule (dict) --

                A rule for configuring how Amazon Q Business responds when it encounters a a blocked topic.

                • systemMessageOverride (string) --

                  The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.

              • contentRetrievalRule (dict) --

                Rules for retrieving content from data sources connected to a Amazon Q Business application for a specific topic control configuration.

                • eligibleDataSources (list) --

                  Specifies data sources in a Amazon Q Business application to use for content generation.

                  • (dict) --

                    The identifier of the data source Amazon Q Business will generate responses from.

                    • indexId (string) --

                      The identifier of the index the data source is attached to.

                    • dataSourceId (string) --

                      The identifier of the data source.

    • creatorModeConfiguration (dict) --

      The configuration details for CREATOR_MODE.

      • creatorModeControl (string) --

        Information about whether creator mode is enabled or disabled for an Amazon Q Business application.

    • nextToken (string) --

      If the maxResults response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q Business chat controls configured.

    • hallucinationReductionConfiguration (dict) --

      The hallucination reduction settings for your application.

      • hallucinationReductionControl (string) --

        Controls whether hallucination reduction has been enabled or disabled for your application. The default status is DISABLED.

UpdateChatControlsConfiguration (updated) Link ¶
Changes (request)
{'hallucinationReductionConfiguration': {'hallucinationReductionControl': 'ENABLED '
                                                                          '| '
                                                                          'DISABLED'}}

Updates a set of chat controls configured for an existing Amazon Q Business application.

See also: AWS API Documentation

Request Syntax

client.update_chat_controls_configuration(
    applicationId='string',
    clientToken='string',
    responseScope='ENTERPRISE_CONTENT_ONLY'|'EXTENDED_KNOWLEDGE_ENABLED',
    orchestrationConfiguration={
        'control': 'ENABLED'|'DISABLED'
    },
    blockedPhrasesConfigurationUpdate={
        'blockedPhrasesToCreateOrUpdate': [
            'string',
        ],
        'blockedPhrasesToDelete': [
            'string',
        ],
        'systemMessageOverride': 'string'
    },
    topicConfigurationsToCreateOrUpdate=[
        {
            'name': 'string',
            'description': 'string',
            'exampleChatMessages': [
                'string',
            ],
            'rules': [
                {
                    'includedUsersAndGroups': {
                        'userIds': [
                            'string',
                        ],
                        'userGroups': [
                            'string',
                        ]
                    },
                    'excludedUsersAndGroups': {
                        'userIds': [
                            'string',
                        ],
                        'userGroups': [
                            'string',
                        ]
                    },
                    'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE',
                    'ruleConfiguration': {
                        'contentBlockerRule': {
                            'systemMessageOverride': 'string'
                        },
                        'contentRetrievalRule': {
                            'eligibleDataSources': [
                                {
                                    'indexId': 'string',
                                    'dataSourceId': 'string'
                                },
                            ]
                        }
                    }
                },
            ]
        },
    ],
    topicConfigurationsToDelete=[
        {
            'name': 'string',
            'description': 'string',
            'exampleChatMessages': [
                'string',
            ],
            'rules': [
                {
                    'includedUsersAndGroups': {
                        'userIds': [
                            'string',
                        ],
                        'userGroups': [
                            'string',
                        ]
                    },
                    'excludedUsersAndGroups': {
                        'userIds': [
                            'string',
                        ],
                        'userGroups': [
                            'string',
                        ]
                    },
                    'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE',
                    'ruleConfiguration': {
                        'contentBlockerRule': {
                            'systemMessageOverride': 'string'
                        },
                        'contentRetrievalRule': {
                            'eligibleDataSources': [
                                {
                                    'indexId': 'string',
                                    'dataSourceId': 'string'
                                },
                            ]
                        }
                    }
                },
            ]
        },
    ],
    creatorModeConfiguration={
        'creatorModeControl': 'ENABLED'|'DISABLED'
    },
    hallucinationReductionConfiguration={
        'hallucinationReductionControl': 'ENABLED'|'DISABLED'
    }
)
type applicationId:

string

param applicationId:

[REQUIRED]

The identifier of the application for which the chat controls are configured.

type clientToken:

string

param clientToken:

A token that you provide to identify the request to update a Amazon Q Business application chat configuration.

This field is autopopulated if not provided.

type responseScope:

string

param responseScope:

The response scope configured for your application. This determines whether your application uses its retrieval augmented generation (RAG) system to generate answers only from your enterprise data, or also uses the large language models (LLM) knowledge to respons to end user questions in chat.

type orchestrationConfiguration:

dict

param orchestrationConfiguration:

The chat response orchestration settings for your application.

  • control (string) -- [REQUIRED]

    Status information about whether chat orchestration is activated or deactivated for your Amazon Q Business application.

type blockedPhrasesConfigurationUpdate:

dict

param blockedPhrasesConfigurationUpdate:

The phrases blocked from chat by your chat control configuration.

  • blockedPhrasesToCreateOrUpdate (list) --

    Creates or updates a blocked phrases configuration in your Amazon Q Business application.

    • (string) --

  • blockedPhrasesToDelete (list) --

    Deletes a blocked phrases configuration in your Amazon Q Business application.

    • (string) --

  • systemMessageOverride (string) --

    The configured custom message displayed to your end user when they use blocked phrase during chat.

type topicConfigurationsToCreateOrUpdate:

list

param topicConfigurationsToCreateOrUpdate:

The configured topic specific chat controls you want to update.

  • (dict) --

    The topic specific controls configured for an Amazon Q Business application.

    • name (string) -- [REQUIRED]

      A name for your topic control configuration.

    • description (string) --

      A description for your topic control configuration. Use this to outline how the large language model (LLM) should use this topic control configuration.

    • exampleChatMessages (list) --

      A list of example phrases that you expect the end user to use in relation to the topic.

      • (string) --

    • rules (list) -- [REQUIRED]

      Rules defined for a topic configuration.

      • (dict) --

        Guardrail rules for an Amazon Q Business application. Amazon Q Business supports only one rule at a time.

        • includedUsersAndGroups (dict) --

          Users and groups to be included in a rule.

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

          • userGroups (list) --

            The user group names associated with a topic control rule.

            • (string) --

        • excludedUsersAndGroups (dict) --

          Users and groups to be excluded from a rule.

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

          • userGroups (list) --

            The user group names associated with a topic control rule.

            • (string) --

        • ruleType (string) -- [REQUIRED]

          The type of rule.

        • ruleConfiguration (dict) --

          The configuration information for a rule.

          • contentBlockerRule (dict) --

            A rule for configuring how Amazon Q Business responds when it encounters a a blocked topic.

            • systemMessageOverride (string) --

              The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.

          • contentRetrievalRule (dict) --

            Rules for retrieving content from data sources connected to a Amazon Q Business application for a specific topic control configuration.

            • eligibleDataSources (list) --

              Specifies data sources in a Amazon Q Business application to use for content generation.

              • (dict) --

                The identifier of the data source Amazon Q Business will generate responses from.

                • indexId (string) --

                  The identifier of the index the data source is attached to.

                • dataSourceId (string) --

                  The identifier of the data source.

type topicConfigurationsToDelete:

list

param topicConfigurationsToDelete:

The configured topic specific chat controls you want to delete.

  • (dict) --

    The topic specific controls configured for an Amazon Q Business application.

    • name (string) -- [REQUIRED]

      A name for your topic control configuration.

    • description (string) --

      A description for your topic control configuration. Use this to outline how the large language model (LLM) should use this topic control configuration.

    • exampleChatMessages (list) --

      A list of example phrases that you expect the end user to use in relation to the topic.

      • (string) --

    • rules (list) -- [REQUIRED]

      Rules defined for a topic configuration.

      • (dict) --

        Guardrail rules for an Amazon Q Business application. Amazon Q Business supports only one rule at a time.

        • includedUsersAndGroups (dict) --

          Users and groups to be included in a rule.

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

          • userGroups (list) --

            The user group names associated with a topic control rule.

            • (string) --

        • excludedUsersAndGroups (dict) --

          Users and groups to be excluded from a rule.

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

          • userGroups (list) --

            The user group names associated with a topic control rule.

            • (string) --

        • ruleType (string) -- [REQUIRED]

          The type of rule.

        • ruleConfiguration (dict) --

          The configuration information for a rule.

          • contentBlockerRule (dict) --

            A rule for configuring how Amazon Q Business responds when it encounters a a blocked topic.

            • systemMessageOverride (string) --

              The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.

          • contentRetrievalRule (dict) --

            Rules for retrieving content from data sources connected to a Amazon Q Business application for a specific topic control configuration.

            • eligibleDataSources (list) --

              Specifies data sources in a Amazon Q Business application to use for content generation.

              • (dict) --

                The identifier of the data source Amazon Q Business will generate responses from.

                • indexId (string) --

                  The identifier of the index the data source is attached to.

                • dataSourceId (string) --

                  The identifier of the data source.

type creatorModeConfiguration:

dict

param creatorModeConfiguration:

The configuration details for CREATOR_MODE.

  • creatorModeControl (string) -- [REQUIRED]

    Status information about whether CREATOR_MODE has been enabled or disabled. The default status is DISABLED.

type hallucinationReductionConfiguration:

dict

param hallucinationReductionConfiguration:

The hallucination reduction settings for your application.

  • hallucinationReductionControl (string) --

    Controls whether hallucination reduction has been enabled or disabled for your application. The default status is DISABLED.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --