Vector stores
A vector store stores embedded data and performs similarity search.
Select embedding model:
- OpenAI
- Azure
- AWS
- HuggingFace
- Ollama
- Cohere
- MistralAI
- Nomic
- NVIDIA
- Fake
pip install -qU langchain-openai
import getpass
os.environ["OPENAI_API_KEY"] = getpass.getpass()
from langchain_openai import OpenAIEmbeddings
embeddings = OpenAIEmbeddings(model="text-embedding-3-large")
pip install -qU langchain-openai
import getpass
os.environ["AZURE_OPENAI_API_KEY"] = getpass.getpass()
from langchain_openai import AzureOpenAIEmbeddings
embeddings = AzureOpenAIEmbeddings(
    azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
    azure_deployment=os.environ["AZURE_OPENAI_DEPLOYMENT_NAME"],
    openai_api_version=os.environ["AZURE_OPENAI_API_VERSION"],
)
pip install -qU langchain-google-vertexai
from langchain_google_vertexai import VertexAIEmbeddings
embeddings = VertexAIEmbeddings(model="text-embedding-004")
pip install -qU langchain-aws
from langchain_aws import BedrockEmbeddings
embeddings = BedrockEmbeddings(model_id="amazon.titan-embed-text-v2:0")
pip install -qU langchain-huggingface
from langchain_huggingface import HuggingFaceEmbeddings
embeddings = HuggingFaceEmbeddings(model="sentence-transformers/all-mpnet-base-v2")
pip install -qU langchain-ollama
from langchain_ollama import OllamaEmbeddings
embeddings = OllamaEmbeddings(model="llama3")
pip install -qU langchain-cohere
import getpass
os.environ["COHERE_API_KEY"] = getpass.getpass()
from langchain_cohere import CohereEmbeddings
embeddings = CohereEmbeddings(model="embed-english-v3.0")
pip install -qU langchain-mistralai
import getpass
os.environ["MISTRALAI_API_KEY"] = getpass.getpass()
from langchain_mistralai import MistralAIEmbeddings
embeddings = MistralAIEmbeddings(model="mistral-embed")
pip install -qU langchain-nomic
import getpass
os.environ["NOMIC_API_KEY"] = getpass.getpass()
from langchain_nomic import NomicEmbeddings
embeddings = NomicEmbeddings(model="nomic-embed-text-v1.5")
pip install -qU langchain-nvidia-ai-endpoints
import getpass
os.environ["NVIDIA_API_KEY"] = getpass.getpass()
from langchain_nvidia_ai_endpoints import NVIDIAEmbeddings
embeddings = NVIDIAEmbeddings(model="NV-Embed-QA")
pip install -qU langchain-core
from langchain_core.embeddings import DeterministicFakeEmbedding
embeddings = DeterministicFakeEmbedding(size=4096)
Select vector store:
- In-memory
- AstraDB
- Chroma
- FAISS
- Milvus
- MongoDB
- PGVector
- Pinecone
- Qdrant
pip install -qU langchain-core
from langchain_core.vector_stores import InMemoryVectorStore
vector_store = InMemoryVectorStore(embeddings)
pip install -qU langchain-astradb
from langchain_astradb import AstraDBVectorStore
vector_store = AstraDBVectorStore(
    embedding=embeddings,
    api_endpoint=ASTRA_DB_API_ENDPOINT,
    collection_name="astra_vector_langchain",
    token=ASTRA_DB_APPLICATION_TOKEN,
    namespace=ASTRA_DB_NAMESPACE,
)
pip install -qU langchain-chroma
from langchain_chroma import Chroma
vector_store = Chroma(embedding_function=embeddings)
pip install -qU langchain-community
from langchain_community.vectorstores import FAISS
vector_store = FAISS(embedding_function=embeddings)
pip install -qU langchain-milvus
from langchain_milvus import Milvus
vector_store = Milvus(embedding_function=embeddings)
pip install -qU langchain-mongodb
from langchain_mongodb import MongoDBAtlasVectorSearch
vector_store = MongoDBAtlasVectorSearch(
    embedding=embeddings,
    collection=MONGODB_COLLECTION,
    index_name=ATLAS_VECTOR_SEARCH_INDEX_NAME,
    relevance_score_fn="cosine",
)
pip install -qU langchain-postgres
from langchain_postgres import PGVector
vector_store = PGVector(
    embedding=embeddings,
    collection_name="my_docs",
    connection="postgresql+psycopg://...",
)
pip install -qU langchain-pinecone
from langchain_pinecone import PineconeVectorStore
from pinecone import Pinecone
pc = Pinecone(api_key=...)
index = pc.Index(index_name)
vector_store = PineconeVectorStore(embedding=embeddings, index=index)
pip install -qU langchain-qdrant
from langchain_qdrant import QdrantVectorStore
from qdrant_client import QdrantClient
client = QdrantClient(":memory:")
vector_store = QdrantVectorStore(
    client=client,
    collection_name="test",
    embedding=embeddings,
)
| Vectorstore | Delete by ID | Filtering | Search by Vector | Search with score | Async | Passes Standard Tests | Multi Tenancy | IDs in add Documents | 
|---|---|---|---|---|---|---|---|---|
| AstraDBVectorStore | โ | โ | โ | โ | โ | โ | โ | โ | 
| Chroma | โ | โ | โ | โ | โ | โ | โ | โ | 
| Clickhouse | โ | โ | โ | โ | โ | โ | โ | โ | 
| CouchbaseVectorStore | โ | โ | โ | โ | โ | โ | โ | โ | 
| DatabricksVectorSearch | โ | โ | โ | โ | โ | โ | โ | โ | 
| ElasticsearchStore | โ | โ | โ | โ | โ | โ | โ | โ | 
| FAISS | โ | โ | โ | โ | โ | โ | โ | โ | 
| InMemoryVectorStore | โ | โ | โ | โ | โ | โ | โ | โ | 
| Milvus | โ | โ | โ | โ | โ | โ | โ | โ | 
| MongoDBAtlasVectorSearch | โ | โ | โ | โ | โ | โ | โ | โ | 
| PGVector | โ | โ | โ | โ | โ | โ | โ | โ | 
| PineconeVectorStore | โ | โ | โ | โ | โ | โ | โ | โ | 
| QdrantVectorStore | โ | โ | โ | โ | โ | โ | โ | โ | 
| Redis | โ | โ | โ | โ | โ | โ | โ | โ | 
| Weaviate | โ | โ | โ | โ | โ | โ | โ | โ | 
All Vectorstoresโ
| Name | Description | 
|---|---|
| Activeloop Deep Lake | Activeloop Deep Lake as a Multi-Modal Vector Store that stores embedd... | 
| Aerospike | Aerospike Vector Search (AVS) is an | 
| Alibaba Cloud OpenSearch | Alibaba Cloud Opensearch is a one-stop platform to develop intelligen... | 
| AnalyticDB | AnalyticDB for PostgreSQL is a massively parallel processing (MPP) da... | 
| Annoy | Annoy (Approximate Nearest Neighbors Oh Yeah) is a C++ library with P... | 
| Apache Doris | Apache Doris is a modern data warehouse for real-time analytics. | 
| ApertureDB | ApertureDB is a database that stores, indexes, and manages multi-moda... | 
| Astra DB Vector Store | This page provides a quickstart for using Astra DB as a Vector Store. | 
| Atlas | Atlas is a platform by Nomic made for interacting with both small and... | 
| AwaDB | AwaDB is an AI Native database for the search and storage of embeddin... | 
| Azure Cosmos DB Mongo vCore | This notebook shows you how to leverage this integrated vector databa... | 
| Azure Cosmos DB No SQL | This notebook shows you how to leverage this integrated vector databa... | 
| Azure AI Search | Azure AI Search (formerly known as Azure Search and Azure Cognitive S... | 
| Bagel | Bagel (Open Inference platform for AI), is like GitHub for AI data. | 
| BagelDB | BagelDB (Open Vector Database for AI), is like GitHub for AI data. | 
| Baidu Cloud ElasticSearch VectorSearch | Baidu Cloud VectorSearch is a fully managed, enterprise-level distrib... | 
| Baidu VectorDB | Baidu VectorDB is a robust, enterprise-level distributed database ser... | 
| Apache Cassandra | This page provides a quickstart for using Apache Cassandraยฎ as a Vect... | 
| Chroma | This notebook covers how to get started with the Chroma vector store. | 
| Clarifai | Clarifai is an AI Platform that provides the full AI lifecycle rangin... | 
| ClickHouse | ClickHouse is the fastest and most resource efficient open-source dat... | 
| Couchbase | Couchbase is an award-winning distributed NoSQL cloud database that d... | 
| DashVector | DashVector is a fully-managed vectorDB service that supports high-dim... | 
| Databricks | Databricks Vector Search is a serverless similarity search engine tha... | 
| DingoDB | DingoDB is a distributed multi-mode vector database, which combines t... | 
| DocArray HnswSearch | DocArrayHnswSearch is a lightweight Document Index implementation pro... | 
| DocArray InMemorySearch | DocArrayInMemorySearch is a document index provided by Docarray that ... | 
| Amazon Document DB | Amazon DocumentDB (with MongoDB Compatibility) makes it easy to set u... | 
| DuckDB | This notebook shows how to use DuckDB as a vector store. | 
| China Mobile ECloud ElasticSearch VectorSearch | China Mobile ECloud VectorSearch is a fully managed, enterprise-level... | 
| Elasticsearch | Elasticsearch is a distributed, RESTful search and analytics engine, ... | 
| Epsilla | Epsilla is an open-source vector database that leverages the advanced... | 
| Faiss | Facebook AI Similarity Search (FAISS) is a library for efficient simi... | 
| Faiss (Async) | Facebook AI Similarity Search (Faiss) is a library for efficient simi... | 
| Google AlloyDB for PostgreSQL | AlloyDB is a fully managed relational database service that offers hi... | 
| Google BigQuery Vector Search | Google Cloud BigQuery Vector Search lets you use GoogleSQL to do sema... | 
| Google Cloud SQL for MySQL | Cloud SQL is a fully managed relational database service that offers ... | 
| Google Cloud SQL for PostgreSQL | Cloud SQL is a fully managed relational database service that offers ... | 
| Firestore | Firestore is a serverless document-oriented database that scales to m... | 
| Google Memorystore for Redis | Google Memorystore for Redis is a fully-managed service that is power... | 
| Google Spanner | Spanner is a highly scalable database that combines unlimited scalabi... | 
| Google Vertex AI Feature Store | Google Cloud Vertex Feature Store streamlines your ML feature managem... | 
| Google Vertex AI Vector Search | This notebook shows how to use functionality related to the Google Cl... | 
| Hippo | Transwarp Hippo is an enterprise-level cloud-native distributed vecto... | 
| Hologres | Hologres is a unified real-time data warehousing service developed by... | 
| Infinispan | Infinispan is an open-source key-value data grid, it can work as sing... | 
| Jaguar Vector Database | 1. It is a distributed vector database | 
| KDB.AI | KDB.AI is a powerful knowledge-based vector database and search engin... | 
| Kinetica | Kinetica is a database with integrated support for vector similarity ... | 
| LanceDB | LanceDB is an open-source database for vector-search built with persi... | 
| Lantern | Lantern is an open-source vector similarity search for Postgres | 
| lindorm_search_store | Lindorm | 
| LLMRails | LLMRails is a API platform for building GenAI applications. It provid... | 
| ManticoreSearch VectorStore | ManticoreSearch is an open-source search engine that offers fast, sca... | 
| Marqo | This notebook shows how to use functionality related to the Marqo vec... | 
| Meilisearch | Meilisearch is an open-source, lightning-fast, and hyper relevant sea... | 
| Amazon MemoryDB | Vector Search introduction and langchain integration guide. | 
| Milvus | Milvus is a database that stores, indexes, and manages massive embedd... | 
| Momento Vector Index (MVI) | MVI: the most productive, easiest to use, serverless vector index for... | 
| MongoDB Atlas | This notebook covers how to MongoDB Atlas vector search in LangChain,... | 
| MyScale | MyScale is a cloud-based database optimized for AI applications and s... | 
| Neo4j Vector Index | Neo4j is an open-source graph database with integrated support for ve... | 
| NucliaDB | You can use a local NucliaDB instance or use Nuclia Cloud. | 
| OpenSearch | OpenSearch is a scalable, flexible, and extensible open-source softwa... | 
| Oracle AI Vector Search: Vector Store | Oracle AI Vector Search is designed for Artificial Intelligence (AI) ... | 
| Pathway | Pathway is an open data processing framework. It allows you to easily... | 
| Postgres Embedding | Postgres Embedding is an open-source vector similarity search for Pos... | 
| PGVecto.rs | This notebook shows how to use functionality related to the Postgres ... | 
| PGVector | An implementation of LangChain vectorstore abstraction using postgres... | 
| Pinecone | Pinecone is a vector database with broad functionality. | 
| Qdrant | Qdrant (read: quadrant ) is a vector similarity search engine. It pro... | 
| Redis | This notebook covers how to get started with the Redis vector store. | 
| Relyt | Relyt is a cloud native data warehousing service that is designed to ... | 
| Rockset | Rockset is a real-time search and analytics database built for the cl... | 
| SAP HANA Cloud Vector Engine | SAP HANA Cloud Vector Engine is a vector store fully integrated into ... | 
| ScaNN | ScaNN (Scalable Nearest Neighbors) is a method for efficient vector s... | 
| SemaDB | SemaDB from SemaFind is a no fuss vector similarity database for buil... | 
| SingleStoreDB | SingleStoreDB is a robust, high-performance distributed SQL database ... | 
| scikit-learn | scikit-learn is an open-source collection of machine learning algorit... | 
| SQLiteVec | This notebook covers how to get started with the SQLiteVec vector sto... | 
| SQLite-VSS | SQLite-VSS is an SQLite extension designed for vector search, emphasi... | 
| StarRocks | StarRocks is a High-Performance Analytical Database. | 
| Supabase (Postgres) | Supabase is an open-source Firebase alternative. Supabase is built on... | 
| SurrealDB | SurrealDB is an end-to-end cloud-native database designed for modern ... | 
| Tair | Tair is a cloud native in-memory database service developed by Alibab... | 
| Tencent Cloud VectorDB | Tencent Cloud VectorDB is a fully managed, self-developed, enterprise... | 
| ThirdAI NeuralDB | NeuralDB is a CPU-friendly and fine-tunable vector store developed by... | 
| TiDB Vector | TiDB Cloud, is a comprehensive Database-as-a-Service (DBaaS) solution... | 
| Tigris | Tigris is an open-source Serverless NoSQL Database and Search Platfor... | 
| TileDB | TileDB is a powerful engine for indexing and querying dense and spars... | 
| Timescale Vector (Postgres) | Timescale Vector is PostgreSQL++ vector database for AI applications. | 
| Typesense | Typesense is an open-source, in-memory search engine, that you can ei... | 
| Upstash Vector | Upstash Vector is a serverless vector database designed for working w... | 
| USearch | USearch is a Smaller & Faster Single-File Vector Search Engine | 
| Vald | Vald is a highly scalable distributed fast approximate nearest neighb... | 
| Intel's Visual Data Management System (VDMS) | Intel's VDMS is a storage solution for efficient access of big-โvisua... | 
| Vearch | Vearch is the vector search infrastructure for deeping learning and A... | 
| Vectara | Vectara is the trusted AI Assistant and Agent platform which focuses ... | 
| Vespa | Vespa is a fully featured search engine and vector database. It suppo... | 
| viking DB | viking DB is a database that stores, indexes, and manages massive emb... | 
| vlite | VLite is a simple and blazing fast vector database that allows you to... | 
| Weaviate | This notebook covers how to get started with the Weaviate vector stor... | 
| Xata | Xata is a serverless data platform, based on PostgreSQL. It provides ... | 
| Yellowbrick | Yellowbrick is an elastic, massively parallel processing (MPP) SQL da... | 
| Zep | Recall, understand, and extract data from chat histories. Power perso... | 
| Zep Cloud | Recall, understand, and extract data from chat histories. Power perso... | 
| Zilliz | Zilliz Cloud is a fully managed service on cloud for LF AI Milvusยฎ, |