Swaran Soft
Enterprise AI

How to Reduce AI Hallucination: 7 Practical Fixes for Enterprise AI

November 3, 20267 min readBy Yogesh Huja, Founder & CEO
How to Reduce AI Hallucination: 7 Practical Fixes for Enterprise AI

An AI may advise a finance director that a supplier contract contains a 60 day exit period. Although this appears logical, in fact the exit period is 90 days. Perhaps no-one is negatively affected by this. However, even one erroneous statement can cause more loss of trust than many accurate statements.

Whilst a model can indeed make mistakes, so can people. However, it is the nature of AI hallucinations that the model is highly certain and presents information in a smooth manner. There is no indication that anything is amiss.

Fortunately, you can significantly reduce AI hallucination. Whilst it is not possible to eradicate it altogether (and anyone who claims otherwise is selling something), you can ensure that your teams trust the technology. Read on to discover how.

Understanding why AI hallucinates

A language model works by predicting the most likely words or phrases that follow what it has seen. Unlike a database, it does not retrieve information.

Therefore if the technology does not know the answer, it does not typically state this and instead creates the most ‘believable’ reply. Within normal discourse, believability and accuracy tend to align. However, in business environments, for example relating to contracts, stock and policy, they frequently do not.

Business AI hallucinations are commonly caused by:

  • Lack of information – the necessary information was not included in the training set.
  • Poor retrieval – the incorrect document was retrieved and/or the incorrect part of a document was accessed.
  • Unclear guidance – no guidance was given to the model on how to respond if it was uncertain.
  • Extrapolation – the model was instructed to analyse, assess or extrapolate beyond what was in the source information.
  • And, finally, no validation stage – there was no process to validate the information prior to presentation to a human.

All of these can be addressed. Again, however, it is not a solution to simply increase model size.

Solution 1 – Ensure responses are data-aware

Implementing a retrieval augmented generation (RAG) approach ensures responses are informed by your data. Rather than using a model’s internal information, relevant data segments are retrieved and the model is asked to respond based on these.

Whilst previously the model’s function was to recall, here it analyses and summarises. This is a far more reliable process. For further detail on how a RAG is constructed, refer to our blog on the topic – it is explained in straightforward language.

However, although RAG re-directs the issue, it does not resolve it. If the wrong document segment is retrieved then the model will accurately summarise this. Hence, it is crucial that you also ensure good retrieval is in place.

Solution 2 – Ensure good document retrieval

We have discovered that in many instances, what has been labelled as AI hallucination is in fact poor retrieval. The model has obeyed instructions but has been presented with the incorrect page.

Key strategies for good retrieval include:

  • A dual search function – both semantic and keyword searches, thus ensuring contract references, part numbers and document sections can easily be located.
  • Secondary model re-ranking of search results.
  • Breaking up documents according to natural divisions (for example, clauses, sections and tables) for retrieval, not by character limit.
  • And filtering by metadata such as date, department, region and document version, so that for example, a 2021 policy is not quoted when a 2025 policy is available.

Solution 3 – Allow the model to acknowledge when it does not know

Although this may seem obvious, frequently business prompts fail to instruct a model on how to respond when it does not have the required information. Consequently, the model will attempt to generate a response.

Good prompt design includes:

A requirement to base responses on supplied information. If no relevant information is present then this should be explicitly stated and guidance given on who to contact. Also, never fabricate numerical, date or named data or contractual clauses.

Following this, test your system. Pose queries that you know have no relevant information. Should the system continue to confidently provide replies, then either your prompts are inadequate or your retrieval is including somewhat relevant information which is being used by the model as justification for speculation.

Solution 4 – Enforce and validate referencing

All factual information should be referenced to a particular document and section. As well as encouraging the model to remain data aware, this allows rapid user validation.

Furthermore, a secondary, smaller model can be employed to automatically validate that the referenced document section backs up the statement. Should it not do so, then the information can be highlighted and/or prohibited. Such validation successfully identifies a significant proportion of errors pre-presentation.

Solution 5 – Do not ask the model to perform mathematical functions

Whilst language models are adept at many skills, they are not great at mathematics. Occasionally they confidently provide incorrect results for, for example, invoice value summation or date difference calculations.

