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