主题
向量存储集成
使用 LangChain Python 集成向量存储。
概述
向量存储会嵌入数据并执行相似性搜索。
flowchart LR
subgraph "📥 Indexing phase (store)"
A[📄 Documents] --> B[🔢 Embedding model]
B --> C[🔘 Embedding vectors]
C --> D[(Vector store)]
end
subgraph "📤 Query phase (retrieval)"
E[❓ Query text] --> F[🔢 Embedding model]
F --> G[🔘 Query vector]
G --> H[🔍 Similarity search]
H --> D
D --> I[📄 Top-k results]
end
classDef process fill:#E5F4FF,stroke:#006DDD,stroke-width:2px,color:#030710
class A,B,C,D,E,F,G,H,I process
接口
LangChain 为向量存储提供了统一接口,让你可以:
add_documents- 向存储中添加文档。delete- 按 ID 移除已存储的文档。similarity_search- 查询语义相似的文档。
这一抽象让你无需更改应用程序逻辑即可在不同实现之间切换。
初始化
要初始化向量存储,请为其提供一个嵌入模型:
python
from langchain_core.vectorstores import InMemoryVectorStore
vector_store = InMemoryVectorStore(embedding=SomeEmbeddingModel())添加文档
按如下方式添加 Document 对象(包含 page_content 和可选元数据):
python
vector_store.add_documents(documents=[doc1, doc2], ids=["id1", "id2"])删除文档
通过指定 ID 来删除:
python
vector_store.delete(ids=["id1"])相似性搜索
使用 similarity_search 发起语义查询,它会返回最接近的嵌入文档:
python
similar_docs = vector_store.similarity_search("your query here")许多向量存储支持以下参数:
k—— 要返回的结果数量filter—— 基于元数据的条件过滤
相似性度量与索引
嵌入相似性可以使用以下方式计算:
- 余弦相似度
- 欧几里得距离
- 点积
高效搜索通常采用 HNSW(Hierarchical Navigable Small World,分层可导航小世界)等索引方法,但具体方式取决于向量存储。
元数据过滤
按元数据(例如来源、日期)过滤可以优化搜索结果:
python
vector_store.similarity_search(
"query",
k=3,
filter={"source": "tweets"}
)热门集成
选择嵌入模型:
OpenAI
bash
pip install -qU langchain-openaibash
uv add langchain-openaipython
import getpass
import os
if not os.environ.get("OPENAI_API_KEY"):
os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter API key for OpenAI: ")
from langchain_openai import OpenAIEmbeddings
embeddings = OpenAIEmbeddings(model="text-embedding-3-large")Azure
bash
pip install -qU langchain-azure-aipython
import getpass
import os
if not os.environ.get("AZURE_OPENAI_API_KEY"):
os.environ["AZURE_OPENAI_API_KEY"] = getpass.getpass("Enter API key for Azure: ")
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"],
)Google Gemini
bash
pip install -qU langchain-google-genaipython
import getpass
import os
if not os.environ.get("GOOGLE_API_KEY"):
os.environ["GOOGLE_API_KEY"] = getpass.getpass("Enter API key for Google Gemini: ")
from langchain_google_genai import GoogleGenerativeAIEmbeddings
embeddings = GoogleGenerativeAIEmbeddings(model="models/gemini-embedding-001")Gemini Enterprise Agent Platform
bash
pip install -qU langchain-google-vertexaipython
from langchain_google_vertexai import VertexAIEmbeddings
embeddings = VertexAIEmbeddings(model="text-embedding-005")AWS
bash
pip install -qU langchain-awspython
from langchain_aws import BedrockEmbeddings
embeddings = BedrockEmbeddings(model_id="amazon.titan-embed-text-v2:0")HuggingFace
bash
pip install -qU langchain-huggingfacepython
from langchain_huggingface import HuggingFaceEmbeddings
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2")Ollama
bash
pip install -qU langchain-ollamapython
from langchain_ollama import OllamaEmbeddings
embeddings = OllamaEmbeddings(model="nomic-embed-text")Cohere
bash
pip install -qU langchain-coherepython
import getpass
import os
if not os.environ.get("COHERE_API_KEY"):
os.environ["COHERE_API_KEY"] = getpass.getpass("Enter API key for Cohere: ")
from langchain_cohere import CohereEmbeddings
embeddings = CohereEmbeddings(model="embed-english-v3.0")Mistral AI
bash
pip install -qU langchain-mistralaipython
import getpass
import os
if not os.environ.get("MISTRALAI_API_KEY"):
os.environ["MISTRALAI_API_KEY"] = getpass.getpass("Enter API key for MistralAI: ")
from langchain_mistralai import MistralAIEmbeddings
embeddings = MistralAIEmbeddings(model="mistral-embed")Nomic
bash
pip install -qU langchain-nomicpython
import getpass
import os
if not os.environ.get("NOMIC_API_KEY"):
os.environ["NOMIC_API_KEY"] = getpass.getpass("Enter API key for Nomic: ")
from langchain_nomic import NomicEmbeddings
embeddings = NomicEmbeddings(model="nomic-embed-text-v1.5")NVIDIA
bash
pip install -qU langchain-nvidia-ai-endpointspython
import getpass
import os
if not os.environ.get("NVIDIA_API_KEY"):
os.environ["NVIDIA_API_KEY"] = getpass.getpass("Enter API key for NVIDIA: ")
from langchain_nvidia_ai_endpoints import NVIDIAEmbeddings
embeddings = NVIDIAEmbeddings(model="NV-Embed-QA")Voyage AI
bash
pip install -qU langchain-voyageaipython
import getpass
import os
if not os.environ.get("VOYAGE_API_KEY"):
os.environ["VOYAGE_API_KEY"] = getpass.getpass("Enter API key for Voyage AI: ")
from langchain_voyageai import VoyageAIEmbeddings
embeddings = VoyageAIEmbeddings(model="voyage-3")更多信息请参阅 Voyage AI 文档。
IBM watsonx
bash
pip install -qU langchain-ibmpython
import getpass
import os
if not os.environ.get("WATSONX_APIKEY"):
os.environ["WATSONX_APIKEY"] = getpass.getpass("Enter API key for IBM watsonx: ")
from langchain_ibm import WatsonxEmbeddings
embeddings = WatsonxEmbeddings(
model_id="ibm/slate-125m-english-rtrvr",
url="https://us-south.ml.cloud.ibm.com",
project_id="<WATSONX PROJECT_ID>",
)Fake
bash
pip install -qU langchain-corepython
from langchain_core.embeddings import DeterministicFakeEmbedding
embeddings = DeterministicFakeEmbedding(size=4096)xAI
bash
pip install -qU langchain-xaipython
import getpass
import os
if not os.environ.get("XAI_API_KEY"):
os.environ["XAI_API_KEY"] = getpass.getpass("Enter API key for xAI: ")
from langchain.chat_models import init_chat_model
model = init_chat_model("grok-2", model_provider="xai")Perplexity
bash
pip install -qU langchain-perplexitypython
import getpass
import os
if not os.environ.get("PPLX_API_KEY"):
os.environ["PPLX_API_KEY"] = getpass.getpass("Enter API key for Perplexity: ")
from langchain.chat_models import init_chat_model
model = init_chat_model("llama-3.1-sonar-small-128k-online", model_provider="perplexity")DeepSeek
bash
pip install -qU langchain-deepseekpython
import getpass
import os
if not os.environ.get("DEEPSEEK_API_KEY"):
os.environ["DEEPSEEK_API_KEY"] = getpass.getpass("Enter API key for DeepSeek: ")
from langchain.chat_models import init_chat_model
model = init_chat_model("deepseek-chat", model_provider="deepseek")选择向量存储:
内存
bash
pip install -qU langchain-corebash
uv add langchain-corepython
from langchain_core.vectorstores import InMemoryVectorStore
vector_store = InMemoryVectorStore(embeddings)Amazon OpenSearch
bash
pip install -qU boto3python
from opensearchpy import RequestsHttpConnection
service = "es" # must set the service as 'es'
region = "us-east-2"
credentials = boto3.Session(
aws_access_key_id="xxxxxx", aws_secret_access_key="xxxxx"
).get_credentials()
awsauth = AWS4Auth("xxxxx", "xxxxxx", region, service, session_token=credentials.token)
vector_store = OpenSearchVectorSearch.from_documents(
docs,
embeddings,
opensearch_url="host url",
http_auth=awsauth,
timeout=300,
use_ssl=True,
verify_certs=True,
connection_class=RequestsHttpConnection,
index_name="test-index",
)Astra DB
bash
pip install -qU langchain-astradbbash
uv add langchain-astradbpython
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,
)Azure Cosmos DB NoSQL
bash
pip install -qU langchain-azure-cosmosdb azure-cosmosbash
uv add langchain-azure-cosmosdb azure-cosmospython
from langchain_azure_cosmosdb import AzureCosmosDBNoSqlVectorSearch
vector_search = AzureCosmosDBNoSqlVectorSearch.from_documents(
documents=docs,
embedding=openai_embeddings,
cosmos_client=cosmos_client,
database_name=database_name,
container_name=container_name,
vector_embedding_policy=vector_embedding_policy,
full_text_policy=full_text_policy,
indexing_policy=indexing_policy,
cosmos_container_properties=cosmos_container_properties,
cosmos_database_properties={},
full_text_search_enabled=True,
)Azure Cosmos DB Mongo vCore
bash
pip install -qU langchain-azure-ai pymongobash
uv add pymongopython
from langchain_azure_ai.vectorstores.azure_cosmos_db_mongo_vcore import (
AzureCosmosDBMongoVCoreVectorSearch,
)
vectorstore = AzureCosmosDBMongoVCoreVectorSearch.from_documents(
docs,
openai_embeddings,
collection=collection,
index_name=INDEX_NAME,
)Chroma
bash
pip install -qU langchain-chromabash
uv add langchain-chromapython
from langchain_chroma import Chroma
vector_store = Chroma(
collection_name="example_collection",
embedding_function=embeddings,
persist_directory="./chroma_langchain_db", # Where to save data locally, remove if not necessary
)CockroachDB
bash
pip install -qU langchain-cockroachdbbash
uv add langchain-cockroachdbpython
from langchain_cockroachdb import AsyncCockroachDBVectorStore, CockroachDBEngine
CONNECTION_STRING = "cockroachdb://user:pass@host:26257/db?sslmode=verify-full"
engine = CockroachDBEngine.from_connection_string(CONNECTION_STRING)
await engine.ainit_vectorstore_table(
table_name="vectors",
vector_dimension=1536,
)
vector_store = AsyncCockroachDBVectorStore(
engine=engine,
embeddings=embeddings,
collection_name="vectors",
)Elasticsearch
使用 start-local 脚本安装该包并在本地启动 Elasticsearch:
bash
pip install -qU langchain-elasticsearch
curl -fsSL https://elastic.co/start-local | sh这会创建一个 elastic-start-local 文件夹。要启动 Elasticsearch:
bash
cd elastic-start-local
./start.shElasticsearch 将可通过 http://localhost:9200 访问。elastic 用户的密码和 API 密钥存储在 elastic-start-local 文件夹的 .env 文件中。
python
from langchain_elasticsearch import ElasticsearchStore
vector_store = ElasticsearchStore(
index_name="langchain-demo",
embedding=embeddings,
es_url="http://localhost:9200",
)Google AlloyDB
bash
pip install -qU langchain-google-alloydb-pgbash
uv add langchain-google-alloydb-pgpython
from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore
engine = AlloyDBEngine.from_instance(
project_id="my-project",
region="us-central1",
cluster="my-cluster",
instance="my-instance",
database="my-database",
)
vector_store = AlloyDBVectorStore.create_sync(
engine=engine,
table_name="my_vectors",
embedding_service=embeddings
)Milvus
bash
pip install -qU langchain-milvusbash
uv add langchain-milvuspython
from langchain_milvus import Milvus
URI = "./milvus_example.db"
vector_store = Milvus(
embedding_function=embeddings,
connection_args={"uri": URI},
index_params={"index_type": "FLAT", "metric_type": "L2"},
)MongoDB
bash
pip install -qU langchain-mongodbpython
from langchain_mongodb import MongoDBAtlasVectorSearch
vector_store = MongoDBAtlasVectorSearch(
embedding=embeddings,
collection=MONGODB_COLLECTION,
index_name=ATLAS_VECTOR_SEARCH_INDEX_NAME,
relevance_score_fn="cosine",
)更多信息请参阅 MongoDB LangChain 集成文档。
PGVector
bash
pip install -qU langchain-postgresbash
uv add langchain-postgrespython
from langchain_postgres import PGVector
vector_store = PGVector(
embeddings=embeddings,
collection_name="my_docs",
connection="postgresql+psycopg://..."
)PGVectorStore
bash
pip install -qU langchain-postgresbash
uv add langchain-postgrespython
from langchain_postgres import PGEngine, PGVectorStore
pg_engine = PGEngine.from_connection_string(
url="postgresql+psycopg://..."
)
vector_store = PGVectorStore.create_sync(
engine=pg_engine,
table_name='test_table',
embedding_service=embedding
)Pinecone
bash
pip install -qU langchain-pineconebash
uv add langchain-pineconepython
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)Qdrant
bash
pip install -qU langchain-qdrantbash
uv add langchain-qdrantpython
from qdrant_client.models import Distance, VectorParams
from langchain_qdrant import QdrantVectorStore
from qdrant_client import QdrantClient
client = QdrantClient(":memory:")
vector_size = len(embeddings.embed_query("sample text"))
if not client.collection_exists("test"):
client.create_collection(
collection_name="test",
vectors_config=VectorParams(size=vector_size, distance=Distance.COSINE)
)
vector_store = QdrantVectorStore(
client=client,
collection_name="test",
embedding=embeddings,
)Redis
bash
pip install -qU langchain-redisbash
uv add langchain-redispython
import os
from langchain_redis import RedisConfig, RedisVectorStore
config = RedisConfig(
index_name="my_vectors",
redis_url=os.getenv("REDIS_URL", "redis://localhost:6379"),
distance_metric="COSINE"
)
vector_store = RedisVectorStore(embeddings=embeddings, config=config)Oracle AI Database
bash
pip install -qU langchain-oracledbbash
uv add langchain-oracledbWARNING
langchain-community 包已不再维护。从 langchain_community 导入的示例可能已过时或失效。请谨慎使用。
python
import oracledb
from langchain_oracledb.vectorstores import OracleVS
from langchain_oracledb.vectorstores.oraclevs import create_index
from langchain_community.vectorstores.utils import DistanceStrategy
username = "<username>"
password = "<password>"
dsn = "<hostname>:<port>/<service_name>"
connection = oracledb.connect(user=username, password=password, dsn=dsn)
vector_store = OracleVS(
client=connection,
embedding_function=embedding_model,
table_name="VECTOR_SEARCH_DEMO",
distance_strategy=DistanceStrategy.EUCLIDEAN_DISTANCE
)turbopuffer
bash
pip install -qU langchain-turbopufferbash
uv add langchain-turbopufferpython
from langchain_turbopuffer import TurbopufferVectorStore
from turbopuffer import Turbopuffer
tpuf = Turbopuffer(region="gcp-us-central1")
ns = tpuf.namespace("langchain-test")
vector_store = TurbopufferVectorStore(embedding=embeddings, namespace=ns)Valkey
bash
pip install -qU "langchain-aws[valkey]"bash
uv add langchain-aws --extra valkeypython
from langchain_aws.vectorstores import ValkeyVectorStore
vector_store = ValkeyVectorStore(
embedding=embeddings,
valkey_url="valkey://localhost:6379",
index_name="my_index"
)Weaviate
bash
pip install -qU langchain-weaviatebash
uv add langchain-weaviatepython
import weaviate
from langchain_weaviate import WeaviateVectorStore
# Assumes a local Weaviate instance on http://localhost:8080 with gRPC on 50051.
# See the Weaviate guide for other deployment options (Weaviate Cloud, Docker, etc.).
weaviate_client = weaviate.connect_to_local()
vector_store = WeaviateVectorStore(
client=weaviate_client,
index_name="langchain_example",
text_key="text",
embedding=embeddings,
) | 向量存储 | 按 ID 删除 | 过滤 | 按向量搜索 | 带分数搜索 | 异步 | 通过标准测试 | 多租户 | add Documents 中的 ID | 下载量 | | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | | [`ValkeyVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/valkey) | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
| | [`DatabricksVectorSearch`](https://docs.langchain.com/oss/python/integrations/vectorstores/databricks_vector_search) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
| | [`AzureCosmosDBMongoVCoreVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/azure_cosmos_db_mongo_vcore) | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
| | [`MongoDBAtlasVectorSearch`](https://docs.langchain.com/oss/python/integrations/vectorstores/mongodb_atlas) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| | [`QdrantVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/qdrant) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
| | [`PineconeVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/pinecone) | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
| | [`Milvus`](https://docs.langchain.com/oss/python/integrations/vectorstores/milvus) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| | [`Oracle AI Database`](https://docs.langchain.com/oss/python/integrations/vectorstores/oracle) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| | [`ElasticsearchStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/elasticsearch) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
| | [`Weaviate`](https://docs.langchain.com/oss/python/integrations/vectorstores/weaviate) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
| | [`AstraDBVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/astradb) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| | [`RedisVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/redis) | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
| | [`AzureCosmosDBNoSqlVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/azure_cosmos_db_no_sql) | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
| | [`Google AlloyDB`](https://docs.langchain.com/oss/python/integrations/vectorstores/google_alloydb) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
| | [`InMemoryVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/in_memory) | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | N/A |
所有向量存储
| 向量存储 | 按 ID 删除 | 过滤 | 按向量搜索 | 带分数搜索 | 异步 | 通过标准测试 | 多租户 | add Documents 中的 ID | 下载量 | | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | | [`Feature Store on Gemini Enterprise Agent Platform`](https://docs.langchain.com/oss/python/integrations/vectorstores/google_vertex_ai_feature_store) | | | | | | | | |
| | [`Google bigquery vector search`](https://docs.langchain.com/oss/python/integrations/vectorstores/google_bigquery_vector_search) | | | | | | | | |
| | [`Vector Search on Gemini Enterprise Agent Platform`](https://docs.langchain.com/oss/python/integrations/vectorstores/google_vertex_ai_vector_search) | | | | | | | | |
| | [`Amazon memorydb`](https://docs.langchain.com/oss/python/integrations/vectorstores/memorydb) | | | | | | | | |
| | [`ValkeyVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/valkey) | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
| | [`PGVector`](https://docs.langchain.com/oss/python/integrations/vectorstores/pgvector) | | | | | | | | |
| | [`PGVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/pgvectorstore) | | | | | | | | |
| | [`Chroma`](https://docs.langchain.com/oss/python/integrations/vectorstores/chroma) | | | | | | | | |
| | [`MongoDBAtlasVectorSearch`](https://docs.langchain.com/oss/python/integrations/vectorstores/mongodb_atlas) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| | [`QdrantVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/qdrant) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
| | [`DatabricksVectorSearch`](https://docs.langchain.com/oss/python/integrations/vectorstores/databricks_vector_search) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
| | [`AzureCosmosDBMongoVCoreVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/azure_cosmos_db_mongo_vcore) | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
| | [`Pinecone (Sparse)`](https://docs.langchain.com/oss/python/integrations/vectorstores/pinecone_sparse) | | | | | | | | |
| | [`PineconeVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/pinecone) | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
| | [`Milvus`](https://docs.langchain.com/oss/python/integrations/vectorstores/milvus) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| | [`Oracle AI Database`](https://docs.langchain.com/oss/python/integrations/vectorstores/oracle) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| | [`Weaviate`](https://docs.langchain.com/oss/python/integrations/vectorstores/weaviate) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
| | [`AstraDBVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/astradb) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| | [`ElasticsearchStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/elasticsearch) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
| | [`Neo4j vector index`](https://docs.langchain.com/oss/python/integrations/vectorstores/neo4jvector) | | | | | | | | |
| | [`RedisVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/redis) | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
| | [`AzureCosmosDBNoSqlVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/azure_cosmos_db_no_sql) | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
| | [`Google AlloyDB`](https://docs.langchain.com/oss/python/integrations/vectorstores/google_alloydb) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
| | [`Google firestore`](https://docs.langchain.com/oss/python/integrations/vectorstores/google_firestore) | | | | | | | | |
| | [`Google cloud SQL for postgresql`](https://docs.langchain.com/oss/python/integrations/vectorstores/google_cloud_sql_pg) | | | | | | | | |
| | [`Sap hana cloud vector engine`](https://docs.langchain.com/oss/python/integrations/vectorstores/sap_hanavector) | | | | | | | | |
| | [`SemanticaVectorStore`](https://docs.getsemantica.ai/integrations/langchain) | ❌ | | | | | | | |
| | [`Google spanner`](https://docs.langchain.com/oss/python/integrations/vectorstores/google_spanner) | | | | | | | | |
| | [`OpensolrVectorStore`](https://opensolr.com/langchain) | | | | | | | | |
| | [`OceanbaseVectorStore`](https://pypi.org/project/langchain-oceanbase/) | | | | | | | | |
| | [`InfinoVectorStore`](https://infino.ai/docs) | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
| | [`ChronoVecVectorStore`](https://mchl-labs.github.io/chronovec/integrations/langchain) | | | | | | | | |
| | [`IBM db2 vector store and vector search`](https://github.com/langchain-ai/langchain-ibm/tree/main/libs/langchain-db2) | | | | | | | | |
| | [`SingleStoreVectorStore`](https://docs.singlestore.com/cloud/developer-resources/functional-extensions/working-with-vector-data/) | | | | | | | | |
| | [`TeradataVectorStore`](https://github.com/Teradata/langchain-teradata) | | | | | | | | |
| | [`AsyncCockroachDBVectorStore`](https://github.com/cockroachdb/langchain-cockroachdb/) | | | | | | | | |
| | [`YDB`](https://ydb.tech/) | | | | | | | | |
| | [`TypesenseVectorStore`](https://github.com/typesense/langchain-typesense#readme) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| | [`CouchbaseSearchVectorStore`](https://docs.couchbase.com/server/current/vector-search/vector-search.html) | | | | | | | | |
| | [`SQLServer`](https://learn.microsoft.com/en-us/azure/azure-sql/database/ai-artificial-intelligence-intelligent-applications?view=azuresql) | | | | | | | | |
| | [`PolarDBXVectorStore`](https://github.com/polardb/langchain-polardbx) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| | [`Intel's visual data management system (VDMS)`](https://github.com/IntelLabs/vdms) | | | | | | | | |
| | [`Azure database for postgresql - flexible server`](https://docs.langchain.com/oss/python/integrations/vectorstores/azure_db_for_postgresql) | | | | | | | | |
| | [`SurrealDBVectorStore`](https://surrealdb.com/docs/build/deployment/surrealdb-cloud/getting-started) | | | | | | | | |
| | [`VectorPandaStore`](https://www.vectorpanda.com/docs/tutorials/langchain) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| | [`SereneDB`](https://serenedb.com/docs/clients/langchain-serenedb) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| | [`Mariadb`](https://mariadb.com/docs/connectors/other/langchain-mariadb/api-reference) | | | | | | | | |
| | [`MixpeekVectorStore`](https://mixpeek.com/docs/agent-integrations/langchain) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
| | [`PolignVectorStore`](https://github.com/Polign/polign/tree/main/python/langchain-polign) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| | [`FalkorDBVector`](https://docs.falkordb.com/genai-tools/langchain.html) | | ✅ | ✅ | | | | | |
| | [`ShannonBaseVectorStore`](https://github.com/apoorva-01/langchain-shannonbase) | | | | | | | | |
| | [`BigtableVectorStore`](https://cloud.google.com/bigtable) | | | | | | | | |
| | [`Google memorystore for Redis`](https://docs.langchain.com/oss/python/integrations/vectorstores/google_memorystore_redis) | | | | | | | | |
| | [`openGauss`](https://github.com/mpb159753/langchain-opengauss) | | | | | | | | |
| | [`RostamVectorStore`](https://github.com/rostamlabs/rostam/tree/main/clients/langchain-rostam) | | | | | | | | |
| | [`PolarDBPGVector`](https://github.com/polardb/langchain-polardb-pg) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| | [`Google cloud SQL for mysql`](https://docs.langchain.com/oss/python/integrations/vectorstores/google_cloud_sql_mysql) | | | | | | | | |
| | [`Kinetica vectorstore`](https://github.com/kineticadb/langchain-kinetica) | | | | | | | | |
| | [`ZeusDB`](https://docs.zeusdb.com/en/latest/) | | | | | | | | |
| | [`LambdaDB`](https://docs.lambdadb.ai/guides/get-started/quickstart) | | | | | | | | |
| | [`PixeltableVectorStore`](https://docs.pixeltable.com/overview/pixeltable) | | | | | | | | |
| | [`turbopuffer`](https://docs.langchain.com/oss/python/integrations/vectorstores/turbopuffer) | | | | | | | | |
| | [`VastDBVectorStore`](https://github.com/vast-data/vast-vector-store) | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
| | [`Moorcheh`](https://www.moorcheh.ai/) | | | | | | | | |
| | [`Activeloop Deep lake`](https://docs.deeplake.ai/) | | | | | | | | |
| | [`Vectara`](https://docs.vectara.com/) | | | | | | | | |
| | [`ActianVectorAIVectorStore`](https://docs.vectoraidb.actian.com) | | | | | | | | |
| | [`Gel`](https://github.com/geldata/langchain-gel) | | | | | | | | |
| | [`DeweyVectorStore`](https://github.com/meetdewey/langchain-dewey) | | | | | | | | |
| | [`Firebolt`](https://docs.firebolt.io/guides/integrations/langchain) | | | | | | | | |
| | [`YantrikDBVectorStore`](https://github.com/yantrikos/langchain-yantrikdb) | ✅ | | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
| | [`Vedb for mysql`](https://docs.volcengine.com/docs/6357?lang=en) | | | | | | | | |
| | [`Volcengine rds for mysql`](https://docs.volcengine.com/docs/6313?lang=en) | | | | | | | | |
| | [`Alibaba cloud mysql`](https://github.com/wangkuahai/langchain-alibabacloud-mysql) | | | | | | | | |
| | [`ChDBVectorStore`](https://github.com/chdb-io/langchain-chdb) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| | [`LindormVectorStore`](https://help.aliyun.com/en/lindorm/user-guide/enable-vector-engine) | | | | | | | | |
| | [`CosVectors`](https://github.com/hushengquan/langchain-cos-vectors) | | | | | | | | |
| | [`FAISS`](https://github.com/facebookresearch/faiss) | | | | | | | | | N/A | | [`InMemoryVectorStore`](https://docs.langchain.com/oss/python/integrations/vectorstores/in_memory) | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | N/A |