Which tool to choose
All AI assistants can invent, and the technique to reduce it is the same everywhere: anchor the answer to sources you provide. For questions about up-to-date or verifiable facts, an assistant that can search the web and show links is preferable: that way you check the source instead of trusting. For questions about a document of yours, attaching it and asking for answers based only on that is preferable. The rule doesn't change: the less the AI has to draw on memory, the less it invents.
How to do it
A hallucination arises when the AI doesn't know but answers anyway, because it's built to produce a plausible answer, not to admit the gap. You reduce it by removing both the gap (giving it material) and the pressure (allowing it not to know).
- When you can, provide the material yourself: paste the text, attach the document, give the data.
- Write in the prompt to use exclusively that material and not to add external information.
- Explicitly authorize the answer "not present in the text" or "I don't know."
- Ask it to cite, for each statement, the point of the material it comes from.
- For the facts that matter, verify at least the most important ones at the source, even when the AI seems sure.
The operational syntax:
Answer my question using exclusively the document below. If the answer is not contained in the document, write "not present in the document" instead of guessing. For each statement indicate the sentence of the document you derive it from.
Question: [your question]
Document:
"""
[paste here]
"""
When the answer arrives with the citations, do a spot check: take a statement and check that the cited sentence really supports it. If the citation isn't relevant, the AI is inventing the source too, and it should be corrected.
A concrete example
Marco asks the AI for the articles of law on a topic and receives precise, authoritative-looking article numbers. Out of habit he checks one: the cited article exists but is about something else. The AI had invented the reference. Marco redoes the question differently: he attaches the text of the legislation and asks "find among the articles below the ones that concern my case, cite the number only if you find it in the text." This time the references are real, because the AI fishes them from the document instead of from memory.
When it does NOT work (and how to fix it)
If the AI invents names, dates or precise numbers
Specific details are the riskiest territory: the AI produces them plausibly even when it doesn't know them. For pointed facts (quotations, statistics, references) don't trust the AI's memory: ask it to search the web and show you the link, or provide the source yourself. A number without a verifiable source should be treated as a hypothesis, not as data.
If it says "I don't know" too often and it's useless
You've tightened the anchoring too much for a question that requires reasoning, not just reading. Distinguish: for facts, keep the AI anchored to the sources; for opinions or analyses, loosen up and explicitly ask "feel free to reason, but flag what is fact and what is your interpretation." Separating the two planes avoids both the invention and the excess of caution.
If the cited source seems right but isn't
The AI can invent the citation too, not just the fact. That's why the spot check is worth it: open one of the indicated sources and check that it really says what the AI attributes to it. On sensitive topics — health, money, law — this verification isn't optional: a decision made on invented data costs much more than the two minutes of checking.
A tip from someone who actually uses it
Trust the AI more when it works on a text you've given it, much less when it draws on what it "knows." The practical difference is enormous: summarizing a document you've pasted is reliable; remembering a historical date or an article of law from memory is where it stumbles. Shift as many requests as possible from the second type to the first, and the errors collapse.
Frequently asked questions
Why does the AI invent with such confidence instead of saying it doesn't know?
Because it's built to generate the most plausible continuation of the discourse, not to measure how certain it is. An invented but well-formed answer "seems" as valid to it as a true one. Authorizing it to say "I don't know" gives it an alternative to filling the gap at all costs.
Do the AIs that search the web invent less?
On up-to-date facts usually yes, because they anchor the answer to real pages you can open. But they can still summarize a source badly or cite one that doesn't support what they say. Web search reduces the invention, it doesn't replace your check of the link.
Is there a prompt that completely eliminates hallucinations?
No, and it's important not to fool yourself: no formula zeroes out the risk, because invention is inherent in how these models work. It drops a lot by anchoring to the sources and verifying the facts that matter, but the verification is still yours. Treating the AI as a source to check, not as an oracle, is the defense that really works.