Vector database

Also: vector store, vector DB, vector index

Stores high-dimensional vectors with their metadata and answers nearest-neighbor queries by cosine, dot-product or Euclidean distance. Approximate indexes such as HNSW or IVF trade a little recall for sub-second search over millions or billions of vectors.

Example

Five documents are encoded with all-MiniLM-L6-v2 into 384-dimensional vectors and added to a Chroma collection; collection.query(n_results=3) then returns the 3 nearest to "How do neural networks work?". An exact flat scan costs O(n); HNSW about O(log n) at ~98% accuracy.

See it in the lesson: Vector Databases & Search →

Related terms

More in Retrieval, RAG & Agents