What is a vector database, and does RAG always need one?
Answer out loud or in your head first, then compare.
Answer
A vector database or index helps find objects with similar numerical representations. Instead of asking only for an identical word, you can find passages similar in meaning to the question. A separate product can do this, or an ordinary database with an extension, e.g. PostgreSQL with pgvector.
But RAG doesn't by definition require a separate vector database. Materials can also be retrieved by keywords, or through an existing search engine. The choice depends on the data and the quality of results. The search mechanism still has to respect permissions. A document being close to the question in number space doesn't give the user the right to read it.
Why it matters: Separates the goal of RAG from one particular tool.
Possible follow-ups: When is PostgreSQL enough instead of an extra service?
How did it go? Be honest — “Not yet” puts the question on your review list.
Further reading
- pgvector: official repository and documentation(opens in a new tab)Docs; accessed 22.10.2026. Exact vs ANN search, indexes, and how filters affect search.