kendra / Client / submit_feedback

submit_feedback#

kendra.Client.submit_feedback(**kwargs)#

Enables you to provide feedback to Amazon Kendra to improve the performance of your index.

SubmitFeedback is currently not supported in the Amazon Web Services GovCloud (US-West) region.

See also: AWS API Documentation

Request Syntax

response = client.submit_feedback(
    IndexId='string',
    QueryId='string',
    ClickFeedbackItems=[
        {
            'ResultId': 'string',
            'ClickTime': datetime(2015, 1, 1)
        },
    ],
    RelevanceFeedbackItems=[
        {
            'ResultId': 'string',
            'RelevanceValue': 'RELEVANT'|'NOT_RELEVANT'
        },
    ]
)
Parameters:
  • IndexId (string) –

    [REQUIRED]

    The identifier of the index that was queried.

  • QueryId (string) –

    [REQUIRED]

    The identifier of the specific query for which you are submitting feedback. The query ID is returned in the response to the Query API.

  • ClickFeedbackItems (list) –

    Tells Amazon Kendra that a particular search result link was chosen by the user.

    • (dict) –

      Gathers information about when a particular result was clicked by a user. Your application uses the SubmitFeedback API to provide click information.

      • ResultId (string) – [REQUIRED]

        The identifier of the search result that was clicked.

      • ClickTime (datetime) – [REQUIRED]

        The Unix timestamp when the result was clicked.

  • RelevanceFeedbackItems (list) –

    Provides Amazon Kendra with relevant or not relevant feedback for whether a particular item was relevant to the search.

    • (dict) –

      Provides feedback on how relevant a document is to a search. Your application uses the SubmitFeedback API to provide relevance information.

      • ResultId (string) – [REQUIRED]

        The identifier of the search result that the user provided relevance feedback for.

      • RelevanceValue (string) – [REQUIRED]

        Whether the document was relevant or not relevant to the search.

Returns:

None

Exceptions

  • kendra.Client.exceptions.ValidationException

  • kendra.Client.exceptions.ResourceUnavailableException

  • kendra.Client.exceptions.ResourceNotFoundException

  • kendra.Client.exceptions.ThrottlingException

  • kendra.Client.exceptions.AccessDeniedException

  • kendra.Client.exceptions.InternalServerException