vectorstores#

Vector store stores embedded data and performs vector search.

One of the most common ways to store and search over unstructured data is to embed it and store the resulting embedding vectors, and then query the store and retrieve the data that are โ€˜most similarโ€™ to the embedded query.

Class hierarchy:

VectorStore --> <name>  # Examples: Annoy, FAISS, Milvus

BaseRetriever --> VectorStoreRetriever --> <name>Retriever  # Example: VespaRetriever

Main helpers:

Embeddings, Document

Classes

vectorstores.azure_cosmos_db_mongo_vcore.AzureCosmosDBMongoVCoreVectorSearch(...)

Azure Cosmos DB for MongoDB vCore vector store.

vectorstores.azure_cosmos_db_mongo_vcore.CosmosDBSimilarityType(value)

Cosmos DB Similarity Type as enumerator.

vectorstores.azure_cosmos_db_mongo_vcore.CosmosDBVectorSearchType(value)

Cosmos DB Vector Search Type as enumerator.

vectorstores.azure_cosmos_db_no_sql.AzureCosmosDBNoSqlVectorSearch(*,ย ...)

Azure Cosmos DB for NoSQL vector store.

vectorstores.azure_cosmos_db_no_sql.AzureCosmosDBNoSqlVectorStoreRetriever

Retriever that uses Azure CosmosDB No Sql Search.

vectorstores.azure_cosmos_db_no_sql.Condition

Condition class for PreFilter.

vectorstores.azure_cosmos_db_no_sql.PreFilter

PreFilter class for filters.

vectorstores.cache.AzureCosmosDBMongoVCoreSemanticCache(...)

Cache that uses Cosmos DB Mongo vCore vector-store backend.

vectorstores.cache.AzureCosmosDBNoSqlSemanticCache(...)

Cache that uses Cosmos DB NoSQL backend.

vectorstores.utils.DistanceStrategy(value)

Enumerator of the Distance strategies for calculating distances between vectors.

Functions

vectorstores.utils.filter_complex_metadata(...)

Filter out metadata types that are not supported for a vector store.

vectorstores.utils.maximal_marginal_relevance(...)

Calculate maximal marginal relevance.