- You do not need a dedicated vector database for RAG until scale, latency or filtering needs outgrow the database you already run. For many teams that point never comes.
- A general database with a vector extension, such as Postgres with pgvector, keeps documents, permissions and vectors in one place, with transactions and backups you already operate.
- A dedicated vector database earns its place at very large scale, very high query rates, or when you need its specific features, such as built-in hybrid search or multi-tenant isolation.
- Retrieval quality depends far more on chunking, hybrid search, permission filtering and evaluation than on which vector store you pick.
Teams starting with retrieval-augmented generation often begin by choosing a vector database, as if it were the main decision. It rarely is. For most systems, the question "do you need a vector database for RAG?" has a simple answer: not a new one. The database you already run can usually store and search embeddings well enough, and the effort is better spent elsewhere.
01What does RAG actually need from a vector database?
Four things: store an embedding next to each chunk of text, find the chunks nearest to a query embedding quickly, filter those results by metadata such as permissions, source or date, and keep all of it in step with the source documents as they change (see how RAG works).
Modern general-purpose databases do all four. Postgres has the pgvector extension; most major databases and search engines now offer vector search in some form.
02Why use the database you already run?
- One source of truth. Chunks, metadata, permissions and vectors live together, so a document update or deletion updates everything in one transaction.
- Filtering is ordinary SQL, including joins against your existing permission tables (see filter by permission before you rank).
- You already operate it: backups, monitoring, access control, compliance reviews.
- Keyword search is there too, which you need for hybrid retrieval anyway (see hybrid search beats pure vector search).
-- Hybrid retrieval in one query: permission filter first, then vector and keyword scores combined.
WITH allowed AS (
SELECT c.id, c.text, c.embedding, c.tsv
FROM chunks c
JOIN document_access a ON a.document_id = c.document_id
WHERE a.principal_id = ANY(:user_principals)
)
SELECT id, text,
1 - (embedding <=> :query_embedding) AS vector_score,
ts_rank(tsv, plainto_tsquery('english', :query)) AS keyword_score
FROM allowed
ORDER BY 0.7 * (1 - (embedding <=> :query_embedding))
+ 0.3 * ts_rank(tsv, plainto_tsquery('english', :query)) DESC
LIMIT 40; -- then rerank the top resultsThe weights are a starting point, not a recommendation: tune them against your own evaluation set.
Pick the vector store last. Chunking, filtering and evaluation decide retrieval quality.
03When is a dedicated vector database worth it?
When you have measured a limit you cannot work around:
- Very large collections, where index size and memory outgrow what your database runs comfortably.
- Very high query rates or strict latency targets that a shared database cannot meet without affecting other workloads.
- Specific features you need, such as built-in hybrid ranking, multi-tenant isolation at scale, or managed scaling you do not want to run yourself.
Benchmark on your own data and queries before switching. Published benchmarks rarely match your filters, document sizes or traffic.
04What matters more than the vector database?
In rough order of impact on answer quality:
- Chunking along the structure of your documents (see chunk by structure, not token count).
- Hybrid search and reranking, so exact terms are found as well as paraphrases.
- Permission filtering, so results are correct for the person asking.
- The embedding model, chosen and tested on your domain (see tokens and embeddings).
- An evaluation set of real questions with the passages that should be found, so every change is measured.
05Where to go next
Deciding whether you need RAG at all? Read RAG vs fine-tuning. For how we build retrieval for production, see RAG development.