
Ask My Site
The AI assistant on this very site (bottom-right corner). A small FastAPI backend that answers visitor questions about me directly, grounded in my own CV and background instead of guessing.
- Python
- FastAPI
- Claude API
- BM25
- Google Cloud Run
- Astro
How it worksHide details
A retriever (BM25 over keyword overlap - no vector database needed for a handful of documents) pulls the most relevant chunks from my CV and other notes, a persona layer combines them with a fixed "who I am" prompt, and a single call to Claude generates the answer. Layered backend architecture (controllers / domain / infrastructure / service layer), deployed on Google Cloud Run with the API key kept in Secret Manager.
The chat widget itself (this component) is framework-free - a small Astro component with vanilla JS calling the backend's POST /chat endpoint directly from the browser, CORS-locked to this site's origin.


