Skip to content
Module
AI

What is a vector database? Role in RAG

A vector database is a storage system built to hold vectors, usually embeddings that represent the meaning of text or images, and to quickly find the ones closest to a given vector. It acts as the search engine behind most RAG systems. It can be a dedicated product such as Pinecone, Qdrant or Weaviate, or an add-on to a database you already run, such as pgvector for PostgreSQL.

Definition written by Alex Dionisio, Senior Product Manager. Updated November 13, 2026.

Why it matters for a PM

As soon as a product adds an assistant grounded in a document base, the vector database question comes up. It is an architecture choice with product consequences: hosting cost, how fast an updated document is reflected, filtering by access rights, where the data lives. Picking the tool is not the PM's job, but should state these requirements so the technical choice meets them.

Example

A document management app wants to add question-based search. The team weighs a dedicated service against the vector extension of the PostgreSQL database it already runs. The PM sets three requirements: a deleted document leaves the results within an hour, each customer only sees their own files, and the data stays in the EU. The PostgreSQL extension meets all three and avoids adding a vendor.

Key points

  • Search is approximate: the database returns very close matches, not always the strictly closest ones.
  • Metadata stored with each vector makes it possible to filter by customer, date or permissions.
  • Switching embedding models means recomputing and reindexing every vector.
  • A regular database with a vector extension is often enough for an initial volume of documents.

Common mistakes

  • Picking a trendy tool before defining volume, freshness and access requirements.
  • Forgetting to delete vectors when a document is removed or a customer leaves.
  • Believing the vector database alone guarantees relevant answers.

Go further with Module

The courses and lessons that cover this concept:

Guide on this topic