Defines the filter type used in search and delete operations. Can be an object for structured conditions or a string for simpler filtering.
Instance of EmbeddingsInterface
used to generate vector embeddings for
documents, enabling vector-based search operations.
Adds an array of documents to the vector store.
An array of documents to be embedded and stored in the vector store.
Optional
options: AddDocumentOptionsOptional configurations for embedding and storage operations.
A promise that resolves to an array of document IDs or void, depending on implementation.
Adds precomputed vectors and their corresponding documents to the vector store.
An array of vectors, with each vector representing a document.
An array of DocumentInterface
instances corresponding to each vector.
Optional
options: AddDocumentOptionsOptional configurations for adding documents, potentially covering indexing or metadata handling.
A promise that resolves to an array of document IDs or void, depending on implementation.
Converts the vector store into a retriever, making it suitable for use in retrieval-based workflows and allowing additional configuration.
Optional
kOrFields: number | Partial<VectorStoreRetrieverInput<VectorStoreInterface>>Optional parameter for specifying either the number of documents to retrieve or partial retriever configurations.
Optional
filter: string | objectOptional filter based on FilterType
for retrieval restriction.
Optional
callbacks: CallbacksOptional callbacks for tracking retrieval events or progress.
Optional
tags: string[]General-purpose tags to add contextual information to the retriever.
Optional
metadata: Record<string, unknown>General-purpose metadata providing additional context for retrieval.
Optional
verbose: booleanIf true
, enables detailed logging during retrieval.
An instance of VectorStoreRetriever
configured with the specified options.
Deletes documents from the vector store based on the specified parameters.
Optional
_params: Record<string, any>A flexible object containing key-value pairs that define the conditions for selecting documents to delete.
A promise that resolves once the deletion operation is complete.
Optional
maxReturn documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.
Text to look up documents similar to.
Searches for documents similar to a text query, embedding the query and retrieving documents based on vector similarity.
The text query to search for.
Optional
k: numberOptional number of similar documents to return.
Optional
filter: string | objectOptional filter based on FilterType
to restrict results.
Optional
callbacks: CallbacksOptional callbacks for tracking progress or events during the search process.
A promise that resolves to an array of DocumentInterface
instances representing similar documents.
Searches for documents similar to a given vector query and returns them with similarity scores.
A vector representing the query for similarity search.
The number of similar documents to return.
Optional
filter: string | objectOptional filter based on FilterType
to restrict results.
A promise that resolves to an array of tuples, each containing a
DocumentInterface
and its corresponding similarity score.
Searches for documents similar to a text query and includes similarity scores in the result.
The text query to search for.
Optional
k: numberOptional number of similar documents to return.
Optional
filter: string | objectOptional filter based on FilterType
to restrict results.
Optional
callbacks: CallbacksOptional callbacks for tracking progress or events during the search process.
A promise that resolves to an array of tuples, each containing
a DocumentInterface
and its similarity score.
Interface defining the structure and operations of a vector store, which facilitates the storage, retrieval, and similarity search of document vectors.
VectorStoreInterface
provides methods for adding, deleting, and searching documents based on vector embeddings, including support for similarity search with optional filtering and relevance-based retrieval.