pgvector adds vector similarity search to PostgreSQL. With 14K+ stars, it is the default choice for teams wanting vector search without adding a separate database.
Store embeddings as a native column type alongside relational data. Combine SQL filters with vector similarity search in a single query.
HNSW indexes for high-recall approximate search, IVFFlat for faster builds. L2, inner product, cosine, and L1 distance metrics.
Works with Supabase, Neon, AWS RDS, Google Cloud SQL, and self-hosted. Integrates with LangChain, LlamaIndex, and all AI frameworks supporting PostgreSQL.