To avoid this, utilise external tools. Within an agentic environment, the model recognises that mathematical processing is required and invokes a calculator, database or API. The tool then provides an exact result which the model can explain. Simply by implementing this process, you can avoid an entire category of errors in financial, stock and human resources areas.

Solution 6 – Establish a validation set

Without measurement, you are unable to effect change. Furthermore, merely observing that "it looked fine in the demo" does not constitute measurement.

Develop a validation set containing 150 – 300 genuine queries, with known answers. Include complex queries such as those which:

  • Have no relevant information
  • Require information from more than one document
  • And, involve misleading historical information.

Validate all iterations of your system against this set.

What to assessIndication
RetrievalWas the correct document section retrieved?
FaithfulnessWas the response strictly based on the source information?
Proper non-discoveryWas ‘not found’ correctly returned where no information was available?
Precise referencingDid the referenced information appropriately back up statements?
User amendmentHow frequently do genuine users amend or highlight information in live operation?

Monitor these metrics. Following a prompt, model or document set change, you will be able to ascertain within an hour whether performance has improved or deteriorated.

Solution 7 – Align human validation with risk

Not all information requires human validation. Low risk information, for example, may relate to a canteen menu and can therefore be automatically processed. However, high risk information such as pricing, legal and medical information should never be. Construct a multi-level validation process:

  • Low risk – Automatically process and reference information.
  • Medium risk – Automatically process information, together with a confidence rating and a simple mechanism for reporting errors.
  • High risk – Information should initially be automatically processed and then reviewed and approved by a named individual prior to being shared or acted upon.

Our agentic systems operate in exactly this manner. The agent undertakes processing and human responsibility lies with those making high risk decisions.

What does not perform as well as people hope

Whilst some widely held beliefs are not as effective as might be hoped:

  • Moving to the largest available model. Although larger models are generally less prone to general knowledge hallucination, they are no better at understanding proprietary information.
  • Reducing the model temperature to zero. This produces more uniformity, but not necessarily greater accuracy. Uniformly incorrect information remains incorrect.
  • Fine-tuning on business data to impart information. This is costly, rapidly becomes outdated and can even increase the model’s confidence in partially recalled data.

Where this is especially pertinent in India

Within the BFSI sector, false interest rates or incorrectly quoted RBI circulars can lead to compliance issues. Likewise, incorrect dosages in healthcare are not merely typographical errors – they pose serious safety concerns. And, within government services, citizens (who may lack the means to challenge it) receive inaccurate information on their eligibility criteria.

Moreover, additional complexity is introduced by multilingual deployment. Systems providing information in Hindi and Telugu require precise translation of English source data without compromising factual integrity. Each language must therefore be separately tested.

Advantages also arise from on-premise deployment of systems, with open source models and an internally managed vector database. Full control is afforded and all retrieval can be analysed. Plus, confidential information can be maintained within India, in compliance with the DPDP Act.

Key points

Whilst you cannot totally prevent AI hallucination, you can ensure that it is infrequent, identifiable and of limited impact. Ensure data awareness, guarantee good retrieval, enable the model to recognise its lack of information, enforce referencing and utilise tools for mathematical processes. Continually measure performance and deploy humans for high risk activities.

By doing so, AI ceases to be merely an impressive, but largely theoretical, technology and becomes something that your teams can trust for operational use.

For over 25 years, Swaran Soft has developed enterprise systems. We now construct live agentic AI, incorporating from week 1 of an 8-week pilot period, the above protection mechanisms.

Want to talk it through with us? We run a free 45-minute AI Pilot Assessment. Drop a line to info@swaransoft.com, or ring +91 9220-313-650 (India) | +971-50-9292-650 (UAE). You'll find more at www.swaransoft.com

Free 45-minute AI Pilot Assessment

Share this article:
Yogesh Huja — Founder & CEO, Swaran Soft
Yogesh HujaFounder & CEO

AI Architect and Entrepreneur building India's Edge AI ecosystem. 25+ years in enterprise technology. Founder of Swaran Soft, Gignaati, and Copilots.in.

Published: ⏱ 7 min read