Elena' s AI Blog

Can AI hallucinate?

23 May 2024 / 15 minutes to read

Elena Daehnhardt


Midjourney 6.0, May 2024: AI hallucinations and storm clouds a girl looks at, HD
I am still working on this post, which is mostly complete. Thanks for your visit!

If you click an affiliate link and subsequently make a purchase, I will earn a small commission at no additional cost (you pay nothing extra). This is important for promoting tools I like and supporting my blogging.

I thoroughly check the affiliated products' functionality and use them myself to ensure high-quality content for my readers. Thank you very much for motivating me to write.



Do you know what AI hallucination is? Can AI actually hallucinate without having any perception of reality? When referring to the English dictionary at Cambridge.org, hallucination is defined as:

the experience of seeing, hearing, feeling, or smelling something that does not exist, usually because of a health condition or because you have taken a drug

something that you see, hear, feel or smell that does not exist

There is also an AI-related hallucination definition in English dictionary at Cambridge.org:

false information that is produced by an artificial intelligence (= a computer system that has some of the qualities that the human brain has, such as the ability to produce language in a way that seems human):

  • If the chatbot is used in the classroom as a teaching aid, there is a risk that its hallucinations will enter the permanent record.
  • Because large language models are designed to produce coherent text, their hallucinations often appear plausible.
  • She discovered that the articles cited in the essay did not exist, but were hallucinations that had been invented by the AI.

the fact of an artificial intelligence (= a computer system that has some of the qualities that the human brain has, such as the ability to produce language in a way that seems human) producing false information:

  • The system tends to make up information when it doesn’t know the exact answer – an issue known as hallucination.
  • Is it possible to solve the problem of AI hallucination?

I believe everything we can imagine is possible, and I will delve into the AI hallucination remedies available today.

Introduction

AI hallucinations occur when artificial intelligence systems produce outputs that are factually incorrect, nonsensical, or irrelevant to the given input. These outputs can range from minor inaccuracies to entirely fabricated information.

Consider the totally invented citations that GPT systems provide. These citations often include broken links, sometimes leading to totally different sources.

Let’s explore examples of AI hallucinations, explain why AI hallucinations happen, and explain how we can reduce AI hallucinations in practice.

Examples of AI Hallucinations

AI hallucinations are a crucial issue in AI. The consequences of AI hallucinations in high-risk applications can be devastating. Consider the following applications:

Example Description
Medical Diagnosis An AI incorrectly diagnosing a condition based on erroneous data
Legal Advice Generating inaccurate legal information or misinterpreting laws
Financial Forecasting Mispredicting market trends due to biased training data
Customer Support Chatbots Providing irrelevant or nonsensical responses to user queries
Language Translation Mistranslating text, altering the meaning of the original content

This is why mitigating AI hallucinations and erroneous AI output is critical.

Causes of AI Hallucinations

Here, I have listed a few of arguably the most prominent causes of AI hallucination.

Not clear user prompts

We must craft our prompts carefully to minimise GPT erroneous output and AI hallucinations.

Data Quality Issues

AI models trained on low-quality or biased data are more likely to produce hallucinations. Incomplete, incorrect, or non-representative data can lead to erroneous outputs.

Model Training Limitations

Training limitations, such as insufficient training data or overly complex models, can also lead to hallucinations.

Context Limitations

When the context is poorly defined or when there is limited information available, it can result in poor model predictions, leading to AI hallucinations.

Overfitting and Bias

Overfitting happens when a model learns noise instead of the actual signal, leading to inaccurate predictions.

Overfitting and inherent biases in training data can cause AI systems to produce incorrect patterns or reinforce stereotypes present in the data.

Curious about model overfitting? Read my previous post Bias-variance challenge

Algorithmic issues

Even though most deep learning approaches work out of the box, we should still be mindful of potential algorithmic problems, incorrectly chosen techniques, or network architectures that do not suit the specific situation.

Implications of AI Hallucinations

Impact on Decision-Making

As we saw in the table above, AI hallucinations can lead to poor decision-making, especially in areas requiring precise and accurate information. Misleading outputs can have severe consequences in fields such as medicine and law.

User Trust and System Reliability

Frequent hallucinations can erode user trust in AI systems, making users hesitant to rely on these technologies for critical tasks.

Addressing AI Hallucinations

