Agentic-RAG-Platform

ADR-001: PostgreSQL + pgvector for vector storage

Context

We need a storage layer for document chunks + their embeddings + metadata. We also need lexical (full-text) search on the same chunks. The system must support RBAC-aware retrieval (filtering by access policy in the WHERE clause, before the vector search).

Problem

Choose between a dedicated vector database (Pinecone, Weaviate, Qdrant, Milvus) vs. PostgreSQL with the pgvector extension.

Options considered

Option A: Dedicated vector DB (Pinecone / Weaviate / Qdrant)

Option B: PostgreSQL + pgvector

Option C: Hybrid (Postgres for metadata + dedicated DB for vectors)

Decision

Option B: PostgreSQL + pgvector.

Rationale

Trade-offs

Consequences

What happens if this component fails?

How would we replace it later?