Vector database

A vector database is a data store built to index and search embedding vectors at scale. It answers nearest-neighbor queries, which vectors are most similar to this one, quickly enough to power semantic search over millions or billions of items.

What is a vector database?

A vector database stores embeddings and retrieves the ones nearest to a query vector. Where a traditional database matches exact values, a vector database matches by similarity, returning the closest neighbors under a distance metric such as cosine similarity. To stay fast at scale it relies on approximate nearest neighbor indexes rather than comparing against every stored vector.
Examples include purpose-built systems like Qdrant, Pinecone, Milvus, and LanceDB, as well as vector extensions to general-purpose databases.

Key takeaways

  • A vector database indexes embeddings for similarity search.
  • It answers nearest-neighbor queries in milliseconds at scale.
  • It relies on approximate nearest neighbor indexing for speed.

How it works

Embeddings are inserted along with metadata, and the database builds an ANN index over them, using structures like graph-based HNSW or quantization-based indexes. A query embedding is matched against the index to return the top-k most similar items, optionally filtered by metadata. The trade-off between recall and latency is tunable through index parameters.

Why it matters

Once a dataset outgrows brute-force comparison, a vector index is what keeps similarity search interactive. For visual AI teams, vector databases underpin natural-language search over images, find-similar workflows, and retrieval-augmented pipelines across datasets far too large to scan.

Frequently asked questions

When do I need a vector database instead of brute force?

Roughly when your collection grows past a few hundred thousand vectors or you need low-latency queries under load. Below that, exact search is often fine.

What distance metrics do vector databases use?

Most commonly cosine similarity, dot product, or Euclidean distance, chosen to match how the embedding model was trained.

Related terms

black and white photo of Jesse Mostipak
Jesse Mostipak
SEO & Content
Jesse Mostipak is the SEO and Content Manager at Voxel51, where the work is helping humans find and trust what the brand knows, and teaching the Google knowledge graph and the LLMs answering on their behalf to do the same. That question, how knowledge gets built inside a system, is one Jesse has been chasing for years. Earlier versions of it ran through a New York City high school science classroom, data science and machine learning, and developer relations at Kaggle, Posit (formerly RStudio), and Baseten. The answer doesn't change much depending on whether the learner is a teenager, a software engineer, or a knowledge graph. Jesse holds a Master's in Education from CUNY Hunter College. LinkedIn
See all articles by Jesse Mostipak
Last updated July 9, 2026

Building visual or physical AI?

Let's talk.