Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Query a knowledge base connected to an Amazon Kendra GenAI index

Focus mode
Query a knowledge base connected to an Amazon Kendra GenAI index - Amazon Bedrock

You can query a knowledge base that uses an Amazon Kendra GenAI index, and return only relevant text from data sources. For this query, send a Retrieve request with an Agents for Amazon Bedrock runtime endpoint, like with a standard knowledge base.

The structure of a response returned from a knowledge base with an Amazon Kendra GenAI index is the same as a standard KnowledgeBaseRetrievalResult. However, the response also includes a few additional fields from Amazon Kendra.

The following table describes the fields from Amazon Kendra that you might see in a returned response. Amazon Bedrock gets these fields from the Amazon Kendra response. If that response doesn't contain these fields, then the returned query result from Amazon Bedrock won't have these fields either.

Field Description

x-amz-kendra-document-title

The title of the returned document.

x-amz-kendra-score-confidence

A relative ranking of how relevant the response is to the query. Possible values are VERY_HIGH, HIGH, MEDIUM, LOW, and NOT_AVAILABLE.

x-amz-kendra-passage-id

The ID of the returned passage.

x-amz-kendra-document-id

The ID of the returned document.

DocumentAttributes

Document attributes or metadata fields from Amazon Kendra. The returned query result from the knowledge base stores these as metadata key-value pairs. You can filter the results with metadata filtering from Amazon Bedrock. For more information, see DocumentAttribute.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.