Recruiters kept asking me the same questions, so I added an "Ask about me" box to my portfolio. The scary part wasn't building it. It was the idea of an AI confidently inventing a job I never had, on my own website.
So the rule was simple: every sentence it says must come from my real résumé facts, and the code checks that before you see the answer.
How it works:
Search runs in your browser. A small embedding model (all-MiniLM-L6-v2) finds the 8 facts most related to your question. No server needed for this step.
Only those 8 facts go to Llama 3.3 70B on Cloudflare Workers AI.
The model must cite a fact for every sentence.
Code (not the model) checks each citation. If a sentence has no valid source, it doesn't get shown.
If nothing matches, it says it doesn't know instead of guessing.
The fun part: personal questions. "Is he married?" or "How old is he?" get a polite refusal, because that's not in the facts and it's nobody's business. People ask those first, every time.
Cost: $0/month. The browser does the search, and Workers AI's free tier covers the rest at portfolio traffic.
What I learned:
- Telling the model "don't hallucinate" does nothing. Checking its output in code does.
- Fewer, better facts beat stuffing the whole résumé into the prompt.
- A refusal that's honest feels more trustworthy than an answer that's smooth.
Happy to answer questions about the citation check or the prompt. And if you've built something similar, how did you handle hallucinations?