Stack · RAG infrastructure

Next.js + pgvector.

Next.js + pgvector is the simplest production RAG stack. PostgreSQL with vector extensions, no separate vector DB.

CategoryRAG infrastructure
Best forRAG systems
Why together · 01

Why this combo works.

pgvector adds vector similarity to PostgreSQL. Hybrid search via full-text + vector. One database to back up, one set of permissions.

Setup

Enable pgvector via CREATE EXTENSION vector; create indexes (HNSW recommended); embed via Anthropic or OpenAI.

Gotchas

  • HNSW index build can take time on large tables
  • Hybrid search needs careful weight tuning
  • Embedding model choice matters more than DB choice
  • Refresh strategy for stale embeddings is non-trivial
Building this stack?

We've shipped it.

Default vector store for RAG projects. If you're going to ship on this stack, brief us. We can save you a few weeks of gotchas.

Brief us

Got a stack decision to make?

Vedwix has shipped on most modern stacks. Brief us in three sentences.

Talk to us