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.
interface VectorStoreInterfaceEmbeddings interface for generating vector embeddings from text queries, enabling vector-based similarity searches.
Defines the filter type used in search and delete operations. Can be an object for structured conditions or a string for simpler filtering.
A path to the module that contains the class, eg. ["langchain", "llms"] Usually should be the same as the entrypoint the class is exported from.
Returns a string representing the type of vector store, which subclasses must implement to identify their specific vector storage type.
Method to add documents to the memory vector store. It extracts the text from each document, generates embeddings for them, and adds the resulting vectors to the store.
Method to add vectors to the memory vector store. It creates
MemoryVector instances for each vector and document pair and adds
them to the store.
Creates a VectorStoreRetriever instance with flexible configuration options.
Deletes documents from the vector store based on the specified parameters.
Return documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.
Searches for documents similar to a text query by embedding the query and performing a similarity search on the resulting vector.
Method to perform a similarity search in the memory vector store. It
calculates the similarity between the query vector and each vector in
the store, sorts the results by similarity, and returns the top k
results along with their scores.
Searches for documents similar to a text query by embedding the query, and returns results with similarity scores.
A path to the module that contains the class, eg. ["langchain", "llms"]