Docs/KB RAG chatbot with citations
The chat widget on every page of devdudejeremy.com — and the build itself, documented.
The pitch
A prospect lands on devdudejeremy.com, asks the assistant a question, and the assistant answers with citations to actual case studies. The build is the proof.
Stack
- Next.js 16 (App Router, Edge-friendly streaming)
- Supabase Postgres + pgvector (HNSW vector index + FTS)
- Vercel AI SDK with Anthropic Claude Haiku 4.5 (prompt-cached)
- OpenAI text-embedding-3-small
- Hybrid retrieval (vector + FTS) merged via Reciprocal Rank Fusion
- Upstash Redis for rate limits + query cache
How groundedness is enforced
The system prompt forbids un-cited claims. The eval harness LLM-as-judges every answer against its cited chunks. Faithfulness ≥ 90% on the 50-question golden set is a CI gate. See live metrics.
Try it
Embed on your own site
<script src="https://docs-rag.devdudejeremy.com/embed.js" data-corpus="portfolio" defer></script>