Retrieve
Source:
src/AWS/Kendra/Retrieve.ts
Runtime binding for the Retrieve operation (IAM action
kendra:Retrieve), scoped to one Index.
Retrieves up to 100 semantically-relevant passages (200-token excerpts)
from the index — the building block for retrieval-augmented generation
(RAG) over documents synced into Kendra.
Provide the implementation with
Effect.provide(AWS.Kendra.RetrieveHttp).
Querying an Index
Section titled “Querying an Index”const retrieve = yield* AWS.Kendra.Retrieve(index);
const passages = yield* retrieve({ QueryText: "vacation policy" });const context = (passages.ResultItems ?? []) .map((item) => item.Content) .join("\n");