pgvector

pgvector is a PostgreSQL extension that adds a vector column type and distance operators. It lets you store embeddings next to relational data and run a nearest-neighbor search in SQL.

Example

SELECT id FROM chunks ORDER BY embedding <=> $1 LIMIT 5;

Related concepts

The whole glossary