What is a vector database?

A vector database stores embeddings (numeric representations of meaning) and quickly finds the ones most similar to a query. It is the search engine behind many RAG features and recommendation systems.

When a user asks a question, the system turns it into an embedding and asks the vector database, "which stored items are nearest to this?" The matches are passed to the model as context. See RAG.

Do you need a dedicated one?

Often not at first. Many general databases (including Postgres, with an extension) and search engines now support vector search. A dedicated vector database earns its place when you have very large collections, heavy query volume, or need advanced filtering and tuning.

Questions to ask before choosing

  • How many items, and how fast is that growing?
  • Do results need filtering by user, tenant or permission? (Almost always yes.)
  • Do you need keyword search combined with vector search?
  • Where is the data hosted, and can you delete a customer's data on request?

The Canadian angle

If your customers require Canadian hosting, check that the vector store, not just your main database, runs in a Canadian region. See data residency.

All 27 terms in the AI glossary →