AI security
What is AI hallucination?
An AI hallucination is a confident but false or unsupported statement produced by an AI model, such as an invented fact, policy, source or number. The wrong answer usually sounds as fluent and certain as a correct one. That is the danger: people, workflows and AI agents act on it.
By the KDS security engineering teamPublished 3 min read
Key takeaways
- Hallucinations come from how language models work: they predict likely text, so a fluent answer is not a checked fact.
- For a business, the main risk is action: a wrong promise to a customer, a wrong record or a wrong tool call.
- Approved sources, citations, structured outputs, checks in code and human review reduce hallucinations but do not remove them.
On this page
Why AI hallucination happens
NIST calls the problem confabulation in its Generative AI Profile, NIST AI 600-1 (opens in a new tab), and describes it as a natural result of how generative models are designed. A large language model predicts the next word from patterns in its training data. That prediction is often right, but the model does not check it against a source of truth unless the system around it does. When the facts are missing, OWASP explains, the model fills the gap with text that fits the pattern.
Errors become more likely in four situations:
- Missing facts: the answer is not in the model's training data or in the documents it was given, such as your current prices or opening hours.
- Outdated or conflicting sources: an old policy page in the knowledge base says something different from the current one.
- Open or specialist questions: NIST notes that long, open-ended answers and topics that need deep expertise are more prone to errors.
- Manipulation: OWASP notes that attackers can craft inputs that push a model into false claims.
A hallucination can also include invented reasoning or citations. NIST warns that these make a wrong answer look well supported, so people trust it more.
Why it matters for your business
A chatbot that answers wrongly causes confusion. An agent that acts on a wrong answer causes damage. The OWASP Top 10 for LLM Applications 2026 (opens in a new tab) lists misinformation as LLM07 and names the core risk: false output that someone trusts and acts on. One of its examples is a customer service agent that misreads a policy and approves a refund outside the terms.
Commitments to customers are a common form of damage: a discount that does not exist, a delivery date nobody agreed to or a refund rule the AI made up. The 2025 edition of the OWASP list (opens in a new tab) cites an airline whose chatbot gave travelers wrong information, which led to legal complications. Our post on AI agent failure modes shows how such errors appear in live agents.
How to reduce the risk
- Ground answers in approved sources. Retrieval-augmented generation (RAG) gives the model current documents from your own knowledge base before it answers. Remove outdated pages, because the model repeats what it finds.
- Ask for citations and check them. Show which document supports each answer, and check in code that the cited document exists and was actually retrieved.
- Constrain the output. For prices, policies and dates, let the agent quote approved text or look up the value with a tool instead of writing it freely. Require structured output with mandatory fields.
- Check before acting. Validate each tool call in application code: its arguments, the user's rights and the current state of the record.
- Keep a person in the loop for high-impact steps, such as refunds, contract terms or medical and legal information.
Test with questions the AI cannot answer from its sources, and check that it says so and hands the case to a person. In our AI security projects, we also test whether a persistent customer can talk the agent into a promise outside your policy.
Related terms
- Retrieval-augmented generation: the AI looks up relevant documents from your sources and answers from them.
- AI guardrails: controls around a model that check and limit its inputs, outputs and actions.
- Human in the loop: a person reviews or approves the AI's work before it takes effect.
Sources
- 1.NIST AI 600-1, Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile, NIST, 2024-07-26 (opens in a new tab)
- 2.OWASP Top 10 for LLM Applications 2026, OWASP GenAI Security Project, 2026-08-03 (opens in a new tab)
- 3.LLM09:2025 Misinformation, OWASP GenAI Security Project (opens in a new tab)
