# Hallucination

AI Glossary · LLMs & Generative AI
Canonical URL: https://aisat.uk/glossary/hallucination
Author: Lucy Gilmore, Assistant General Counsel, Product, Privacy & AI at Sprinklr | Practical Privacy, Product & AI Governance & Defensible Risk Decisions (https://www.linkedin.com/in/lucy-gilmore/)
Breadcrumb: [Glossary](https://aisat.uk/glossary) > [LLMs & GenAI](https://aisat.uk/glossary?category=llms) > Hallucination

## TL;DR

> **A hallucination** occurs when a generative AI model produces output that reads as fluent, confident, and grammatically coherent, but is factually false, fabricated, or contradicted by the provided source context. It is a structural byproduct of probabilistic next-token prediction rather than a software bug.

## How Hallucination works in practice

Language models do not store facts as discrete, lookup-verified database rows; they compress statistical associations across billions of weights during training. When prompted to complete a sequence, the model samples tokens that maximise conditional likelihood. If a user asks about a niche UK statute, an unindexed internal policy, or a specific citation, the model bridges gaps in its weights by blending high-probability patterns into a plausible fabrication.

Practitioners distinguish between two failure modes: intrinsic hallucinations, where the model contradicts or misstates facts explicitly present in the supplied prompt or RAG context; and extrinsic hallucinations, where the model invents unverifiable details, URLs, case law citations, or software package names that do not exist in the context or the real world. High sampling temperature, ambiguous prompts, and noisy or truncated retrieval chunks all increase hallucination rates.

A well-known cautionary example occurred when litigants before the High Court and Manchester County Court submitted AI-generated skeleton arguments containing fabricated case citations that looked entirely authentic in style and neutral citation format, prompting formal judicial guidance from the Courts and Tribunals Judiciary.

## Why it matters and trade-offs

In creative brainstorming or rough copy drafting, minor hallucinations are harmless friction. In regulated UK industries such as financial advice, healthcare triage, legal practice, and customer-facing contractual chatbots, a single hallucinated figure or fabricated policy promise creates regulatory liability, reputational damage, and binding financial loss (as demonstrated when airlines and retailers were held liable for discounts invented by support bots).

Hallucinations cannot be eliminated solely by buying a larger base model. Engineering teams control them through defence in depth: grounding answers via hybrid RAG, forcing inline source citations linked to chunk IDs, lowering temperature, instructing the model to abstain when evidence is absent, and running automated faithfulness evals before responses reach users.

## LinkedIn explainer post

- [Lucy Gilmore on Hallucination (Hallucinations)](https://www.linkedin.com/feed/update/urn:li:share:7522619825945247744/)

## Related AI concepts

- [Retrieval-Augmented Generation (RAG)](https://aisat.uk/glossary/retrieval-augmented-generation): Retrieval-Augmented Generation (RAG) is an AI architecture that retrieves relevant passages from external documents or databases at query time and injects them into a language model's context window to generate cited, grounded answers.
- [Evals (Evaluations)](https://aisat.uk/glossary/evals): Evals (Evaluations) are automated, repeatable testing pipelines that score an AI application's outputs against a golden dataset using deterministic assertions, reference metrics and LLM-as-a-judge rubrics before any prompt or model change ships.
- [Guardrails](https://aisat.uk/glossary/guardrails): Guardrails are programmable validation layers placed on the input and output paths of an AI application to detect prompt injections, redact personally identifiable information, verify citations and block policy-violating completions in real time.
- [Large Language Model (LLM)](https://aisat.uk/glossary/large-language-model): A Large Language Model (LLM) is a deep transformer neural network containing billions of parameters trained on massive text and code corpora to comprehend, summarise, translate, reason over and generate human and programming languages.
