Chatbots on portfolios tend to invent things. This one matches questions to a knowledge base built from the CV, can only navigate to allowlisted sections, and never turns visitor text into a URL or code.
Click the avatar on my portfolio and a chat panel opens. Questions are cleaned, safety-checked and scored against intents written from the CV. A confident match returns a stored answer with action buttons; anything else gets an honest “the portfolio doesn’t say” and the closest questions.
An optional LLM fallback is designed (a serverless endpoint holding the key) but deliberately not enabled on GitHub Pages.
What it includes
- Deterministic answersWeighted intent scoring over phrase and word keys.
- Allowlisted actionsButtons can only scroll to listed sections or open listed links.
- Input safetyURLs, HTML, code and javascript: get a fixed reply; rendering uses textContent only.
- 3D avatarHead and eyes follow the cursor; reduced-motion aware.
- LLM fallbackPlannedEndpoint contract defined; off by default.
How it is put together
- Visitor questionMax 300 chars, rate-limited
- Safety checkLinks, HTML, code rejected
- Intent scoringVerified knowledge base
- Allowlisted actionScroll or open known link
- Honest fallbackNo match → no guess
- No free-form generation
- No visitor text in URLs or selectors
- Nothing stored or sent
How a message is handled.