pgvector is an open-source extension for Postgres (PostgreSQL) that adds vector similarity search. A vector here is an embedding, a list of numbers that a model computes from a text or an image so that similar items get nearby vectors. pgvector stores these vectors in a normal table column, next to the rest of the data.
After CREATE EXTENSION vector, a table gets a column of type vector(n), where n is the number of dimensions, and a query orders rows by distance to a given vector: L2 distance, inner product, cosine distance, L1, Hamming or Jaccard distance. By default the search is exact; an HNSW index (a multilayer graph) or an IVFFlat index makes it approximate, which is faster but may miss some matches. Vectors can be single-precision, half-precision, binary or sparse. Because it runs inside Postgres, queries keep transactions, JOINs and point-in-time recovery, and work from any language with a Postgres client.
pgvector is free and open source under a permissive license with the same text as PostgreSQL's license. It supports Postgres 13 and later and comes preinstalled with many hosted Postgres providers.