ai-sdk-preview-rag  by vercel-labs

Next.js RAG template using the Vercel AI SDK

Created 1 year ago
334 stars

Top 82.1% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a Next.js template for Retrieval-Augmented Generation (RAG) using the Vercel AI SDK. It's designed for developers looking to build AI applications that can access and utilize external knowledge bases, enabling more informed and context-aware responses.

How It Works

The template leverages the AI SDK's streamText function for information retrieval via tool calls and real-time response streaming to the frontend using the useChat hook. It integrates DrizzleORM with PostgreSQL for vector embedding storage, allowing efficient management of external data. The UI is animated using Framer Motion for a dynamic user experience.

Quick Start & Requirements

  • Install dependencies: npm install
  • Prerequisites: OpenAI API key, PostgreSQL connection string.
  • Setup: Copy .env.example to .env, add API key and database URL, run npm run db:migrate, then npm run dev.
  • Project runs on http://localhost:3000.

Highlighted Details

  • Real-time streaming of model responses.
  • Vector embedding storage with DrizzleORM and PostgreSQL.
  • Information retrieval and addition via tool calls.
  • Animated UI with Framer Motion.

Maintenance & Community

This is a Vercel Labs project, indicating potential backing and development from Vercel. Further community or maintenance details are not provided in the README.

Licensing & Compatibility

The license is not specified in the provided README. Compatibility for commercial use or closed-source linking is not detailed.

Limitations & Caveats

The project is presented as a preview template, suggesting potential for breaking changes or incomplete features. Specific limitations regarding supported LLMs, vector databases, or deployment targets are not detailed.

Health Check
Last Commit

9 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
18 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Nir Gazit Nir Gazit(Cofounder of Traceloop), and
4 more.

llmware by llmware-ai

0.6%
14k
Framework for enterprise RAG pipelines using small, specialized models
Created 2 years ago
Updated 1 month ago
Feedback? Help us improve.