capabilities.work

Retrieve Passages for RAG

A 2-step recipe with Amazon Kendra. We can help you get access.

Recipe · 2 steps

Retrieve Passages for RAG

Retrieve passages and run a ranked query for the same question.

  1. Retrieve the most relevant text passages for the input question for use as grounding context in a RAG prompt.
  2. Run a standard ranked query for the same question to capture extractive answers and ranked document results alongside the retrieved passages.
What you'll need to have ready
  • indexId: The identifier of the index to retrieve from.
  • queryText: The question to retrieve passages and ranked results for.
  • attributeFilter: Optional attribute filter to scope results.
  • pageSize: Optional number of results per page.
For your developer

Arazzo workflow amazon-kendra:retrieve-passages-for-rag, 2 operations: Retrieve → Query. Specs on APIs.io.