Skip to content
Back to AI Lab

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

  1. A system instruction with role, goals, and hard bans.
  2. A single source-of-truth JSON for projects and technologies.
  3. Rule: if it is not in the JSON — say you do not know.
  4. 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.