GuidesAI reliability

AI hallucinations: why AI makes things up, and how to stop it

By the Banzai Labs teamUpdated on 2 min read

No source: it fills the gapWith a source: it cites
Without a source, the model fills the gap. With a source provided, it cites and you check.

Why a model makes things up

A language model completes a text with the most likely continuation. When information is missing, the most likely continuation is an answer that looks right. It is not lying, it is filling the gap.

The causes, and the fix
What causes hallucinations
  • Missing information
  • An ambiguous question
  • An instruction that forces an answer
  • A context that is too long
What prevents them
  • Sources in the context
  • The right to say “I don’t know”
  • A required citation
  • A check in code

The method, in five points

  1. 1Provide the sourceThe useful passages, retrieved from your documents (RAG).
  2. 2Allow ignorance“If the answer is not in the documents, say so.”
  3. 3Require citationsEvery claim points to the passage that supports it.
  4. 4Check in codePrices, dates, references: compared with the database before display.
  5. 5TestA set of trick questions, replayed on every change.

Where to be most careful

Use Risk Safeguard
Customer service A made-up promise Answers limited to approved content
Figures, prices A wrong amount Value read from the database, never generated
Legal, health A binding error Systematic human review

See also AI chatbot for a website and AI agents on real data.

Frequently asked questions

Can hallucinations be removed completely?
No. You make them rare and detectable: answers backed by a source, code checks on figures and references, human review on anything binding.
Is lowering the temperature enough?
No. It makes answers more consistent, not more true. A model can repeat the same mistake with confidence.
Do newer models hallucinate less?
Generally yes, but the first lever stays the same: give it the information rather than rely on its memory.

Read next

All guides