Dense Vectors

A dense vector is a mathematical construct consisting of a fixed array of real values. Vectors are considered dense if most of their elements are nonzero.

In the context of search, dense vectors are generated by embedding models. These models transform words, sentences, or entire documents into dense vectors that capture the meaning of the underlying text. This makes it possible to search collections of text based on semantic meaning.

Dense vectors can be stored in ParadeDB with the vector type.

HNSW Index

Search over massive collections of vectors can be slow. HNSW (Hierarchical Navigable Small World) is an algorithm that significantly accelerates vector search times.

The HNSW index constructs a multi-layered graph structure, where each layer is a subset of the previous one, enabling faster navigation over vectors. This approach allows HNSW to achieve state-of-the-art search speed and accuracy.

ParadeDB’s HNSW implementation is powered by pgvector, a Postgres extension that enables HNSW search over dense vectors.