All work

05AI Engineering

Ask my portfolio

The chatbot on this site: retrieval-augmented, grounded only in my own content, and honest when it doesn't know.

Period
2026
Role
Designed and built
Stack
Next.jsTypeScriptClaude APIBM25RAG
Links

01 Problem

Portfolios claim skills. A recruiter with one specific question still has to dig through every section. This one lets you ask, and it answers only from what is actually on the site.

02 Approach

  1. 01Every content file on the site (profile, experience, projects, research, skills) is the single source of truth for both the pages and the bot.
  2. 02At build time, the content is split into small, citable chunks and indexed for BM25 keyword retrieval, with optional dense embeddings for hybrid search.
  3. 03Each question retrieves the top matching chunks; Claude answers with a strict system prompt: use only the retrieved context, cite it, never invent dates or numbers, stay under ~120 words, decline off-topic requests.
  4. 04Answers stream token by token. Per-IP rate limiting and input caps protect the API key, which only ever lives on the server.
  5. 05If the API is down or out of quota, the widget fails gracefully to a contact link.

03 Architecture

  1. 01Content files/content/*.ts
  2. 02Chunkerbuild time
  3. 03IndexBM25 (+ embeddings)
  4. 04Top-k retrieval
  5. 05Claudegrounded answer
  6. 06Streamed replywith citations
Data flow · Content files → Chunker → Index → Top-k retrieval → Claude → Streamed reply

04 Results

  • No vector database or extra infrastructure: the whole index ships as one JSON file.

  • Every answer links back to the section it came from.