Stopping a support chatbot from inventing answers starts with retrieval-augmented generation, where the model is instructed to answer strictly from passages retrieved from your verified documentation and to explicitly say it does not know rather than fill gaps with plausible-sounding text. The system prompt should state clearly that the model must not answer from general knowledge on policy-specific questions such as pricing, refunds or legal terms, and the retrieval layer should return no-match results honestly rather than forcing a best-guess document into context. Adding citations to the source article in every answer, even if not shown to the customer, makes hallucinations easier to catch during testing and gives support staff a way to verify responses quickly. A confidence threshold that routes uncertain answers to a human, combined with regular sampling and review of live conversations, catches drift that a one-time test suite misses. Keeping the knowledge base itself accurate and free of contradictions matters just as much as the model configuration, since a bot grounded in outdated or conflicting documents will confidently repeat that inaccuracy. Nanobase AI builds this grounding and confidence-scoring layer as a core part of every support chatbot rather than an optional add-on.

No single fix stops hallucination; layered defenses do

Teams that implement retrieval-augmented generation and consider the hallucination problem solved are often surprised when the bot still occasionally states a wrong policy confidently, because RAG reduces the frequency of made-up answers without eliminating every path to one. Treating hallucination prevention as a layered defense, where each layer catches what the previous one missed, produces a materially more reliable system than relying on retrieval alone.

The defense layers

LayerTechniqueWhat it catches
Retrieval qualityRelevance thresholds, honest no-match resultsPrevents forcing an unrelated document into context
Prompt instructionExplicit "answer only from context, say you don't know"Reduces the model filling gaps with plausible text
Confidence scoringModel or a secondary classifier scores its own answerRoutes uncertain answers to a human before the customer sees them
Source citationEvery answer references its source document, even if hidden from the customerMakes hallucinations easy to spot during testing and review
Knowledge base hygieneRemoving outdated or contradictory documentsStops the bot from confidently repeating a document that is itself wrong
Live samplingRegular human review of a percentage of real conversationsCatches drift a one-time test suite misses

Skipping the knowledge base hygiene layer is the most common mistake, since even a perfectly configured model will confidently repeat an inaccuracy if the retrieved document itself is outdated or contradicts a newer policy document also in the index.

Why the prompt instruction alone is not enough

A system prompt telling the model to only answer from retrieved context and to say it does not know reduces hallucination meaningfully, but it is a soft instruction the model can still deviate from under certain phrasing, particularly when a question is close to but not exactly covered by the retrieved documents. This is why confidence scoring and source citation exist as separate layers: they do not prevent the model from generating a risky answer, but they catch it before or immediately after generation, either by routing to a human or by making the issue visible during review.

Testing the layers, not just the happy path

Standard test sets tend to use questions the bot should be able to answer well, which validates the retrieval and prompt layers but not the confidence and hygiene layers. A more useful test set deliberately includes questions with no correct answer in your documentation, questions where two similar but conflicting documents exist, and questions phrased ambiguously enough to tempt the model into guessing, since these are exactly the cases where the later defense layers need to catch what the earlier ones miss.

Frequently asked questions

Does a bigger or more capable LLM hallucinate less?

Not necessarily on domain-specific policy questions, since hallucination in a support context usually comes from the model reasoning past what it actually retrieved rather than from a general capability gap, which is why layered guardrails matter more than model size alone.

Should the bot ever answer from its general training knowledge?

Generally no for policy-specific questions like pricing, refunds or legal terms, where an outdated training-data answer could directly contradict your current policy; general knowledge answers are more acceptable for genuinely generic questions unrelated to your specific business.

How do we know if our knowledge base has contradictory documents?

Run your golden test set and watch for answers that vary between test runs on the same question, which often indicates the retrieval layer is nondeterministically pulling from two conflicting documents rather than one consistent source.

What confidence threshold should trigger a handoff to a human?

There is no universal number, since it depends on your risk tolerance and question complexity, but most teams start conservatively and loosen the threshold only after live sampling confirms the bot's confidence scores correlate well with actual answer accuracy.

How Nanobase AI helps

Nanobase AI builds this grounding and confidence-scoring layer as a core part of every support chatbot rather than an optional add-on, including the knowledge base hygiene checks that catch contradictions before they reach a customer. This work is the foundation for building the accuracy evaluation pipeline and connects to the broader RAG versus fine-tuning decision guide for teams weighing their grounding architecture.

Ready to discuss your project? Contact Nanobase AI or email hello@bumu.tech.