Addressing AI hallucinations is crucial for ensuring the reliability and accuracy of AI systems, particularly in high-stakes applications such as healthcare, legal, and financial sectors.

Reducing hallucinations helps build user trust and enhances the overall effectiveness of AI technologies. Various mitigation strategies exist to minimise AI hallucinations.

Improving Data Quality

Ensuring high-quality, diverse, and representative training data is fundamental to reducing AI hallucinations. Regular audits and updates of the data help maintain its accuracy.

Robust Model Training Techniques

Employing robust training techniques, such as cross-validation and regularization, can minimize overfitting and improve model generalization.

Incorporating Feedback Loops

Incorporating user feedback and iterative learning processes can help AI systems correct errors and improve over time.

Employing advanced techniques such as RAG

We can also further improve AI systems requiring more accurate output. Having domain-specific data and employing techniques such as Retrieval-Augmented Generation (RAG) can help to tackle AI hallucinations. You can check the related research in [1].

RAG helps reduce hallucinations by grounding the generative process in factual, retrieved information. This approach ensures that the generated content is based on real-world data, enhancing its accuracy.

Implementing RAG involves integrating a retrieval system with a generative model, such as a Transformer-based architecture. This setup requires a robust retrieval mechanism to fetch relevant documents and a powerful generative model to produce the final output.

Using tools like CustomGPT

CustomGPT.AI is a valuable tool for businesses to create customized chatbots. CustomGPT.AI also addresses AI hallucinations and provides GPT-4 responses based on your own content, without fabricating facts. This is accomplished within a no-code, secure, privacy-first, business-grade platform.

CustomGPT.AI has beaten industry giants in the latest Retrieval-Augmented Generation (RAG) benchmarks from Tonic.ai, setting new standards for accuracy. The benchmark measures answer accuracy and assesses systems’ ability to retrieve and generate accurate, quality answers from an established set of documents. See It’s Official: We’ve Broken the Record and Outperformed OpenAI in RAG Benchmark.

Can CustomGPT.AI solve the AI hallucination problem in practice? Read the very successful application in 4. MIT Entrepreneurship Center: Creating Generative AI For Entrepreneurs

The Martin Trust Center for MIT Entrepreneurship selected the CustomGPT solution because of its scalable data ingestion platform and its ability to provide accurate responses using the latest ChatGPT technologies [ 4]. This led to the development of ChatMTC, a generative AI solution that allows entrepreneurs to access knowledge without encountering AI hallucination issues [ 4].

You can try CustomGPT out and get 100% off a month on a Standard CustomGPT.ai Subscription.

Recent research

Many fantastic research papers explore AI hallucinations and how to tackle the problem. I have selected the most recent and intriguing, in my opinion, as a starting point if you are interested in academic pursuits:

  1. Béchard, P. and Ayala, O.M., 2024. Reducing hallucination in structured outputs via Retrieval-Augmented Generation. arXiv preprint arXiv:2404.08189.
  2. Maleki, N., Padmanabhan, B. and Dutta, K., 2024. AI Hallucinations: A Misnomer Worth Clarifying. arXiv preprint arXiv:2401.06796. Authors identify various definitions of “AI hallucination” across fourteen databases, revealing a lack of consistency in how the term is used. The results also highlighted the presence of several alternative terms in the literature, prompting a call for a more unified effort to bring consistency to this important contemporary issue.
  3. Gao, Y., Wang, J., Lin, Z. and Sang, J., 2024. AIGCs Confuse AI Too: Investigating and Explaining Synthetic Image-induced Hallucinations in Large Vision-Language Models. arXiv preprint arXiv:2403.08542.
  4. Leiser, F., Eckhardt, S., Leuthe, V., Knaeble, M., Maedche, A., Schwabe, G. and Sunyaev, A., 2024, May. HILL: A Hallucination Identifier for Large Language Models. In Proceedings of the CHI Conference on Human Factors in Computing Systems (pp. 1-13). developed HILL, a Hallucination Identifier for Large Language Models. The authors prioritized user-centred features and built a web-based artefact to complement existing efforts to reduce hallucinations in LLMs.
  5. Sovrano, F., Ashley, K. and Bacchelli, A., 2023, July. Toward eliminating hallucinations: Gpt-based explanatory ai for intelligent textbooks and documentation. In CEUR Workshop Proceedings (No. 3444, pp. 54-65). CEUR-WS. Authors introduce ExplanatoryGPT, which transforms textual documents into interactive resources, offering dynamic, personalized explanations using state-of-the-art question-answering technology. The author’s approach integrates ChatGPT with Achinstein’s philosophical theory of explanations to generate user-centred explanations, showcasing its effectiveness in tests using various sources.
  6. Zhang, Y., Li, Y., Cui, L., Cai, D., Liu, L., Fu, T., Huang, X., Zhao, E., Zhang, Y., Chen, Y. and Wang, L., 2023. Siren’s song in the AI ocean: a survey on hallucination in large language models. arXiv preprint arXiv:2309.01219. The authors discuss recent efforts on detecting, explaining, and mitigating hallucinations in large language models surveyed, focusing on the unique challenges LLMs pose. The paper includes taxonomies of LLM hallucination phenomena and evaluation benchmarks, as well as an analysis of existing approaches to mitigating LLM hallucination and potential directions for future research.
  7. Athaluri, S.A., Manthena, S.V., Kesapragada, V.K.M., Yarlagadda, V., Dave, T. and Duddumpudi, R.T.S., 2023. Exploring the boundaries of reality: investigating the phenomenon of artificial intelligence hallucination in scientific writing through ChatGPT references. Cureus, 15(4) The authors advise to be cautious about using ChatGPT’s references for research due to potential limitations and the risk of AI-generated misinformation. To improve reliability, including diverse and accurate data sets in training and updating the models frequently could help address these issues.

Any positive aspects?

AI hallucinations are sometimes good. Consider artistic creations, virtual reality, game development, and other applications where inaccurate results are not desired.

We can actually be inspired by some ideas arising from AI hallucinations.

Can AI hallucinations be fun? Please let me know :)

Conclusion

AI hallucinations present a significant challenge in deploying reliable AI systems. By understanding their causes and implications and employing strategies like RAG, feedback loops, improved data quality, and better model training, we can mitigate their occurrence and enhance the trustworthiness of AI technologies.

Future research and development should focus on improving retrieval mechanisms, refining generative models, and continuously monitoring AI outputs to minimize hallucinations further. We can also explore the artistic or possible inventive benefits of hallucinating AI.

Keep reading and subscribe :)

Try the following fantastic AI-powered applications.

I am affiliated with some of them (to support my blogging at no cost to you). I have also tried these apps myself, and I liked them.

Chatbase provides AI chatbots integration into websites.

Flot.AI assists in writing, improving, paraphrasing, summarizing, explaining, and translating your text.

CustomGPT.AI is a very accurate Retrieval-Augmented Generation tool that provides accurate answers using the latest ChatGPT to tackle the AI hallucination problem.

MindStudio.AI builds custom AI applications and automations without coding. Use the latest models from OpenAI, Anthropic, Google, Mistral, Meta, and more.

Originality.AI is very effecient plagiarism and AI content detection tool.

Did you like this post? Please let me know if you have any comments or suggestions.

Posts about AI that might be interesting for you






References

1. English dictionary at Cambridge.org: hallucination

2. Reducing hallucination in structured outputs via Retrieval-Augmented Generation

3. It’s Official: We’ve Broken the Record and Outperformed OpenAI in RAG Benchmark

4. MIT Entrepreneurship Center: Creating Generative AI For Entrepreneurs

5. AI Hallucinations: A Misnomer Worth Clarifying

6. AIGCs Confuse AI Too: Investigating and Explaining Synthetic Image-induced Hallucinations in Large Vision-Language Models

7. HILL: A Hallucination Identifier for Large Language Models

8. Toward eliminating hallucinations: Gpt-based explanatory ai for intelligent textbooks and documentation

9. Siren’s song in the AI ocean: a survey on hallucination in large language models

10. Exploring the boundaries of reality: investigating the phenomenon of artificial intelligence hallucination in scientific writing through ChatGPT references

desktop bg dark

About Elena

Elena, a PhD in Computer Science, simplifies AI concepts and helps you use machine learning.

Citation
Elena Daehnhardt. (2024) 'Can AI hallucinate?', daehnhardt.com, 23 May 2024. Available at: https://daehnhardt.com/blog/2024/05/23/ai-hallucinations-remedy/
All Posts