vercel-labs/ai-sdk-preview-rag

Retrieval-augmented generation (RAG) template powered by the AI SDK.

55
/ 100
Established

Implements tool-based document retrieval through `streamText` with vector embeddings persisted in PostgreSQL via DrizzleORM, enabling the model to access custom knowledge bases. Combines real-time response streaming via the `useChat` hook with a Next.js frontend, providing end-to-end integration within Vercel's ecosystem. Uses the AI Gateway for unified model access across multiple providers.

394 stars.

No Package No Dependents
Maintenance 6 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 23 / 25

How are scores calculated?

Stars

394

Forks

79

Language

TypeScript

License

MIT

Last pushed

Dec 12, 2025

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/rag/vercel-labs/ai-sdk-preview-rag"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.