A hallucination is when an LLM produces an answer that sounds confident but is wrong or invented. It cannot be eliminated entirely, but it can be reduced a great deal with good design.
Why it happens
LLMs generate likely-sounding text; they do not look facts up by default. When they lack information, they may still produce a fluent answer.
Practical ways to reduce it
- Ground answers in your documents using retrieval, and show the sources
- Instruct the model to answer only from the supplied material and to say when it does not know
- Use structured outputs and validate them against your own data, such as checking that a product code exists
- Keep prompts specific so there is less room to guess
- Add human review for high-stakes answers
- Test regularly with a set of known questions and correct answers
Decide where errors are acceptable
A slightly off email draft is a small problem. A wrong price, legal statement or medical claim is a serious one. Match the level of checking to the level of risk.
Measure it
Track how often answers are corrected by staff. A measurable error rate shows whether changes are helping.
Our AI & Automation team builds these checks into every project. Contact us to learn more.