Increase Kendra DocumentExcerpt Size

0

I am currently struggling with the smaller documentexcerpt limit of 200. I am looking to increase the documentexcerpt limit in the Retrieve API to a larger number. Any pointers will be appreciated.

asked 14 days ago19 views
1 Answer
1

To address your need for larger document excerpts in Amazon Kendra, you have a couple of options:

  1. Use the Retrieve API: The Retrieve API is specifically designed for use cases requiring longer passages, such as working with large language models (LLMs) or implementing retrieval augmented generation (RAG) systems. This API can return longer semantically relevant passages, up to 200 token words and up to 100 semantically relevant passages. This is in contrast to the Query API, which by default only returns up to 100 token word excerpts.

  2. Request a limit increase: If you believe your use case justifies it, you can contact AWS Support to request an increase in the document excerpt size limit. However, it's important to note that AWS Kendra's default limits are typically set for performance and reliability reasons, so increasing these limits might not always be feasible or advisable.

  3. Consider refining your query: If you're consistently getting very large result sets, you might want to review your query strategy. Consider using more specific queries or implementing filters to return a more focused set of results. This can help in getting more relevant excerpts within the current limits.

  4. Review your indexing configuration: Ensure that your documents are being properly indexed so that the most relevant portions are being captured and returned in search results.

Remember, while it's natural to want longer excerpts, the current limits are often sufficient for most use cases. If you find you need more context, you can always retrieve the full document based on the excerpt provided.

If you decide to pursue a limit increase, be prepared to explain your specific use case to AWS Support, as they will need to understand why the current limits are insufficient for your needs.
Sources
Retrieve - Amazon Kendra API Reference
Kendra search limitation | AWS re:Post
Query - Amazon Kendra API Reference

profile picture
answered 14 days ago
profile picture
EXPERT
reviewed 13 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions