Skip to content

VectorRetriever

Retriever backed by vector similarity search.

Embeds the query using the provided Embedder, then queries the VectorStore for the most similar entries.

new VectorRetriever(options): VectorRetriever;
Parameter Type

options

VectorRetrieverOptions

VectorRetriever

retrieve(query, options?): Promise<RetrievalResult[]>;

Retrieve relevant content for a query.

Parameter Type

query

string

options?

RetrievalOptions

Promise<RetrievalResult[]>

Retriever.retrieve