← All Chapters

Chapter 4: Resources & Code

The Hallucination Economy · Python pipeline · Live benchmarks

This page contains companion resources for Chapter 4.
The full chapter is in the book.

Get the Book on Amazon

Run the Code

Hallucination detection pipeline from the book — RAG + self-consistency + LLM-as-judge. Zero setup, runs in your browser.

Open in Google Colab

Live Benchmarks

Hallucination rates change as models update. The book explains why. These links show current numbers.

Vectara Leaderboard

Standardized hallucination rates for frontier models.

Visit →

OpenAI: Why LLMs Hallucinate

The paper that admits guessing outperforms honesty on benchmarks.

Read paper →

Sources from This Chapter

Exercise

Open the Colab notebook above. Remove the RAG context and let the model answer from memory. Ask: "What was the population of Liechtenstein in 1937?" — watch the consistency layer catch divergence.

Discuss

Join #ch04-hallucinations on Discord
← Ch.3 All Chapters