Next.js + pgvector
for RAG builders.
Next.js + pgvector is the simplest production RAG stack. PostgreSQL with vector extensions, no separate vector DB. For RAG builders: Hybrid search via pg_trgm + vector, reranker pipeline, citation traceability.
This stack, applied to you.
For RAG builders, Next.js + pgvector is the simplest production RAG stack. PostgreSQL with vector extensions, no separate vector database, hybrid search via full-text + vector indexes. The stack handles 10M+ vectors comfortably without a separate vector DB. Most production RAG systems in 2026 use this exact pattern.
RAG builders-specific gotchas
- HNSW indexes need tuning at scale (m, ef_construction)
- Hybrid search needs careful BM25 + vector weight tuning
- Embedding model choice matters more than DB choice
- Refresh strategy for stale embeddings is non-trivial
- Reranker is the single highest-leverage RAG upgrade
A RAG team builds on pgvector + Cohere Rerank. Hybrid search retrieves 50 candidates, reranker reorders to top 5, Claude generates with citations. Total query time: ~600ms. Citation accuracy: 92%.
Common RAG builders questions.
When do we move to a dedicated vector DB?
Past 50M vectors or strict <100ms latency at high QPS.
What about full-text search alternatives like Typesense?
Typesense for hybrid search workflows that need search-engine UX. pgvector for RAG-specific.
We've shipped this.
Default vector store for RAG projects. If you're a RAG builders shipping on this stack, we can save you a quarter.
Brief us