Portfolio AI Assistant
A retrieval-grounded AI assistant embedded in this site that answers questions about my work without hallucinating — and demonstrates the exact RAG + intent-router architecture clients hire me to build.
The problem
Recruiters and clients skim a portfolio with specific questions — "has he shipped Stripe?", "is he available?", "what's the rate?" — and bounce when the answer isn't instant. A static page can't field arbitrary questions, and a naive LLM bot would confidently invent a CV.
Architecture
- Three-stage pipeline: a lexical intent router answers factual queries (contact, rates, availability, links) with zero LLM calls; a BM25 retriever pulls the most relevant passages from the indexed portfolio; Groq's Llama 3.1 writes a grounded answer from only that context
- Strict context-only system prompt at low temperature — the model answers solely from retrieved real content and declines anything outside it, so it never invents a project, metric, or date
- Streamed token-by-token over a Next.js route handler with no SDK; the widget is lazy-loaded via next/dynamic so it adds nothing to First Load JS
- Free-tier only — Groq for inference, BM25 over a small corpus instead of a paid vector DB, Vercel Hobby functions; pgvector is a documented drop-in if the corpus grows
Highlights
Grounded by design, not by luck
The intent router shields every factual question from the LLM, and retrieval gates the rest — ask about something not in the portfolio and it declines instead of hallucinating.
Degrades gracefully
With no API key it still answers extractively from the retrieved passages, and it falls back to seed content when the database is offline — useful the moment it deploys.
Impact
0 KB
Added to First Load JS — the widget is lazy-loaded out of the critical path
9
Factual intents answered instantly with zero LLM calls (contact, availability, rates, links)
$0
Monthly cost — Groq free tier, no vector DB, no new infrastructure
0
Fabricated facts — every answer is grounded in real portfolio content or politely declines