ADR-025: pgvector as Document Store
Status: Accepted Date: 2026-06-02 Authors: paulhumanity (with grazianognoll)
Contextβ
RAGflow bundled the retrieval store with the RAG runtime. Migration off RAGflow forces a document-store decision.
Options comparedβ
- pgvector
- Dedicated managed search service
- Pinecone
- Weaviate
- Qdrant
Decisionβ
Use pgvector on the existing humanwork Postgres instance. Use HNSW for ANN search. Hybrid retrieval, with BM25 via tsvector and dense retrieval via vector, is shipped natively by Haystack's PgvectorEmbeddingRetriever and PgvectorKeywordRetriever.
Whyβ
pgvector has $0 incremental infrastructure cost, introduces no new vendor, supports hybrid retrieval out of the box, and provides sufficient scale for internal testing and early production.
Trade-offsβ
Vector scaling is tied to Postgres scaling. This is mitigated by humanwork's existing Postgres capacity; revisit if QPS or document count exceeds an order-of-magnitude growth.