LangChain/Data Pipeline
Intermediate10 min

Vector Stores

Storing and querying embeddings, similarity_search(), Pinecone, Chroma, pgvector, FAISS. When to use which.

Quick Reference

  • VectorStore is the base interface — add_documents(), similarity_search(), similarity_search_with_score()
  • FAISS is great for local development and prototyping — no server needed, pure in-memory
  • Chroma is the lightweight persistent option — embedded mode with SQLite backing
  • pgvector integrates with existing PostgreSQL infrastructure — ideal if you already run Postgres
  • Pinecone is the managed cloud option — zero ops, scales automatically, but adds vendor lock-in

The VectorStore Interface

VectorStore

A vector store holds document embeddings and supports similarity search. Given a query, it finds the most semantically similar documents. Every vector store in LangChain implements the same interface: add_documents(), similarity_search(), and as_retriever().

Core VectorStore operations