Glossary term
AI hallucination
An AI hallucination is an answer from a language model that sounds confident but is false or not supported by its source material. QA teams measure hallucinations with grounded test datasets, faithfulness metrics and human review, because fluent wording makes these errors easy to miss.
Types of hallucination
- Factual: the answer states something false about the world.
- Unfaithful (ungrounded): in a RAG app, the answer adds claims that are not in the retrieved documents.
- Fabricated references: invented sources, links, function names or API parameters.
How to test for hallucinations
- Build a golden dataset of questions with known correct answers and source passages.
- Score answers with a faithfulness metric that checks each claim against the source.
- Include questions the system should refuse or answer with “I don’t know”.
- Review a sample by hand, because automated judges can miss subtle errors.
Hallucinations cannot be removed completely, so the goal is to measure the rate and block a release when it rises.
Read the full guide: Hallucination Testing — How to Evaluate AI Model Accuracy in 2026
More terms
Agentic testingAI red teamingAnswer relevancyAPI testingBehaviour-driven development (BDD)CI quality gateContext precisionEnd-to-end testingExploratory testingFaithfulnessFlaky testGolden datasetIntegration testingJailbreakLLM evaluationLLM guardrailsLLM-as-a-judgeLoad testingModel Context Protocol (MCP)OWASP Top 10 for LLM ApplicationsPage Object ModelPrompt injectionRegression testingRetrieval-augmented generation (RAG)SDETSelf-healing testsSmoke testingTest automationTest caseTest pyramidVisual regression testing
