Saraswati Stitch needle-and-thread markSaraswati Stitch®contact@saraswatistitch.com
← Glossary

Definition

Vector database

A vector database stores embeddings and finds the closest matches to a query vector quickly, which is what lets a RAG system retrieve the right passages from millions of documents in milliseconds.

Once your documents are embeddings, you need somewhere to keep them and a fast way to ask "which of these is nearest to my question." That is a vector database: Pinecone, Weaviate, pgvector on Postgres, and others.

For most teams we start with pgvector because the data is already in Postgres, and move to a dedicated store only when scale demands it.

Related terms

  • Embeddings: An embedding is a list of numbers that captures the meaning of a piece of text, so that passages about similar things sit close together and can be found by similarity rather than exact words.
  • Retrieval-augmented generation (RAG): Retrieval-augmented generation is a technique that fetches relevant passages from your own documents at question time and hands them to the model, so its answer is grounded in your data instead of its training.