Loading...
Loading...
Part of the masterclass
Building RAG applications with Next.js and the Vercel AI SDK is one workshop inside Full-stack AI Masterclass: Next.js + Agents + RAG.
See the full path with mentor reviews and a portfolio outcome.
Stop guessing which RAG pattern to use. Build a direct streaming chat, a native-tool retrieval route, and a full LangChain pipeline in the same codebase, then run them on the same URL to see the real tradeoffs in latency, control, and cost.
Engineers are learning here from
Ship three RAG flavors in one Next.js app with the Vercel AI SDK. Compare direct streaming chat, native provider tools, and a LangChain retrieval pipeline side by side, and pick the right one for your product.
Implement direct LLM chat, native tool RAG, and LangChain vector RAG in one Next.js app with the Vercel AI SDK.
What you'll ship
What you'll learn
Curriculum
The three RAG flavors
Understand direct chat, native tool RAG, and custom pipeline RAG, and when each one fits
Streaming chat
Wire useChat on the client and streamText on the server for end to end token streaming
Native-tool RAG
Use Gemini's built-in urlContext tool for zero-setup URL question answering
Custom pipeline RAG
Build the full retrieval pipeline with Cheerio, a recursive splitter, Mistral embeddings, and Gemini generation
Compare and ship
Add citations and error handling, then benchmark all three routes on the same URL
Who it's for
who have shipped web apps but have not wired LLM streaming end to end
who want to compare native provider RAG tools against a hand-rolled LangChain pipeline
evaluating whether to build RAG themselves or lean on a provider tool for a feature
FAQ
No. We introduce only the pieces we use: CheerioWebBaseLoader, RecursiveCharacterTextSplitter, MistralAIEmbeddings, and MemoryVectorStore. Each one has a tiny surface area.
OpenRouter for the chat route (free tier works), a Google Generative AI key for the Gemini urlContext route, and a Mistral key for embeddings in the custom pipeline.
No, and that is intentional. It keeps the workshop self-contained. In the final module we discuss what you swap in for a real deployment (Qdrant, pgvector, Chroma).
We ship all three patterns in one repo and benchmark them against each other. You leave with a working intuition for when to pick native tools versus a custom pipeline, not just theory.
The fundamentals of retrieval, streaming, and provider abstraction do not go out of date.