Constructs a new RocksetStore
Object used to embed queries and page content
Embeddings interface for generating vector embeddings from text queries, enabling vector-based similarity searches.
Optional
filterAdds vectors to the store given their corresponding Documents
The vectors to store
The Documents they represent
The _id's of the added documents
Creates a VectorStoreRetriever
instance with flexible configuration options.
Optional
kOrFields: number | Partial<VectorStoreRetrieverInput<RocksetStore>>If a number is provided, it sets the k
parameter (number of items to retrieve).
Optional
filter: stringOptional filter criteria to limit the items retrieved based on the specified filter type.
Optional
callbacks: CallbacksOptional callbacks that may be triggered at specific stages of the retrieval process.
Optional
tags: string[]Tags to categorize or label the VectorStoreRetriever
. Defaults to an empty array if not provided.
Optional
metadata: Record<string, unknown>Additional metadata as key-value pairs to add contextual information for the retrieval process.
Optional
verbose: booleanIf true
, enables detailed logging for the retrieval process. Defaults to false
.
VectorStoreRetriever
instance based on the provided parameters.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 by embedding the query and performing a similarity search on the resulting vector.
Text query for finding similar documents.
Optional
k: numberNumber of similar results to return. Defaults to 4.
Optional
filter: stringOptional filter based on FilterType
.
Optional
_callbacks: CallbacksOptional callbacks for monitoring search progress
A promise resolving to an array of DocumentInterface
instances representing similar documents.
Gets the most relevant documents to a query along with their similarity score. The returned documents are ordered by similarity (most similar at the first index)
The embedded query to search the store by
The number of documents to retreive
Optional
filter: stringThe SQL WHERE
clause to filter by
Searches for documents similar to a text query by embedding the query, and returns results with similarity scores.
Text query for finding similar documents.
Optional
k: numberNumber of similar results to return. Defaults to 4.
Optional
filter: stringOptional filter based on FilterType
.
Optional
_callbacks: CallbacksOptional callbacks for monitoring search progress
A promise resolving to an array of tuples, each containing a document and its similarity score.
Static
fromConstructs, adds docs to, and returns a RocksetStore object
The Documents to store
The object used to embed queries and page content
The options to be passed into the RocksetStore constructor
Static
fromConstructs and returns a RocksetStore object given texts to store.
The texts to store
The metadatas that correspond to
The object used to embed queries and page content
The options to be passed into the RocksetStore constructor
Static
withCreates a new Rockset collection and returns a RocksetStore that uses it
Object used to embed queries and page content
The options to be passed into the RocksetStore constructor
Optional
collectionOptions: CreateCollectionRequestThe arguments to sent with the
HTTP request when creating the
collection. Setting a field mapping
that VECTOR_ENFORCE
s is recommended
when using this function. See
https://rockset.com/docs/vector-functions/#vector_enforce
Exposes Rockset's vector store/search functionality