liveBook · Manning

Hallucination

As explained in Introduction to Generative AI, Second Edition

An AI hallucination is generated content presented as valid or plausible despite being false, fabricated, or unsupported by available evidence.

A chatbot asked when the Golden Gate Bridge was transported across Egypt once supplied a precise date—even though the event never happened. This is a hallucination: generated content presented as plausible or valid despite being false, fabricated, or unsupported. Fluent language can make such errors hard to recognize. section 5.7 section 1.13

Large language models (LLMs) generate text by predicting patterns in language, rather than understanding content as people do. They may produce an answer without expressing uncertainty or questioning a false premise. Errors can reflect inaccurate training data, but they can also arise in situations not represented in previously known sequences. Similar traps can affect models that handle images or audio as well as text. section 1.13 section 5.7

A hallucination can occur in response to an ordinary question or to an adversarial prompt designed to mislead the model. An extrinsic hallucination is a claim that cannot be confirmed in the model’s source material, such as the invented bridge journey. section 5.7

Confident answers in medical settings

In radiology exam responses, GPT-4 used confident language for incorrect answers as well as correct ones. This matters in high-risk settings: a novice who trusts an answer blindly may not detect an error. Even an accurate medical summary can mislead if it leaves out the most important evidence, a problem distinct from hallucination. section 5.8

Fabricated legal citations, nonexistent diagnoses, and false accusations can cause practical or reputational harm. Reducing hallucinations and teaching models to express uncertainty are important goals, but users also need to recognize that a convincing answer is not necessarily a reliable one. Testing and user education can help address the risks of overtrust and misuse. section 10.8 section 5.8 section 5.0

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Defines hallucination and explains pattern prediction, false premises, and possible causes without implementation detail.
Examples
Illustrates fabricated answers with a false bridge-transport question and confident errors on radiology exams.
What you can do after
Evaluate generated answers with greater awareness that fluency and confidence do not establish correctness.
How it connects
Connects hallucination to token prediction, training data, adversarial prompts, and uncertainty.

Also explained in

Compare how 29 books explain hallucination →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Introduction to Generative AI, Second Edition. The section links point to the parts of the book it draws on.