Skip to main content
Practice

Mistakes in Generative AI, Hallucination

Even AI like ChatGPT can make mistakes sometimes. Common errors include claiming that non-existent events occurred or providing incorrect data.

When generative AI creates faulty information that doesn't exist in reality, this is referred to as hallucination.


Examples of Hallucination

  1. Non-existent facts: Providing information like "NASA landed a human on Mars in 2022," which never actually happened.
Providing Non-existent Information
Explain about the thermometer invented by Galileo.

Galileo never invented the thermometer, but the AI can erroneously describe him as having done so.

  1. Incorrect Information about People: Generating false information such as "Albert Einstein was the President of the United States."
Providing Incorrect Information
Tell me about King John of Medieval America.

There was no King John in Medieval America, but the AI can fabricate a narrative as if there was one.

  1. Unverified Data: Providing incorrect statistical information like "2% of the world's population lives in Australia" (when in fact, it is about 0.3%).
Providing Incorrect Statistical Information
Give me the statistics on the correlation between smartphone usage and IQ.

Prompts like this can result in the AI providing unverified or subjective data.


Why Does Hallucination Happen?

Hallucination can occur if there are errors in the training data, if the AI model lacks data for specific situations, or if the training was imbalanced.

Additionally, vague prompts from users can lead to hallucination.

Example of a Vague Prompt
Tell me the population of the largest city in the world.

# Without specifying whether "largest" refers to population, area, or economic power, the AI may provide incorrect information.

How to Reduce Hallucination?

To reduce hallucination, it's important to write clear and specific prompts.

1. Ask Specific Questions

Generic Prompt
Tell me about the movie 'Inception.'
Improved Prompt
Tell me about the director, main actors, and the plot of the movie 'Inception.'

2. Specify the Source of Information

Generic Prompt
Tell me about the latest tech trends.
Improved Prompt
Tell me about the latest tech trends based on reports published after January 2023.

3. Exclude Unnecessary Information

Generic Prompt
Give me advice on traveling in Europe.
Improved Prompt
I am planning a two-week trip to Europe. Please recommend must-visit places and local dishes in France and Italy.

4. Include Examples in Your Questions

Generic Prompt
Tell me how to write a business plan.
Improved Prompt
Explain the main sections required in a business plan (e.g., overview, market analysis, marketing strategy, financial plan).

5. Provide Specific Dates or Time Ranges

Generic Prompt
Tell me about the history of China.
Improved Prompt
Explain the history of China from 1912 to 1949, particularly significant events during the Republic of China era after the Xinhai Revolution.

Additionally, to minimize hallucination, it's advisable to utilize the latest AI models available in the respective category.

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.