Testing with Generative AI study guide

LLM Hallucinations

A hallucination occurs when an LLM generates text that is grammatically correct and sounds highly confident, but is factually incorrect, nonsensical, or completely unsupported by the provided context.

Practical example

LLMs are probabilistic token predictors, not fact databases. Hallucinations happen because the model optimizes for "plausible-sounding" text. Intrinsic hallucinations contradict the source material, while Extrinsic hallucinations add unverified information not present in the source.

Exam scenario and common trap

Question: What is the most effective way to mathematically eliminate 100% of hallucinations? The Trap: "Set the Temperature to 0.0." The Correct Answer: You cannot mathematically eliminate 100% of hallucinations due to the probabilistic nature of LLMs; you can only mitigate them through grounding (RAG) and low temperature.

Related syllabus sections cover this topic. Reference sections: 3.1.1–3.1.3. See the official ISTQB syllabus for exam scope. Examples are independent; QA-ace is not affiliated with ISTQB.