Smaws_Client_Kendra.Retrieve
val request :
Smaws_Lib.Context.t ->
retrieve_request ->
(retrieve_result,
[> Smaws_Lib.Protocols.AwsJson.error
| `AccessDeniedException of access_denied_exception
| `ConflictException of conflict_exception
| `InternalServerException of internal_server_exception
| `ResourceNotFoundException of resource_not_found_exception
| `ServiceQuotaExceededException of service_quota_exceeded_exception
| `ThrottlingException of throttling_exception
| `ValidationException of validation_exception ])
Stdlib.result
Retrieves relevant passages or text excerpts given an input query.
This API is similar to the Query API. However, by default, the Query
API only returns excerpt passages of up to 100 token words. With the Retrieve
API, you can retrieve longer passages of up to 200 token words and up to 100 semantically relevant passages. This doesn't include question-answer or FAQ type responses from your index. The passages are text excerpts that can be semantically extracted from multiple documents and multiple parts of the same document. If in extreme cases your documents produce zero passages using the Retrieve
API, you can alternatively use the Query
API and its types of responses.
You can also do the following:
View the confidence score bucket for a retrieved passage result. The confidence bucket provides a relative ranking that indicates how confident Amazon Kendra is that the response is relevant to the query.
Confidence score buckets are currently available only for English.
You can also include certain fields in the response that might provide useful additional information.
The Retrieve
API shares the number of query capacity units that you set for your index. For more information on what's included in a single capacity unit and the default base capacity for an index, see Adjusting capacity.