pgvector, pgvecto.rs, pgvectorscale, and other Postgres extensions for vector similarity search and AI / RAG workloads. Ranked by GitHub stars.
vector data type and ivfflat and hnsw access methods
Advanced indexing for vector data with DiskANN
Vector database plugin for Postgres, written in Rust
The simplest way to do vector search on Postgres
tiktoken tokenizer for use with OpenAI models in postgres
tiktoken tokenizer for use with OpenAI models in postgres
Text Summarization using LLMs. Built using pgrx
Vector extensions add similarity-search capabilities to Postgres — they let you store high-dimensional embeddings (from OpenAI, Cohere, Sentence-Transformers, etc.) as a new column type and run nearest-neighbor queries with HNSW or IVFFlat indexes. Postgres core doesn't ship these; the ecosystem has converged on pgvector as the de-facto standard, with pgvectorscale, pgvecto.rs, and VectorChord as scale-focused alternatives. Together they power RAG (retrieval-augmented generation), semantic search, recommendation engines, image-to-image retrieval, and anomaly detection — all without adding a separate vector database to your stack.
Reach for a vector extension when your application needs similarity search over learned representations: embedding-based product recommendations, RAG over a private knowledge base, semantic search across documents, image retrieval by perceptual similarity, or fraud detection by embedding proximity. If your queries are keyword-based or attribute-filtered, you don't need vectors — pg_trgm for fuzzy text and tsvector for full-text are simpler. If you need 100M+ vectors with sub-100ms latency at high QPS, evaluate a dedicated vector DB (Qdrant, Milvus, Weaviate) before extending Postgres. For most teams under 10M vectors, pgvector with a well-tuned HNSW index wins on operational simplicity — one database, one backup story, one auth model.
1bench is a modern GUI client for PostgreSQL — install extensions, write queries, and inspect schemas without leaving the IDE.
Try 1bench for PostgreSQL