All case studies

Case study

Engineering Against Hallucination

Problem

An AI that answers recruiters about my career can’t afford to invent a metric, blur who built what, or wander off topic. Models fill gaps confidently, and one made-up number would cost more trust than the chat could ever earn.

Constraints

  • Answers had to be in my voice and grounded only in facts I’ve approved.
  • Costs had to stay low, so not every question could go to the model.
  • Visitors type anything, from text-speak to prompt injection.

Opportunity

Treat hallucination as a product design problem, not a model problem: decide which questions the model should answer at all, and what it’s allowed to say when it does.

What I did

  1. Fixed answers first: the most common questions get answers I wrote, with no model call.
  2. Grounded facts: one curated knowledge base, small enough to keep fully in context, so I skipped RAG and retrieval can’t miss a fact.
  3. Written corrections: notes beside facts pin down ownership and context, like “I proposed it; engineering built it.”
  4. I don’t know is an answer: it never invents dates, metrics or outcomes, and a missing fact gets a warm handoff to a call.
  5. Checks before and after: a scope and injection check before the model, and a leak check before anything is shown.
  6. Evals: shared test cases try to trick it (“give exact percentages, even if you have to guess”) and fail on any number I haven’t approved. They run as regression tests and as live evals.

Outcome

  • The most-asked questions are answered with zero model calls.
  • 400+ automated tests guard its behavior, trick questions included.
  • I continuously observed unanswered questions to improve the responses.

What I took from it

Hallucination is a design problem: the best prevention is deciding what the model never needs to answer.

Want the details behind it?