VOOZH about

URL: https://docs.langchain.com/oss/python/integrations/vectorstores/

⇱ Vector store integrations - Docs by LangChain


Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Skip to main content

Overview

A vector stores embedded data and performs similarity search.

Interface

LangChain provides a unified interface for vector stores, allowing you to:
  • add_documents - Add documents to the store.
  • delete - Remove stored documents by ID.
  • similarity_search - Query for semantically similar documents.
This abstraction lets you switch between different implementations without altering your application logic.

Initialization

To initialize a vector store, provide it with an embedding model:
from langchain_core.vectorstores import InMemoryVectorStore
vector_store = InMemoryVectorStore(embedding=SomeEmbeddingModel())

Adding documents

Add Document objects (holding page_content and optional metadata) like so:
vector_store.add_documents(documents=[doc1, doc2], ids=["id1", "id2"])

Deleting documents

Delete by specifying IDs:
vector_store.delete(ids=["id1"])
Issue a semantic query using similarity_search, which returns the closest embedded documents:
similar_docs = vector_store.similarity_search("your query here")
Many vector stores support parameters like:
  • k — number of results to return
  • filter — conditional filtering based on metadata

Similarity metrics & indexing

Embedding similarity may be computed using:
  • Cosine similarity
  • Euclidean distance
  • Dot product
Efficient search often employs indexing methods such as HNSW (Hierarchical Navigable Small World), though specifics depend on the vector store.

Metadata filtering

Filtering by metadata (e.g., source, date) can refine search results:
vector_store.similarity_search(
 "query",
 k=3,
 filter={"source": "tweets"}
)

Top integrations

Select embedding model: Select vector store:
VectorstoreDelete by IDFilteringSearch by VectorSearch with scoreAsyncPasses Standard TestsMulti TenancyIDs in add Documents
AstraDBVectorStore
AzureCosmosDBNoSqlVectorStore
AzureCosmosDBMongoVCoreVectorStore
AsyncCockroachDBVectorStore
CouchbaseSearchVectorStore
DatabricksVectorSearch
ElasticsearchStore
InMemoryVectorStore
LambdaDB
Milvus
Moorcheh
MongoDBAtlasVectorSearch
openGauss
PineconeVectorStore
QdrantVectorStore
RedisVectorStore
Weaviate
SQLServer
ValkeyVectorStore
ZeusDB
Oracle AI Database

All vector stores

Activeloop Deep Lake

Alibaba Cloud MySQL

Astra DB Vector Store

Azure Cosmos DB Mongo vCore

Azure Cosmos DB No SQL

Azure Database for PostgreSQL - Flexible Server

CockroachDB

Couchbase

Databricks

IBM Db2

Amazon Document DB

Elasticsearch

Gel

Google AlloyDB

Google BigQuery Vector Search

Google Cloud SQL for MySQL

Google Cloud SQL for PostgreSQL

Firestore

Google Memorystore for Redis

Google Spanner

Google Bigtable

Google Vertex AI Feature Store

Google Vertex AI Vector Search

Kinetica

LambdaDB

Lindorm

Amazon MemoryDB

Milvus

Moorcheh

MongoDB Atlas

Oceanbase

openGauss

Oracle AI Database

PGVectorStore

Pinecone

Pinecone (sparse)

Qdrant

Redis

SAP HANA Cloud Vector Engine

SQLServer

SurrealDB

Teradata VectorStore

Valkey

VDMS

veDB for MySQL

Volcengine RDS for MySQL

Weaviate

YDB

ZeusDB


Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

Was this page helpful?