Pre-launch · Training and the free Foundations exam are open now. Levels 1–5 open soon. Get notified on any level page.
25 min read
A hallucination is output that reads as fact and isn't supported by anything: a policy that doesn't exist, a number nobody reported, a citation to nothing. You already know to ground claims in a source. This module is about diagnosis. Some made-up answers are caused by the prompt and can be fixed by changing it. Others come from the model's own limits, and no wording will remove them. Telling the two apart saves you from rewriting a prompt that was never the problem.
Two causes. A 2025 survey by Anh-Hoang, Tran, and Nguyen separates hallucinations by where they come from. Some are prompt-sensitive: the prompt was vague, left out the source, or pushed the model to answer when it had nothing to go on. Others are intrinsic to the model: it lacks the fact or gets it wrong however it is asked. The survey found that structured prompting reduced the first kind, and that the second kind persisted.
A test that can suggest which kind you have. Take a question the tool got wrong and run it three more ways: reworded clearly, with the source pasted in, and with explicit permission to say the answer isn't available. Use repeated controlled tests and report uncertainty. Neither a disappearance nor persistence proves exclusive causation.
Prompt changes that help, and why.
What doesn't help. "Do not hallucinate" and "be accurate" describe a goal and give the model nothing to do differently. Telling the model it is an expert doesn't add facts.
Temperature is not an accuracy dial. Temperature is a setting that controls how much the output varies from run to run. A common tip says to lower it for more accurate answers. Renze and Guven (2024) tested nine models on multiple-choice problems and found that changing temperature between 0.0 and 1.0 had no statistically significant effect on accuracy. Lower temperature makes output more repeatable, which is useful for testing. It doesn't make a wrong answer right. The study covered multiple-choice problem solving, so don't stretch it to every kind of task.
Measure a rate. One clean answer proves little. Build a small set of questions with known answers, including some the source doesn't cover. Run the set, count unsupported claims, and count wrong refusals too: a prompt that says NOT IN SOURCE to everything is safe and useless. Rerun after every prompt change and when the model changes.
No prompt gets you to zero. For anything that matters, a person checks against the source before it goes out.
Kwame Mensah supports benefits questions at a 900-person logistics company. He wants an assistant to draft answers from the 2026 benefits guide. In testing, it told an employee that dental coverage includes orthodontics for adults. The guide says nothing of the kind.
Before:
You are an expert HR benefits advisor. Answer the employee's
question accurately. Do not hallucinate.
Question: Does our dental plan cover adult braces?
No source is supplied, so the model answers from general knowledge of dental plans. "Accurately" and "do not hallucinate" give it nothing to act on. The role makes the answer sound more certain.
After:
Answer the employee's question using only the benefits guide
between the <guide> tags. The guide is the only authority.
Steps:
1. Quote the sentence or sentences in the guide that answer the
question, with the section number.
2. If no sentence answers it, write NOT IN GUIDE and stop.
3. If a sentence answers it, give the answer in two sentences or
fewer, using only what you quoted.
Do not use general knowledge about benefits plans. Do not infer
coverage from what similar plans usually include.
<guide>
[2026 benefits guide text]
</guide>
Question: Does our dental plan cover adult braces?
Kwame runs 25 questions through both versions: 18 the guide answers and 7 it doesn't. The first version gives a confident answer to all 7 uncovered questions. The second returns NOT IN GUIDE for 6 of the 7 and wrongly refuses 1 of the 18. For the remaining miss, he runs the three-way test. It survives, so he adds that topic to the list routed to the benefits team.
Why this is stronger. The source is in the prompt, so the model reads instead of recalling. The quote-first step exposes any claim with nothing behind it. The model has a permitted way to say the guide is silent. Kwame knows the rate on both kinds of error, and the one failure that wording couldn't fix is handled by changing the process.
Setup. Pick a short document you know well: a policy, a product sheet, a lease. Write six questions it answers and four it doesn't.
Task. Run all ten with a plain prompt and no document. Then run them with the document supplied, a quote-first step, and a NOT IN SOURCE rule. For any answer still wrong, run the three-way test.
What a good result looks like. You have two counts for each version: unsupported claims and wrong refusals. Most errors disappear in the second version. For any that remain, you can say what the repeated tests suggest, what is still uncertain, and what you would investigate next: context, model capability, retrieval, configuration or validation.