liveBook · Manning

Chapter 2: Hallucinations

What you will learn in chapter 2 of The AI Pocket Book

Introduces hallucinations as a major AI limitation and explains the author’s concern that improvements may reduce mistakes without eliminating them.

After this chapter you will be able to

What it builds on

Section by section

Introduction

Introduces hallucinations as a major AI limitation and explains the author’s concern that improvements may reduce mistakes without eliminating them.

Key terms: hallucinations, epic fails, problematic cases

2.1 What are hallucinations?

Defines AI hallucinations by three characteristics: incorrectness, confident presentation, and unpredictability.

Key terms: hallucinations, incorrect, confident, unpredictable

2.2 Made-up facts

This section shows that LLMs can invent convincing facts, even when they claim those facts are real or are built for specialized research.

Key terms: hallucinations, made-up facts, LLM-based products, hallucination free

2.3 Misinterpretation

This section shows that AI can hallucinate by misinterpreting real information, not just by making up facts.

Key terms: hallucinations, misinterpretation, retrieval-augmented generation (RAG)

2.4 Incorrect solutions to problems

This section shows how AI can give incorrect solutions to tasks, sometimes while assuring users that the result is correct, across image generation, logic puzzles, coding, and image description.

Key terms: hallucination, incorrect solutions to problems, simple logic problems, river-crossing puzzles, wrong logic, API, visual content

2.5 Overconfidence

This section explains that AI can present wrong answers with unwarranted confidence and may resist correcting them even after a user points out an error.

Key terms: hallucinated outputs, overconfidence, follow-up prompt, stubbornness

2.6 Unpredictability

This section shows that LLM hallucinations can appear unpredictably, even when a question is merely rephrased or a simple prompt is rerun.

Key terms: hallucinations, unpredictable, Eiffenstein Tower, fine-tuned, Whac-a-Mole

2.7 Why does AI hallucinate?

The section frames AI hallucinations as a deeper problem than a minor bug and explains why understanding their causes matters.

Key terms: hallucinations, causes

2.8 Inadequate world models

Explains how AI can learn from examples yet develop inadequate world models that fail in unfamiliar situations.

Key terms: world model, examples, internal world model, hallucinations, shortcuts, memorization

2.9 World models: Theory vs. practice

The section contrasts the theoretical promise of learning comprehensive world models from examples with the practical limits of available training data.

Key terms: world models, learning by example, edge cases, long tail, book titles, lengthy words

2.10 Misaligned objectives

This section explains how the gap between an LLM’s training objective and a user’s need for truthful, useful answers can cause hallucinations, even when alignment techniques or RAG are used.

Key terms: objective, next-token predictions, misalignment, hallucination, manually labeled data, align, wedge, RAG, double-check answers

2.11 Toy hallucination example: Price optimization

A toy pricing example shows how a model that predicts purchases accurately can hallucinate when used to evaluate prices it has not learned to assess.

Key terms: revenue-maximizing price, probability of buying, expected revenue, training data, insufficient world model, price and sales, misaligned objective, loss, hallucinated outputs, strategic business decisions

2.12 Will hallucinations go away?

This section explains why more training data or current LLM methods may not eliminate hallucinations, and why their uncertain future calls for practical ways to live with them.

Key terms: training data, public human text data, training examples, autoregressive LLMs, world models, physical intuition, new methodology, hallucinations, mitigate

2.13 Mitigation

The section explains several ways to reduce hallucinations in LLM outputs and one way to flag outputs for validation.

Key terms: curate the training data, reinforcement learning with human feedback, RLHF, training process, Wikipedia article, prompt engineering, chain-of-thought prompting, intermediate natural language reasoning steps, RAG, retrieved information

2.14 Hallucinations can kill a product

The section uses customer-service and self-driving-car failures to show how hallucinations can threaten sensitive products, especially when unusual situations resist one-off fixes.

Key terms: hallucinations, customer-service chatbot, edge case, training data, classified or tracked, predicted the future motion, ad hoc actions, patch, software update

2.15 Living with hallucinations

The section argues that people using or building AI should plan for hallucinations from the start because they may persist and matter more in some applications than others.

Key terms: hallucinations, mitigation, detection strategies

2.16 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 1: How AI works Chapter 3: Selecting and evaluating AI tools →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.