Our AI chatbot keeps making things up

Short answerMake the chatbot answer from your content, not from memory. Tell it to use only the documents you give it, to say it doesn't know when they hold no answer, and to back each claim with a quote. Then test it against a fixed set of questions with known answers, and hand risky topics to a person. These steps reduce made-up answers but don't remove them.

01

Allow it to say it doesn't know

Write into the system prompt that the bot may admit uncertainty and should say so when it lacks the information. Give it the exact sentence to use, for example "I don't have enough information to answer that." Anthropic's guide says this permission can drastically reduce false information.

Good if the bot guesses instead of admitting a gap

Claude Docs

Do it yourself
CostFree
EffortLow
HelpsToday
02

Tell it to use only the documents you provide

Instruct the model explicitly to use only information from the documents in its prompt and not its general knowledge. Put your help-center pages, policies or product sheets into that context. Questions your documents don't cover then end in a "don't know" instead of an invented answer.

Good if the bot answers questions about your own products and rules

Claude Docs

Do it yourself
CostFree
EffortLow
HelpsToday
03

Make it quote a source for every claim

Ask the bot to cite quotes and sources for each claim it makes. You can also have it check each claim after it writes the answer by finding a supporting quote, and retract any claim it can't support. Show those sources next to the answer so users and your team can check them.

Good if people need to trust or check the answers

Claude Docs

Do it yourself
CostFree
EffortLow
HelpsToday
04

Lower the temperature

Temperature controls how random the model's word choices are. Lower temperatures give more conservative, deterministic outputs that stick to the most probable phrasing and answers. Set it low in your API call for a support or fact bot, so the same question gets a steadier answer you can test.

Good if the bot gives different answers to the same question

Skip if you want creative writing from it

Claude Docs

Do it yourself
CostFree
EffortLow
HelpsToday
05

Test it with a fixed set of questions

Write down 20 or more real questions with their correct answers. Run the bot against them after every prompt or document change and look at each wrong answer to find out why it happened. OpenAI's accuracy guide calls this evaluation set the baseline for every later fix.

Good if you change prompts or documents often

OpenAI

Do it yourself
CostFree
EffortMedium
HelpsThis week
06

Ground answers in your content with RAG

Retrieval-augmented generation searches your own content for each question and passes the matching passages to the model, so the answer rests on your material. Search services such as Azure AI Search index content from sources like Azure Blob storage and SharePoint and split it into chunks. Expect work on chunking and relevance before the results are good.

Good if your knowledge is spread over many documents

Skip if your bot only covers a handful of facts

Microsoft Learn

Tool
CostFree
EffortHigh
HelpsThis month
07

Track wrong answers with promptfoo

promptfoo is an open-source command-line tool and library for evaluating LLM apps. You define simple, declarative test cases, without writing code, and run them against your prompts, models or RAG setup. Rerun the suite after each change to see if wrong answers went up or down.

Good if you want your question set to run automatically

Promptfoo

Tool
CostFree
EffortMedium
HelpsThis week
08

Hand risky topics to a human agent

Route questions about refunds, contracts, health or anything legal to a person. In Copilot Studio, for example, the bot can hand the conversation to a live agent and pass on the full history and relevant variables, so the customer doesn't have to start over.

Good if wrong answers on some topics cost money or trust

Skip if you have no human support team

Microsoft Learn

Tool
Cost€
EffortMedium
HelpsThis week

When it's bigger than a quick fix

Get an AI engineer or your vendor's support involved when the bot answers questions where a wrong answer has consequences, such as prices, contracts, health or legal topics, and your test set still finds made-up answers. These techniques reduce hallucinations but don't eliminate them, so critical information needs a human check.

Claude Docs

Questions people ask

What is a chatbot hallucination?

It is text from a language model that is factually incorrect or inconsistent with the context it was given.

Can you stop a chatbot from hallucinating completely?

No. Allowing it to say it doesn't know, restricting it to your documents and asking for quotes reduce hallucinations, but they don't eliminate them.

Does RAG stop hallucinations?

It helps, because the answer is grounded in passages from your own content. It still needs testing, since retrieval can pick the wrong passages.

Does a lower temperature reduce hallucinations?

A lower temperature makes outputs more conservative and deterministic. That makes the bot easier to test, but it doesn't stop it from stating something wrong.

How do I measure how often my chatbot makes things up?

Run it against a fixed set of real questions with known answers and count the wrong ones. The open-source tool promptfoo can run that set as test cases.

Sources

  1. Claude Docs: Reduce hallucinations
  2. Claude Docs: Glossary
  3. OpenAI: Optimizing LLM Accuracy
  4. Microsoft Learn: RAG and Generative AI - Azure AI Search
  5. Promptfoo: Intro
  6. Microsoft Learn: Hand off to a live agent (Copilot Studio)