An AI hallucination occurs when an AI model generates incorrect information but presents it as if it were a fact. These hallucinations are often a result of limitations or biases in the training data and algorithms, leading to the production of inaccurate and potentially harmful content.
AI hallucinations can occur for several reasons, including:
Additionally, other factors can contribute to AI hallucinations, such as using idioms or slang expressions that the AI model hasn't been trained on and adversarial attacks where prompts are intentionally designed to confuse the AI.
Examples of AI hallucinations include this example when working with ChatGPT. When we asked ChatGPT the question “Does Hugging Face support OpenAI Whisper?” it admitted its limitation and gave us an accurate answer, that it didn't have the data, but the answer really wasn't useful.
As of my knowledge cutoff of September 2021, Hugging Face has not announced support for OpenAI Whisper. However, it is always possible that they may add support in the future. OpenAI Whisper is a new language model from OpenAI, and it may take some time for other companies and developers to integrate it into their platforms and products.
When we ask the same question via a chatbot that stores the latest content (Github repo, docs, readmes, etc) in a vector database, we get a totally different, and accurate, result;
Yes, Hugging Face supports OpenAI Whisper. The FlaxWhisperModel class is available in the transformers library, which is a wrapper around the OpenAI Whisper model. You can use this class to load the pre-trained OpenAI Whisper model and use it for various natural language processing tasks such as text classification, question answering, and text generation.
You can do a few things to help reduce or eliminate AI Hallucinations. The first is to give the LLM specific instructions when looking for your answer. For example, you can ask it to respond only with “yes” or “no,” or you can ask it to provide references to help you ensure accuracy, or you can also play around with the temperature settings.
In addition, you can provide it with the actual data to formulate the answer. This is done by converting your data into vector embeddings and storing them in a vector database. In most cases, there is a chatbot front end that the user interacts with. The users ask their questions; the question is then converted into a vector embedding. You then do an Approximate Nearest Neighbor search to find semantically similar items then present this data to the LLM to generate an accurate response.
Zilliz Cloud (and Milvus) helps with AI Hallucinations by storing and querying a knowledge base that has been converted into vector embeddings. OSSChat is a sample application that demonstrates how a vector database can be used to reduce these hallucinations. Here are some more resources on how you can use Zilliz to reduce hallucinations:
Try the fully-managed vector database built for your GenAI applications.
How this app demonstrates the new AI Stack ChatGPT+ Vector database + prompt-as-code
Improve the efficiency and speed of GPT-based applications by implementing a cache
Learn how to build a semantic similarity search engine