Stop Your Chatbot From Hallucinating
In this article
You cannot make a chatbot that is never wrong. You can make one that does not guess. Do five things. Give the bot one source of truth. Tell it what to say when it does not know. Send high-risk questions to a person. Test the bot before launch. Check it each week after launch.
This guide is for you if someone just gave you a chatbot or voice bot project, and you are not an engineer. You do not need to write code. The guide also gives you one new tool from ICX. We call it the 20-5-5 test. It is a 30-question check that takes about one hour.
Why does a chatbot hallucinate?
A hallucination is an answer that sounds right but is false. The bot can invent a refund rule, a price, or a job title. It does not know that the answer is false.
Here is why. A chatbot does not look up facts by default. It predicts the next word. When it has no fact, it can still write a smooth sentence. That sentence can be wrong.
The U.S. National Institute of Standards and Technology (NIST) calls this “confabulation.” Its Generative AI Profile lists it as one of 12 risks of generative AI.
Every team that builds a bot has this problem. Good teams plan for it. Be careful with any tool that promises zero hallucinations.
Researchers at Stanford and Yale tested legal research tools. These tools answer from real documents. The study found that the tools made fewer errors than a general chatbot. But each tool still gave a false answer more than 17% of the time. Those were legal tools, so your number will be different. Still, plan for some wrong answers.
So set a better goal. You want a bot that is wrong less often. You also want a bot that fails safely when it is wrong.
How do you stop a chatbot from hallucinating?
Do these five steps in order. The first two steps are the best place to start.
- Give the bot one source of truth. Pick 20 to 50 pages that you trust. Remove old pages and pages that disagree. Tell the bot to answer only from those pages. Builders call this grounding, or RAG.
- Write the “I’m not sure” reply. A bot guesses when it has no better choice. Give it one. Write the words yourself.
- Send high-risk questions to a person. Decide which topics are too important for the bot. Send those topics to a person, with the full conversation.
- Test the bot before your users do. Run the 20-5-5 test in the next section.
- Review the bot each week. Save every question and answer. Read 20 conversations. Read every conversation where the bot said “I’m not sure.” Each one shows you a page to write.
The numbers in these steps are our starting points. Change them to fit the size of your bot.
Do you need a developer for step 1? Maybe not. Many chatbot products have grounding as a setting. Look for “knowledge base” or “knowledge sources.” Ask your vendor one question: “Can the bot answer only from our knowledge base?” If your own team built the bot, ask the developers for RAG.
What does the step 2 reply look like? Put a rule like this in the bot’s instructions: “Answer only from the documents provided. If the answer is not there, say that you are not sure. Offer to connect the user with a person.” A rule is not a guarantee, because a bot can ignore its instructions. Test the rule before you trust it.
Do not use a warning label as your only protection. A 2026 research review, reported by TechRepublic, found that hallucination warnings had weak and mixed effects.
Which topics go to a person in step 3? Most teams start with these four:
- Refunds, discounts, credits, and prices that are not on the page
- Medical, legal, and safety questions
- Complaints and angry users
- Any request to change an account
Our guide on when your chatbot should hand off to a human gives the full rules. You can also try a real message in the free Handoff Checker.
How do you test a chatbot for hallucinations?
Use the 20-5-5 test. We wrote it for people who do not write code. You need a list of 30 questions and about one hour.
- Write 20 real questions. Take them from your users. Write the correct answer next to each one.
- Write 5 questions with no answer. Pick topics that your content does not cover. The correct result is “I’m not sure.”
- Write 5 trick questions. Ask about a rule that does not exist. For example: “What is your 90-day refund rule?”
- Run all 30. Mark each answer as correct, wrong, or invented.
- Fix and repeat. Fix the content or the instructions. Then run all 30 again.
Keep the list. Run it each time you change the content, the instructions, or the model. A bot that passes on Monday can fail on Friday, because content changes and vendors update models.
Here is the time to plan for with a small bot. These are our estimates. A large bot takes longer.
- Step 1, one source of truth: a few days. Cleaning the content takes the longest.
- Step 2, the “I’m not sure” reply: about one hour.
- Step 3, high-risk topics: about one hour, plus setup time with your vendor.
- Step 4, the 20-5-5 test: one hour to write the questions, and one hour for each run.
- Step 5, the weekly review: 30 minutes each week.
The main cost is your time. Some vendors charge more for a knowledge base or for a handoff to a person. Ask about the price before you sign.
When you are ready for more tests, read how to evaluate AI agents before customers do and our guide to conversational AI testing methods.
What changes for a voice bot?
All five steps apply. A voice bot also has three extra problems. The caller cannot see a source link. The caller cannot scroll back. And the bot can hear a word wrong.
Add these rules for voice:
- Keep each answer short. Give one fact at a time.
- Repeat key details. Say names, numbers, dates, and addresses back to the caller. Ask “Did I get that right?”
- Confirm before the bot acts. Say the action. Then wait for a “yes.”
- Send the source. Offer to send the answer by text or email, with the source link.
- Keep a person in reach. Let the caller say “agent” or press 0 at any time.
Test a voice bot with real calls. Typed text is not enough. Use background noise, fast talkers, and people who interrupt. If you are still choosing a platform, see how much an AI voice agent costs.
Who is responsible when a bot is wrong?
The company that runs the bot is responsible. Use these three cases when you ask your team for time and budget.
- May 2026, Germany. A medical company’s chatbot gave two doctors specialist titles that they did not hold. The Higher Regional Court of Hamm treated the bot’s words as the company’s own words, as the CMS case tracker reports. The court said that correct programming does not remove the company’s responsibility, as law firm MME explains. The company can still appeal.
- April 2025, United States. A support bot at the software company Cursor invented a one-device rule. The story spread online before a co-founder corrected it, as PYMNTS reports.
- February 2024, Canada. Air Canada’s chatbot told a grieving customer about a discount that the airline did not offer. A tribunal in British Columbia said the airline is responsible for all the information on its website. The American Bar Association has a summary.
We are not lawyers, and this is not legal advice. Ask a lawyer about the rules where you work.
Here is where we land at ICX. A wrong answer will happen. What matters is what the bot does next. A bot that says “I’m not sure” and finds a person keeps the user’s trust. For more on that idea, read our AI failure design guide.
You do not have to do all five steps at once. Start with step 1 and step 2 this week. Then run the 20-5-5 test. Want a second pair of eyes on your test results? Tell us what you are working on. A newsletter is on the way too, so check back here for the next guide.
FAQ
What is an AI hallucination? An AI hallucination is an answer that sounds correct but is false. A chatbot or voice bot can invent a rule, a price, a name, or a source. The bot does not know that the answer is false.
How do I stop my chatbot from hallucinating? Give the bot one source of truth. Tell it to answer only from that source. Write an “I’m not sure” reply. Send high-risk questions to a person. Test the bot with 30 questions before launch. Review conversations each week.
Does RAG stop hallucinations? RAG lowers the number of wrong answers. It does not remove them. A Stanford and Yale study tested legal research tools that use RAG. Each tool still gave a false answer on about one question in six, or more. Use RAG with a fallback reply, a handoff, and tests.
How do I test a chatbot for hallucinations? Use the 20-5-5 test. Write 20 real questions with correct answers. Add 5 questions that your content does not cover. Add 5 trick questions about rules that do not exist. Mark each answer as correct, wrong, or invented.
Do voice bots hallucinate more than chatbots? A voice bot has the same risk. It can also hear a word wrong. The caller cannot see a source. Make the bot repeat key details. Make it confirm before it acts.
Is a company responsible for what its bot says? Courts have said yes in at least two cases. A Canadian tribunal ruled against Air Canada in February 2024. A German appeals court ruled against a medical company in May 2026. That company can still appeal.
Frequently asked questions
What is an AI hallucination?
An AI hallucination is an answer that sounds correct but is false. A chatbot or voice bot can invent a rule, a price, a name, or a source. The bot does not know that the answer is false.
How do I stop my chatbot from hallucinating?
Give the bot one source of truth. Tell it to answer only from that source. Write an "I'm not sure" reply. Send high-risk questions to a person. Test the bot with 30 questions before launch. Review conversations each week.
Does RAG stop hallucinations?
RAG lowers the number of wrong answers. It does not remove them. A Stanford and Yale study tested legal research tools that use RAG. Each tool still gave a false answer on about one question in six, or more. Use RAG with a fallback reply, a handoff, and tests.
How do I test a chatbot for hallucinations?
Use the 20-5-5 test. Write 20 real questions with correct answers. Add 5 questions that your content does not cover. Add 5 trick questions about rules that do not exist. Mark each answer as correct, wrong, or invented.
Do voice bots hallucinate more than chatbots?
A voice bot has the same risk. It can also hear a word wrong. The caller cannot see a source. Make the bot repeat key details. Make it confirm before it acts.
Is a company responsible for what its bot says?
Courts have said yes in at least two cases. A Canadian tribunal ruled against Air Canada in February 2024. A German appeals court ruled against a medical company in May 2026. That company can still appeal.
Get an email when we publish a new post.