The Brains Behind the Operation

A blog about hiddenMind products and engineering

AI Terms Explained

AI terms explained: Hallucinations

Sep 15, 2024

AI hallucinations – convincing but fabricated responses from language models like ChatGPT – can lead to serious consequences.

Glasses with swirling patterns

Think you found the perfect answer? It might be an AI mirage. Credible but completely invented, AI hallucinations can fool even the best of us.

Case in point: In June 2023, A New York federal judge sanctioned lawyers who submitted a local brief written by ChatGPT, which included citations of completely made-up cases. “Six of the submitted cases,” wrote the judge, “appear to be bogus judicial decisions with bogus quotes and bogus internal citations.” The lawyers were ordered to pay $5,000 in fines.

The problem isn’t isolated to ChatGPT. Most large language model systems include disclaimers that the answers may be incorrect and not based on facts, but not everyone heeds those warnings.

Why do hallucinations occur?

Hallucinations occur due to the probabilistic nature of machine learning algorithms. AI models learn patterns from large sets of training data in order to make predictions. However, this reliance on detecting correlations means that they can be wrong or misleading, especially when given unusual inputs.

In other words, AI models may "guess" by hallucinating outputs that seem plausible based on the patterns they've learned, but do not reflect reality.

Some types of neural networks are particularly prone to hallucinations. Deep neural networks with many layers transform input data in complex ways through each layer. This makes their internal representations increasingly abstract and can result in outputs relatively disconnected from the actual inputs. This is exactly the architecture used by large language models such as GPT-4 and Geminii.

Can hallucinations be prevented?

Several techniques exist to mitigate hallucinations in AI systems:

Prompt Engineering: One of the simplest is simply to ask the system to avoid them through a prompt. Adding a sentence like “If you don’t know the answer, just say so” can cut down on the most egregious examples.

Uncertainty metrics: Some models can self-report their confidence, allowing low-confidence outputs that are more likely to be incorrect to be flagged. Of course, this confidence level might itself be a hallucination.

Model ensembles: Aggregating predictions from different models can highlight non-consensus cases more likely to contain errors. GPT-4 and Mixtral 8x7b both use this technique.

Grounding and Retrieval Augmented Generation: The idea limits the model's output to only facts that appear in the input data or in a context you supply. For example, if you ask your HR system about vacation policies, it could open a database of policies and pick the answer from there instead of its general knowledge of learned patterns.

While it may be impossible to fully eliminate hallucinations, developing strategies to mitigate them will be crucial in ensuring the reliability and trustworthiness of AI systems.

At hiddenMind, we know how to take advantage of hallucinations when they are helpful, and supress them when they are not. Contact us to let us help you get started on your AI journey.

Unlock your team's full potential with the right knowledge, confidence, and the freedom to focus on what truly matters.

© 2024 hiddenMind. All Rights Reserved. | Terms of Use | Privacy Policy

Unlock your team's full potential with the right knowledge, confidence, and the freedom to focus on what truly matters.

© 2024 hiddenMind. All Rights Reserved. | Terms of Use | Privacy Policy

Unlock your team's full potential with the right knowledge, confidence, and the freedom to focus on what truly matters.

© 2024 hiddenMind. All Rights Reserved. | Terms of Use | Privacy Policy