vercel-labs/ai-sdk-preview-rag
A Next.js application template that implements retrieval-augmented generation using the Vercel AI SDK and PostgreSQL vector storage.

Velocity · 7d
+0.6
★ / day
Trend
→steady
star history
This repository provides a production-ready RAG template for building AI applications that can reason over external data outside a model’s training knowledge. It uses the Vercel AI SDK’s streamText function for tool-based information retrieval and the useChat hook for real-time response streaming. Vector embeddings are stored in PostgreSQL using DrizzleORM, enabling semantic search over user-provided documents.