bigonotes
AIHallucinations

Reducing Hallucinations

Five techniques that cut hallucinations, from grounding with RAG to tools for facts, and what each one cannot fix.

4 min readLast updated

You cannot remove hallucinations completely, but you can make them much rarer. Five techniques do most of the work, and they are listed here roughly in order of how much they help. Use several together, because each one closes a different gap.

The five techniques at a glance#

Each technique changes something different: what the model sees, what it is allowed to say, or where its numbers come from.

Technique What it does Limit
Ground with RAG Puts real documents in the prompt and limits answers to them The model can still go beyond the sources
Allow "I don't know" Gives the model permission to abstain Works best when the answer really can be missing
Require citations Makes each claim point to a source Citations still need checking
Use low temperature Reduces randomness in token choice Helps only slightly
Give it tools Replaces predicted facts with real lookups Only covers what the tools can do

Ground the answer with RAG#

Grounding is the biggest lever. With RAG (retrieval-augmented generation), you retrieve relevant documents and put them in the prompt, then tell the model to answer only from those documents.

A question is used to retrieve documents, which go into a prompt that says to answer only from them, and the answer comes back with citations

This changes the job. The model no longer fills gaps from its training data. It continues from source material you supplied, which is why the failure rate drops significantly. It is still next-token prediction, only with better text to continue from.

RAG is not a guarantee. The model can still hallucinate by going beyond the sources, for example by adding a plausible detail the documents never state. The next techniques tighten that gap.

Allow "I don't know"#

Without permission to abstain, the model defaults to guessing. Training rewards answers over silence, so a gap in the documents often becomes an invented answer. A line in your system prompt changes the incentive.

If the answer isn't in the provided documents, say you don't know.

Put this in the system prompt, as described in messages. It pairs naturally with RAG, because retrieval sometimes returns nothing useful and the model needs a safe way out.

Require citations#

Ask the model to cite the specific source for every claim. This forces it to tie each statement to something concrete, and it makes your verification much easier.

Cite the source document for every claim. If you cannot cite it, leave it out.

There is a second benefit. When the model cannot cite something, it is more likely to flag uncertainty than to invent. Citations do not prove a claim is right, so a reader still opens the source for anything that matters.

Use low temperature#

Low temperature reduces randomness, so the model sticks to its highest-probability tokens. That slightly reduces wandering into unlikely territory.

Treat this as a small help, not a fix. A model can be confidently wrong at its most likely token, and low temperature does nothing about that. Set it low for factual tasks, but do not rely on it.

Give it tools for facts#

Tools replace prediction with lookup. Instead of guessing a number, the model calls a tool and uses the real answer.

  • Calculator: for math, so the model does not estimate arithmetic.
  • Database lookup: for structured data such as orders, prices or accounts.
  • Search tool: for current information past the model's knowledge cutoff.

This works for facts that a tool can return exactly. For open-ended writing there is nothing to look up, so the other techniques still matter.

Combining them#

The techniques stack. A typical grounded setup retrieves documents, tells the model to answer only from them, allows "I don't know", asks for citations and keeps the temperature low. Tools sit alongside for numbers and live data.

A common trap is to lower the temperature and consider the problem solved. Grounding and permission to abstain do far more.

Short line#

Ground the model in retrieved documents, let it say "I don't know", require citations, keep temperature low and use tools for facts. Grounding helps most, but none of these removes hallucination entirely.

Key takeaways#

  • Grounding with RAG is the biggest lever: the model continues from your documents instead of filling gaps from training data.
  • RAG can still hallucinate by going beyond the sources, so combine it with the other techniques.
  • Explicit permission to say "I don't know" stops the default of guessing.
  • Required citations tie each claim to a source and make checking easier.
  • Low temperature helps only slightly. Tools give exact answers for math, structured data and current facts.
Revision notes · 1 min

Core idea#

Five techniques cut hallucinations. Use several together, because none removes them completely.

Key points#

  • Ground with RAG: retrieve documents, put them in the prompt, and answer only from them.
  • RAG can still hallucinate by going beyond the sources.
  • Allow "I don't know" in the system prompt. Without it, the model guesses.
  • Require citations for every claim. An uncitable claim is more likely to be flagged than invented.
  • Use low temperature. It helps only slightly.
  • Give the model tools: calculator, database lookup, search.

Techniques compared#

Technique Limit
RAG grounding Model can go beyond the sources
"I don't know" Needs a prompt line
Citations You still verify them
Low temperature Small effect only
Tools Cover only what the tool returns

Pitfalls#

  • Do not treat low temperature as a fix.
  • Do not trust a citation without checking it.
  • Do not expect RAG to stop all invented details.

Short line#

  • "Ground it in documents, allow 'I don't know', require citations, keep temperature low, use tools. Grounding helps most."

Found a mistake? Email ask@bigonotes.com