Skip to content
LangChain 文档版本 跟随上游 源快照 ce0f7715 更新于 2026-10-08

向量存储集成

使用 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-openai
bash
uv add langchain-openai
python
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-ai
python
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-genai
python
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-vertexai
python
from langchain_google_vertexai import VertexAIEmbeddings

embeddings = VertexAIEmbeddings(model="text-embedding-005")
AWS
bash
pip install -qU langchain-aws
python
from langchain_aws import BedrockEmbeddings

embeddings = BedrockEmbeddings(model_id="amazon.titan-embed-text-v2:0")
HuggingFace
bash
pip install -qU langchain-huggingface
python
from langchain_huggingface import HuggingFaceEmbeddings

embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2")
Ollama
bash
pip install -qU langchain-ollama
python
from langchain_ollama import OllamaEmbeddings

embeddings = OllamaEmbeddings(model="nomic-embed-text")
Cohere
bash
pip install -qU langchain-cohere
python
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-mistralai
python
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-nomic
python
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-endpoints
python
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-voyageai
python
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-ibm
python
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-core
python
from langchain_core.embeddings import DeterministicFakeEmbedding

embeddings = DeterministicFakeEmbedding(size=4096)
xAI
bash
pip install -qU langchain-xai
python
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-perplexity
python
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-deepseek
python
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-core
bash
uv add langchain-core
python
from langchain_core.vectorstores import InMemoryVectorStore

vector_store = InMemoryVectorStore(embeddings)
Amazon OpenSearch
bash
pip install -qU boto3
python
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-astradb
bash
uv add langchain-astradb
python
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-cosmos
bash
uv add langchain-azure-cosmosdb azure-cosmos
python
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 pymongo
bash
uv add pymongo
python
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-chroma
bash
uv add langchain-chroma
python
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-cockroachdb
bash
uv add langchain-cockroachdb
python
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.sh

Elasticsearch 将可通过 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-pg
bash
uv add langchain-google-alloydb-pg
python
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-milvus
bash
uv add langchain-milvus
python
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-mongodb
python
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-postgres
bash
uv add langchain-postgres
python
from langchain_postgres import PGVector

vector_store = PGVector(
    embeddings=embeddings,
    collection_name="my_docs",
    connection="postgresql+psycopg://..."
)
PGVectorStore
bash
pip install -qU langchain-postgres
bash
uv add langchain-postgres
python
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-pinecone
bash
uv add langchain-pinecone
python
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-qdrant
bash
uv add langchain-qdrant
python
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-redis
bash
uv add langchain-redis
python
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-oracledb
bash
uv add langchain-oracledb

WARNING

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-turbopuffer
bash
uv add langchain-turbopuffer
python
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 valkey
python
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-weaviate
bash
uv add langchain-weaviate
python
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 |

BytesRouter 是社区翻译站点,所有译文仅供参考,一切以官方英文原文为准。