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
- 01Every content file on the site (profile, experience, projects, research, skills) is the single source of truth for both the pages and the bot.
- 02At build time, the content is split into small, citable chunks and indexed for BM25 keyword retrieval, with optional dense embeddings for hybrid search.
- 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.
- 04Answers stream token by token. Per-IP rate limiting and input caps protect the API key, which only ever lives on the server.
- 05If the API is down or out of quota, the widget fails gracefully to a contact link.
03 Architecture
01Content files/content/*.ts
02Chunkerbuild time
03IndexBM25 (+ embeddings)
04Top-k retrieval
05Claudegrounded answer
06Streamed replywith citations
- 01Content files/content/*.ts
- 02Chunkerbuild time
- 03IndexBM25 (+ embeddings)
- 04Top-k retrieval
- 05Claudegrounded answer
- 06Streamed replywith citations
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.