Skip to content

Hallucination

Halusinasi

Output that is fluent and wrong. Two different problems hide under one word.

A hallucination is model output that is confidently incorrect. There are two flavours, and they need opposite fixes.

Factuality: the model invents a fact, a function, an API signature, a citation. The information was never in its parameters, and usually is not in the context either. The fix is to give it the real information.

Faithfulness: the information was there, and the model drifted away from it as the context grew. The fix is usually to reduce context or start a fresh session.

Because the model has no internal signal for "I do not know", an invented method arrives in the same confident register as a correct one. That is what makes hallucinated code so effective at slipping past review: it looks exactly like an API that would exist.

Related terms

Want this working inside your team?

It starts with one conversation about your workflow.

Ask on WhatsApp