
Build a RAG Chatbot in Next.js: Retrieval, Streaming & Citations (2026)
Build a RAG chatbot in Next.js with the AI SDK: embed the query, search pgvector, stream a grounded answer with citations, and stop hallucinations.
Author
Software Engineer · AI Builder · Writer · Expedia Group
Software engineer writing about AI, Claude Code, LLMs, OpenAI, Anthropic, and developer tooling. 56 articles on AI engineering, production systems, and the tools shaping modern development. 5+ years at Expedia Group, Tekion, and BYJU'S.

Build a RAG chatbot in Next.js with the AI SDK: embed the query, search pgvector, stream a grounded answer with citations, and stop hallucinations.

React Server Components in 2026: the mental model that finally clicks, the use client boundary rules, and when NOT to use them — with the Web Vitals payoff.

Vercel AI SDK in production: streaming, tool-calling, aborting generations, error retry UX, rate limiting, and cost control — the layer every tutorial skips.

Kimi K3 vs Claude Fable 5, benchmark by benchmark: where the 2.8T open model beats Anthropic's flagship, where it loses, what it costs, and how to actually use it.

Streaming HTML out of order without JavaScript: how Declarative Partial Updates and Declarative Shadow DOM reorder content natively in Chrome 148.

The ChatGPT Apps SDK explained: how apps in ChatGPT work, why it's built on MCP, who the launch partners are, and how developers build and submit apps.