Amazon Kendra will no longer be open to new customers starting on July 30, 2026. If you would like to use the service, please sign up prior to July 30. For capabilities similar to Amazon Kendra, explore Amazon Bedrock Knowledge Bases. Learn more.
Using the Amazon Kendra API to submit feedback
To use the Amazon Kendra API to submit query feedback, use the SubmitFeedback API. To identify the query, you supply the index ID of the index that the query applies to, and the query ID returned in the response from the Query API.
The following example shows how to submit click and relevance feedback using the
Amazon Kendra API. You can submit multiple sets of feedback through the
ClickFeedbackItems and RelevanceFeedbackItems arrays. This
example submits a single click and a single relevance feedback item. The feedback
submittal uses the current time.
To submit feedback for a search (AWS SDK)
-
You can use the following example code with the required values:
-
index id—The ID of the index that the query applies to. -
query id—The query that you want to provide feedback on. -
result id—The ID of the query result that you want to provide feedback on. The query response contains the result ID. -
relevance value—EitherRELEVANT(the query result is relevant) orNOT_RELEVANT(the query result is not relevant).
-
-
Run the code. After the feedback has been submitted, the code displays a message.