pgvector
Postgres extension for vector similarity search with HNSW and IVFFlat indexes.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkWhat it is
pgvector adds a vector column type and nearest-neighbour search (exact, HNSW and IVFFlat indexes) to Postgres, so embeddings live next to the rest of your data and can be filtered with ordinary SQL.
Best for
Teams on Postgres who want vector search without another database.
Skills it helps with
Learn pgvector by doing
- Hybrid search and reranking in Postgres
Combine Postgres full-text search and pgvector with reciprocal rank fusion in one SQL query, rerank the top results with a cross-encoder, and measure the gain.
- Embeddings and vector search, hands on
Embed documents, store them in Postgres with pgvector, index them and run similarity and hybrid search.
- RAG fundamentals: retrieval before generation
What RAG is and how retrieval-augmented generation works, when it beats long context or fine-tuning, and a minimal working pipeline in about 80 lines of Python.
- RAG pipeline in a day with Postgres and pgvector
Ingest your documents, answer with citations and measure retrieval against 20 questions written first.
- RAG troubleshooting cheat sheet
Why a RAG system gives wrong answers, and what to check first: wrong document, right document but wrong answer, missing recent data, slow queries, with fixes.
Related tools
Faiss
Meta's library for vector similarity search and clustering.
Chroma
Open-source embedding database that is quick to start locally, plus a hosted cloud.
LanceDB
Embedded, open-source vector and multimodal database on the Lance columnar format.
Milvus
Open-source vector database built for large collections, from the team at Zilliz.
Pinecone
Fully managed vector database with serverless indexes and built-in embedding models.
Qdrant
Open-source vector database in Rust with payload filtering and hybrid search.