Vector Search with pgvector
Use the pgvector extension to store embeddings and run approximate nearest neighbour search with ivfflat / HNSW.
What Are Vectors For?
Embeddings encode meaning. Two documents about the same topic have similar vectors. Vector search powers semantic search, RAG (retrieval-augmented generation), and recommendation.
Enable pgvector
The extension is widely available (RDS, Cloud SQL, Supabase have it built in):
CREATE EXTENSION vector;