How I wrote a prompt that cut hallucinations by ~80%
Model hallucinations are not a personality trait — they are missing constraints.
Problem
A portfolio AI assistant will invent projects, stack items, and achievements unless you fence it in. Recruiters notice instantly.
Pattern
- A system instruction with role, goals, and hard bans.
- A single source-of-truth JSON for projects and technologies.
- Rule: if it is not in the JSON — say you do not know.
- History and message length limits on the API side.
Outcome
Answers get shorter, sharper, and grounded. The model stops inventing a CV.
The chatbot on this site uses the same pattern.