Retriever
Source:
src/AWS/QBusiness/Retriever.ts
An Amazon Q Business retriever — the query engine that fetches relevant passages from an index (native or Kendra) to ground chat responses.
Creating Retrievers
Section titled “Creating Retrievers”Native Index Retriever
import * as AWS from "alchemy/AWS";
const retriever = yield* AWS.QBusiness.Retriever("Docs", { applicationId: app.applicationId, type: "NATIVE_INDEX", configuration: { nativeIndexConfiguration: { indexId: index.indexId }, },});Kendra Index Retriever
const retriever = yield* AWS.QBusiness.Retriever("Kendra", { applicationId: app.applicationId, type: "KENDRA_INDEX", roleArn: role.roleArn, configuration: { kendraIndexConfiguration: { indexId: kendraIndex.id }, },});