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.aerospike.Aerospike(client, ...)

Aerospike vector store.

vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch(...)

Alibaba Cloud OpenSearch vector store.

vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearchSettings(...)

Alibaba Cloud Opensearch` client configuration.

vectorstores.analyticdb.AnalyticDB(...[, ...])

AnalyticDB (distributed PostgreSQL) vector store.

vectorstores.annoy.Annoy(embedding_function, ...)

Annoy vector store.

vectorstores.apache_doris.ApacheDoris(...[, ...])

Apache Doris vector store.

vectorstores.apache_doris.ApacheDorisSettings

Apache Doris client configuration.

vectorstores.aperturedb.ApertureDB(embeddings)

Create a vectorstore backed by ApertureDB

vectorstores.atlas.AtlasDB(name[, ...])

Atlas vector store.

vectorstores.awadb.AwaDB([table_name, ...])

AwaDB vector store.

vectorstores.azure_cosmos_db.AzureCosmosDBVectorSearch(...)

Azure Cosmos DB for MongoDB vCore vector store.

vectorstores.azure_cosmos_db.CosmosDBSimilarityType(value)

Cosmos DB Similarity Type as enumerator.

vectorstores.azure_cosmos_db.CosmosDBVectorSearchType(value)

Cosmos DB Vector Search Type as enumerator.

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

Azure Cosmos DB for NoSQL vector store.

vectorstores.azuresearch.AzureSearch(...[, ...])

Azure Cognitive Search vector store.

vectorstores.azuresearch.AzureSearchVectorStoreRetriever

Retriever that uses Azure Cognitive Search.

vectorstores.bagel.Bagel([cluster_name, ...])

Bagel.net Inference platform.

vectorstores.baiducloud_vector_search.BESVectorStore(...)

Baidu Elasticsearch vector store.

vectorstores.baiduvectordb.BaiduVectorDB(...)

Baidu VectorDB as a vector store.

vectorstores.baiduvectordb.ConnectionParams(...)

Baidu VectorDB Connection params.

vectorstores.baiduvectordb.TableParams(dimension)

Baidu VectorDB table params.

vectorstores.cassandra.Cassandra(embedding)

Apache Cassandra(R) for vector-store workloads.

vectorstores.clarifai.Clarifai([user_id, ...])

Clarifai AI vector store.

vectorstores.clickhouse.Clickhouse(embedding)

ClickHouse vector store integration.

vectorstores.clickhouse.ClickhouseSettings

ClickHouse client configuration.

vectorstores.dashvector.DashVector(...)

DashVector vector store.

vectorstores.databricks_vector_search.DatabricksVectorSearch(...)

Databricks Vector Search vector store.

vectorstores.deeplake.DeepLake([...])

Activeloop Deep Lake vector store.

vectorstores.dingo.Dingo(embedding, text_key, *)

Dingo vector store.

vectorstores.docarray.base.DocArrayIndex(...)

Base class for DocArray based vector stores.

vectorstores.docarray.hnsw.DocArrayHnswSearch(...)

HnswLib storage using DocArray package.

vectorstores.docarray.in_memory.DocArrayInMemorySearch(...)

In-memory DocArray storage for exact search.

vectorstores.documentdb.DocumentDBSimilarityType(value)

DocumentDB Similarity Type as enumerator.

vectorstores.documentdb.DocumentDBVectorSearch(...)

Amazon DocumentDB (with MongoDB compatibility) vector store.

vectorstores.duckdb.DuckDB(*[, connection, ...])

DuckDB vector store.

vectorstores.ecloud_vector_search.EcloudESVectorStore(...)

ecloud Elasticsearch vector store.

vectorstores.elasticsearch.BaseRetrievalStrategy()

Base class for Elasticsearch retrieval strategies.

vectorstores.epsilla.Epsilla(client, embeddings)

Wrapper around Epsilla vector database.

vectorstores.faiss.FAISS(embedding_function, ...)

FAISS vector store integration.

vectorstores.hanavector.HanaDB(connection, ...)

SAP HANA Cloud Vector Engine

vectorstores.hippo.Hippo(embedding_function)

Hippo vector store.

vectorstores.hologres.Hologres(...[, ndims, ...])

Hologres API vector store.

vectorstores.infinispanvs.Infinispan(**kwargs)

Helper class for Infinispan REST interface.

vectorstores.infinispanvs.InfinispanVS([...])

Infinispan VectorStore interface.

vectorstores.jaguar.Jaguar(pod, store, ...)

Jaguar API vector store.

vectorstores.kdbai.KDBAI(table, embedding[, ...])

KDB.AI vector store.

vectorstores.kinetica.Dimension(value[, ...])

Some default dimensions for known embeddings.

vectorstores.kinetica.DistanceStrategy(value)

Enumerator of the Distance strategies.

vectorstores.kinetica.Kinetica(config, ...)

Kinetica vector store.

vectorstores.kinetica.KineticaSettings

Kinetica client configuration.

vectorstores.lancedb.LanceDB([connection, ...])

LanceDB vector store.

vectorstores.lantern.BaseEmbeddingStore()

Base class for the Lantern embedding store.

vectorstores.lantern.DistanceStrategy(value)

Enumerator of the Distance strategies.

vectorstores.lantern.Lantern(...[, ...])

Postgres with the lantern extension as a vector store.

vectorstores.lantern.QueryResult()

Result from a query.

vectorstores.llm_rails.LLMRails([...])

Implementation of Vector Store using LLMRails.

vectorstores.llm_rails.LLMRailsRetriever

Retriever for LLMRails.

vectorstores.manticore_search.ManticoreSearch(...)

ManticoreSearch Engine vector store.

vectorstores.manticore_search.ManticoreSearchSettings

Create a new model by parsing and validating input data from keyword arguments.

vectorstores.marqo.Marqo(client, index_name)

Marqo vector store.

vectorstores.meilisearch.Meilisearch(embedding)

Meilisearch vector store.

vectorstores.momento_vector_index.MomentoVectorIndex(...)

Momento Vector Index (MVI) vector store.

vectorstores.myscale.MyScale(embedding[, config])

MyScale vector store.

vectorstores.myscale.MyScaleSettings

MyScale client configuration.

vectorstores.myscale.MyScaleWithoutJSON(...)

MyScale vector store without metadata column

vectorstores.neo4j_vector.IndexType(value[, ...])

Enumerator of the index types.

vectorstores.neo4j_vector.Neo4jVector(...[, ...])

Neo4j vector index.

vectorstores.neo4j_vector.SearchType(value)

Enumerator of the Distance strategies.

vectorstores.nucliadb.NucliaDB(...[, ...])

NucliaDB vector store.

vectorstores.opensearch_vector_search.OpenSearchVectorSearch(...)

Amazon OpenSearch Vector Engine vector store.

vectorstores.oraclevs.OracleVS(client, ...)

OracleVS vector store.

vectorstores.pathway.PathwayVectorClient([...])

VectorStore connecting to Pathway Vector Store.

vectorstores.pgembedding.BaseModel(**kwargs)

Base model for all SQL stores.

vectorstores.pgembedding.CollectionStore(...)

Collection store.

vectorstores.pgembedding.EmbeddingStore(**kwargs)

Embedding store.

vectorstores.pgembedding.PGEmbedding(...[, ...])

Postgres with the pg_embedding extension as a vector store.

vectorstores.pgembedding.QueryResult()

Result from a query.

vectorstores.pgvecto_rs.PGVecto_rs(...[, ...])

VectorStore backed by pgvecto_rs.

vectorstores.pgvector.BaseModel(**kwargs)

Base model for the SQL stores.

vectorstores.pgvector.DistanceStrategy(value)

Enumerator of the Distance strategies.

vectorstores.qdrant.QdrantException

Qdrant related exceptions.

vectorstores.redis.base.Redis(redis_url, ...)

Redis vector database.

vectorstores.redis.base.RedisVectorStoreRetriever

Retriever for Redis VectorStore.

vectorstores.redis.filters.RedisFilter()

Collection of RedisFilterFields.

vectorstores.redis.filters.RedisFilterExpression([...])

Logical expression of RedisFilterFields.

vectorstores.redis.filters.RedisFilterField(field)

Base class for RedisFilterFields.

vectorstores.redis.filters.RedisFilterOperator(value)

RedisFilterOperator enumerator is used to create RedisFilterExpressions.

vectorstores.redis.filters.RedisNum(field)

RedisFilterField representing a numeric field in a Redis index.

vectorstores.redis.filters.RedisTag(field)

RedisFilterField representing a tag in a Redis index.

vectorstores.redis.filters.RedisText(field)

RedisFilterField representing a text field in a Redis index.

vectorstores.redis.schema.FlatVectorField

Schema for flat vector fields in Redis.

vectorstores.redis.schema.HNSWVectorField

Schema for HNSW vector fields in Redis.

vectorstores.redis.schema.NumericFieldSchema

Schema for numeric fields in Redis.

vectorstores.redis.schema.RedisDistanceMetric(value)

Distance metrics for Redis vector fields.

vectorstores.redis.schema.RedisField

Base class for Redis fields.

vectorstores.redis.schema.RedisModel

Schema for Redis index.

vectorstores.redis.schema.RedisVectorField

Base class for Redis vector fields.

vectorstores.redis.schema.TagFieldSchema

Schema for tag fields in Redis.

vectorstores.redis.schema.TextFieldSchema

Schema for text fields in Redis.

vectorstores.relyt.Relyt(connection_string, ...)

Relyt (distributed PostgreSQL) vector store.

vectorstores.rocksetdb.Rockset(client, ...)

Rockset vector store.

vectorstores.scann.ScaNN(embedding, index, ...)

ScaNN vector store.

vectorstores.semadb.SemaDB(collection_name, ...)

SemaDB vector store.

vectorstores.singlestoredb.SingleStoreDB(...)

SingleStore DB vector store.

vectorstores.sklearn.BaseSerializer(persist_path)

Base class for serializing data.

vectorstores.sklearn.BsonSerializer(persist_path)

Serialize data in Binary JSON using the bson python package.

vectorstores.sklearn.JsonSerializer(persist_path)

Serialize data in JSON using the json package from python standard library.

vectorstores.sklearn.ParquetSerializer(...)

Serialize data in Apache Parquet format using the pyarrow package.

vectorstores.sklearn.SKLearnVectorStore(...)

Simple in-memory vector store based on the scikit-learn library NearestNeighbors.

vectorstores.sklearn.SKLearnVectorStoreException

Exception raised by SKLearnVectorStore.

vectorstores.sqlitevss.SQLiteVSS(table, ...)

SQLite with VSS extension as a vector database.

vectorstores.starrocks.StarRocks(embedding)

StarRocks vector store.

vectorstores.starrocks.StarRocksSettings

StarRocks client configuration.

vectorstores.supabase.SupabaseVectorStore(...)

Supabase Postgres vector store.

vectorstores.surrealdb.SurrealDBStore(...)

SurrealDB as Vector Store.

vectorstores.tair.Tair(embedding_function, ...)

Tair vector store.

vectorstores.tencentvectordb.ConnectionParams(...)

Tencent vector DB Connection params.

vectorstores.tencentvectordb.IndexParams(...)

Tencent vector DB Index params.

vectorstores.tencentvectordb.MetaField

MetaData Field for Tencent vector DB.

vectorstores.tencentvectordb.TencentVectorDB(...)

Tencent VectorDB as a vector store.

vectorstores.thirdai_neuraldb.NeuralDBClientVectorStore(db)

Vectorstore that uses ThirdAI's NeuralDB Enterprise Python Client for NeuralDBs.

vectorstores.thirdai_neuraldb.NeuralDBVectorStore(db)

Vectorstore that uses ThirdAI's NeuralDB.

vectorstores.tidb_vector.TiDBVectorStore(...)

TiDB Vector Store.

vectorstores.tigris.Tigris(client, ...)

Tigris vector store.

vectorstores.tiledb.TileDB(embedding, ...[, ...])

TileDB vector store.

vectorstores.timescalevector.TimescaleVector(...)

Timescale Postgres vector store

vectorstores.typesense.Typesense(...[, ...])

Typesense vector store.

vectorstores.upstash.UpstashVectorStore([...])

Upstash Vector vector store

vectorstores.usearch.USearch(embedding, ...)

USearch vector store.

vectorstores.utils.DistanceStrategy(value[, ...])

Enumerator of the Distance strategies for calculating distances between vectors.

vectorstores.vald.Vald(embedding[, host, ...])

Vald vector database.

vectorstores.vdms.VDMS(client, *[, ...])

Intel Lab's VDMS for vector-store workloads.

vectorstores.vearch.Vearch(embedding_function)

Initialize vearch vector store flag 1 for cluster,0 for standalone

vectorstores.vectara.MMRConfig([is_enabled, ...])

Configuration for Maximal Marginal Relevance (MMR) search.

vectorstores.vectara.RerankConfig([...])

Configuration for Reranker.

vectorstores.vectara.SummaryConfig([...])

Configuration for summary generation.

vectorstores.vectara.Vectara([...])

Vectara API vector store.

vectorstores.vectara.VectaraQueryConfig([k, ...])

Configuration for Vectara query.

vectorstores.vectara.VectaraRAG(vectara, config)

Vectara RAG runnable.

vectorstores.vectara.VectaraRetriever

Vectara Retriever class.

vectorstores.vespa.VespaStore(app[, ...])

Vespa vector store.

vectorstores.vikingdb.VikingDB(...[, ...])

vikingdb as a vector store

vectorstores.vikingdb.VikingDBConfig([host, ...])

vikingdb connection config

vectorstores.vlite.VLite(embedding_function)

VLite is a simple and fast vector database for semantic search.

vectorstores.weaviate.Weaviate(client, ...)

Weaviate vector store.

vectorstores.xata.XataVectorStore(api_key, ...)

Xata vector store.

vectorstores.yellowbrick.Yellowbrick(...[, ...])

Yellowbrick as a vector database.

vectorstores.zep.CollectionConfig(name, ...)

Configuration for a Zep Collection.

vectorstores.zep.ZepVectorStore(...[, ...])

Zep vector store.

vectorstores.zep_cloud.ZepCloudVectorStore(...)

Zep vector store.

vectorstores.zilliz.Zilliz(embedding_function)

Zilliz vector store.

Functions

vectorstores.alibabacloud_opensearch.create_metadata(fields)

Create metadata from fields.

vectorstores.annoy.dependable_annoy_import()

Import annoy if available, otherwise raise error.

vectorstores.clickhouse.has_mul_sub_str(s, *args)

Check if a string contains multiple substrings.

vectorstores.faiss.dependable_faiss_import([...])

Import faiss if available, otherwise raise error.

vectorstores.lancedb.import_lancedb()

Import lancedb package.

vectorstores.lancedb.to_lance_filter(filter)

Converts a dict filter to a LanceDB filter string.

vectorstores.lantern.get_embedding_store(...)

Get the embedding store class.

vectorstores.myscale.has_mul_sub_str(s, *args)

Check if a string contains multiple substrings.

vectorstores.neo4j_vector.check_if_not_null(...)

Check if the values are not None or empty string

vectorstores.neo4j_vector.collect_params(...)

Transform the input data into the desired format.

vectorstores.neo4j_vector.combine_queries(...)

Combine multiple queries with an operator.

vectorstores.neo4j_vector.construct_metadata_filter(filter)

Construct a metadata filter.

vectorstores.neo4j_vector.dict_to_yaml_str(...)

Convert a dictionary to a YAML-like string without using external libraries.

vectorstores.neo4j_vector.remove_lucene_chars(text)

Remove Lucene special characters

vectorstores.neo4j_vector.sort_by_index_name(...)

Sort first element to match the index_name if exists

vectorstores.oraclevs.create_index(client, ...)

Create an index on the vector store.

vectorstores.oraclevs.drop_index_if_exists(...)

Drop an index if it exists.

vectorstores.oraclevs.drop_table_purge(...)

Drop a table and purge it from the database.

vectorstores.qdrant.sync_call_fallback(method)

Decorator to call the synchronous method of the class if the async method is not implemented.

vectorstores.redis.base.check_index_exists(...)

Check if Redis index exists.

vectorstores.redis.filters.check_operator_misuse(func)

Decorator to check for misuse of equality operators.

vectorstores.redis.schema.read_schema(...)

Read in the index schema from a dict or yaml file.

vectorstores.scann.dependable_scann_import()

Import scann if available, otherwise raise error.

vectorstores.scann.normalize(x)

Normalize vectors to unit length.

vectorstores.starrocks.debug_output(s)

Print a debug message if DEBUG is True.

vectorstores.starrocks.get_named_result(...)

Get a named result from a query.

vectorstores.starrocks.has_mul_sub_str(s, *args)

Check if a string has multiple substrings.

vectorstores.tencentvectordb.translate_filter(...)

Translate LangChain filter to Tencent VectorDB filter.

vectorstores.tiledb.dependable_tiledb_import()

Import tiledb-vector-search if available, otherwise raise error.

vectorstores.tiledb.get_documents_array_uri(uri)

Get the URI of the documents array.

vectorstores.tiledb.get_documents_array_uri_from_group(group)

Get the URI of the documents array from group.

vectorstores.tiledb.get_vector_index_uri(uri)

Get the URI of the vector index.

vectorstores.tiledb.get_vector_index_uri_from_group(group)

Get the URI of the vector index.

vectorstores.usearch.dependable_usearch_import()

Import usearch if available, otherwise raise error.

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.

vectorstores.vdms.VDMS_Client([host, port])

VDMS client for the VDMS server.

vectorstores.vdms.embedding2bytes(embedding)

Convert embedding to bytes.

Deprecated classes