# Hallucination

> A hallucination is output from an AI model that sounds plausible but is false, unsupported or invented, such as a made-up fact, citation, figure or policy presented with the same confidence as a correct answer.

Also called: AI hallucination, confabulation, fabrication, made-up answers. Category: Models and training. Source: https://aibuildindex.com/glossary/hallucination

## In the index

- Search over internal documents: median $2,150, middle half $300 to $8,800, 918 priced briefs (https://aibuildindex.com/cost/document-search-rag)
- Customer support chatbot: median $2,000, middle half $300 to $5,300, 1,344 priced briefs (https://aibuildindex.com/cost/support-chatbot)

Language models are built to produce fluent, likely-sounding text, not to check facts. When they lack the information, misread it or overextend a pattern, they can state something untrue in exactly the same confident tone as something true. That is a hallucination. It is the single most common reason businesses hesitate to put AI in front of customers, and much of the work in a serious AI build is designed to reduce it, detect it or limit its damage.

## How it works

Hallucinations come from a few recognisable sources:

- **Missing knowledge.** The model was never trained on your products, policies or recent events, so it fills the gap with something plausible.
- **Misreading context.** Even when given the right document, the model may combine details wrongly or attribute a statement to the wrong source.
- **Pressure to answer.** Prompts that demand an answer, with no permitted way to say "I do not know", invite invention.
- **Specific detail.** Exact numbers, names, dates, references and legal citations are where errors are both likely and costly.

Builds reduce hallucination in layers. [Grounding](https://aibuildindex.com/glossary/grounding) and [retrieval-augmented generation](https://aibuildindex.com/glossary/retrieval-augmented-generation) give the model the right source material and ask it to cite it. Clear instructions allow the model to decline. Checks in code verify facts the system can look up, such as an order status. [Guardrails](https://aibuildindex.com/glossary/guardrails) catch answers that stray outside permitted topics. For high-stakes outputs, [human-in-the-loop](https://aibuildindex.com/glossary/human-in-the-loop) review keeps a person accountable.

Consider an assistant answering questions about a company's leave policy. Without the policy document it might invent a plausible number of days. With the document retrieved and an instruction to quote the relevant section or say it cannot find one, the error becomes rarer and easier to spot.

## What it means for cost

The tolerance for error is one of the biggest drivers of build cost. An internal drafting tool, where a person always reviews the output, can accept occasional mistakes and be built quickly. A customer-facing assistant giving policy, medical, legal or financial answers needs grounding, citation, refusal behaviour, a test set of real questions and monitoring after launch, and each of those adds scope.

Ask a builder how they will measure the hallucination rate before launch, what the system does when it has no source, and how errors reported by users feed back into fixes.

## Common questions

### Can hallucinations be eliminated completely?

Not with current models. They can be reduced substantially and made easier to detect, but any system that generates free text can still produce a wrong statement. Designs for sensitive uses assume this and add checks or review.

### Are newer models less likely to hallucinate?

Generally models improve over time, but the effect depends heavily on the task and on how the build supplies information. A well-grounded build on a modest model can be more reliable than an ungrounded one on a leading model.

### How can a buyer spot hallucinations during testing?

Prepare questions with known answers, including ones the system should not be able to answer, and check every response against the source. Questions about exact figures, dates and rare cases reveal problems faster than general ones.

## Related terms

- [Grounding](https://aibuildindex.com/glossary/grounding): Grounding is the practice of tying an AI model's answers to specific, trusted sources, such as company documents, database records or search results, supplied at request time, so that responses can be checked and are less likely to be invented.
- [Retrieval-augmented generation (RAG)](https://aibuildindex.com/glossary/retrieval-augmented-generation): Retrieval-augmented generation is a way of answering questions with a language model that first looks up relevant passages in your own documents, then writes an answer grounded in what it found.
- [Guardrails](https://aibuildindex.com/glossary/guardrails): Guardrails are the checks and controls placed around an AI model, such as input filters, output validation, topic limits and action restrictions, that keep its behaviour within safe, permitted and useful bounds in a live system.
- [Large language model (LLM)](https://aibuildindex.com/glossary/large-language-model): A large language model is an AI model trained on very large amounts of text to predict the next word, which lets it write, summarise, translate, classify and answer questions in natural language.
- [Temperature](https://aibuildindex.com/glossary/temperature): Temperature is a setting on a language model that controls how random its output is: low values make answers more predictable and repeatable, higher values make them more varied and creative.
- [Human in the loop](https://aibuildindex.com/glossary/human-in-the-loop): Human in the loop is a design approach in which an automated or AI system pauses for a person to review, correct or approve its work at defined points, so that judgement and accountability stay with people where mistakes would be costly.
