I added a floating assistant to davthecoder.com. It answers questions about services, mentoring, portfolio, and how to get in touch. When someone wants to hire or book mentoring, it points them at the contact form instead of collecting email in the chat.
It is not a general purpose bot and it is not a third party widget. It is also a live demo of applied AI product features: public traffic, a hard knowledge boundary, streaming UI, cost and abuse controls, and a conversion path that keeps personal data out of the chat.
Problem
Most personal sites leave people hunting through pages or staring at an empty form. Dropping in a generic LLM would invent rates, clients, and random courses. That would hurt the brand and teach nothing about how I build AI in products.
I needed three things:
- Useful answers for company leads, recruiters, and developers
- A public setup that keeps the API key off the browser (CORS, rate limits, validation)
- Portfolio proof of applied AI without claiming ML research or inventing client AI work
Architecture
Browser (Astro static site + React ChatWidget)
│ POST /v1/chat + SSE
▼
Cloudflare Worker (workers/site-chat)
validate → rate limit → input guardrails
→ system prompt + curated knowledge pack
→ LLM stream → strip handoff markers → SSE tokens / handoff / done
The static site stays simple. The Worker owns secrets and policy. Conversation history lives in the visitor’s localStorage. There is no server side transcript store in this version. Analytics events (chat_open, chat_send, chat_handoff, feedback) only fire when consent is on.
What visitors get
- Starter prompts, English and Spanish chrome, streaming replies
- Markdown with allowlisted links (this site plus my own products)
- When company or mentoring intent is clear, a primary button to
/contact?type=company|mentoring&source=chat#contact-form - No drafted emails, no public prices, no fake availability calendars
- Footer copy that this chat is also a live demo of applied AI work
Safety and cost
These are the controls that keep a public chat from becoming a toy or a liability:
| Control | Why it is there |
|---|---|
| Caps on message length, history, and output tokens | Bound spend and abuse |
| Per IP rate limit | The endpoint is public |
| Input guardrails for jailbreaks and hard off topic turns | Fail closed before the model runs |
| Fixed system rules (role, link allowlist, no third party course spam) | Keep answers on brand |
| Contact form for personal data | Privacy and better lead quality |
Numbers in the Worker can change. This write up claims the shape of the controls, not vanity metrics I have not measured for the page.
Evaluation
I keep a golden question set next to the Worker (workers/site-chat/eval/golden-set.json). It covers identity, services, AI framing, portfolio, refusing prices, jailbreaks, and a Spanish smoke set. Scoring against the live Worker is how pack gaps show up. When the bot did not know Paglipat, that was a knowledge bug, not something to paper over with a vague answer.
How this sits next to the other AI case studies
| Case study | What it shows | Role |
|---|---|---|
| Paglipat and paglipat.com | Tool calling relocation concierge, model routing, cost ledger, retention | Deepest production AI engineering |
| This page (site chat) | Curated site guide plus handoff | Live demo on the brand site |
| ElTarot.es | One contained daily AI reading | Smaller scope on purpose |
All three are independent products. None of them is a client AI engagement.
Limitations
- Knowledge is a curated pack, not full retrieval over every blog post yet.
- This chat does not run multi tool agents. Paglipat is the deep tool calling piece.
- No public day rates or start dates. That always goes through the form.
- Cost and latency only go into copy when I have measured them.
Frequently Asked Questions
Is this chat a substitute for hiring for AI work?
No. It is a demo and a guide. Company AI feature work goes through services and contact.
Where is the deeper AI agent work?
Paglipat and the live product at paglipat.com.
Does this mean you stopped doing Android and KMP?
No. Senior mobile engineering is still the core of the site. Applied AI is a specialist capability with independent portfolio proofs.
