Using AI for content creation brought a big challenge: the AI often made up false information, known as "hallucinations." 

This was very frustrating and made it hard to trust the results. 

I was determined to fix this, so I started experimenting with different prompt engineering methods to see what worked best.

Over time, I found several techniques that greatly improved the accuracy of the AI's responses. 

That's why I'm writing about these methods to help others with the same problem. 

These techniques not only reduced hallucinations but also made the AI's outputs more reliable.

In this post, I'll share my proven methods for prompt engineering that help reduce AI hallucinations. 

These tips will guide you in creating prompts that lead to more accurate and trustworthy outputs.

ALSO READ: Fine-Tuning vs Prompt Engineering (What Is The Best Prompting Method)

Get our Complete AI Bundle for your business success in 2024

What are AI Hallucinations?

AI hallucinations happen when artificial intelligence gives answers that sound correct but are actually wrong or make no sense. 

This happens because the AI, even though it's trained on a lot of data, sometimes misunderstands or misinterprets information.

For example, if an AI is asked about a historical event, it might create a detailed but completely false story. 

Another example is an AI giving medical advice that sounds believable but is not accurate. 

These mistakes can be either small or very noticeable, depending on the complexity of the question and the context.

9 Prompt Engineering Methods to Reduce Hallucinations 

Here are 6 Prompt engineering methods you should implement to tackle AI Hallucinations:

Method 1: “According to…” Prompting

“According to…” prompting is a way to make AI give more accurate answers. 

When you start your question with “According to [source],” you help the AI base its answers on real and reliable information. 

This makes the AI less likely to make things up.

Examples: 

Before:

"Explain the causes of climate change."

After:

"According to the Intergovernmental Panel on Climate Change (IPCC), explain the main causes of climate change."

In the second example, the AI is asked to refer to a trusted source, which helps it give better and more correct information.

ChatGPT Response:

according to prompting
according to prompting

Tips: 

1. Always name a trustworthy and relevant source in your question.

2. Use “According to…” for topics where it's important to be accurate, like science, history, or technical subjects.

3. Ask the AI to provide references or sources when possible, to make the information more trustworthy.

Method 2: Chain-of-Verification Prompting

Chain-of-Verification Prompting is a method where you ask the AI to check the facts it provides step by step. 

By verifying each part of its response, the AI can reduce mistakes and improve the accuracy of its answers. 

This method involves breaking down the information into smaller parts and confirming each one before moving on to the next.

Examples: 

Before:

"Tell me about the history of the internet."

After:

"First, explain when the internet was invented. Then, confirm who were the key people involved. 

Finally, verify the major events in its development."

In the second example, the AI is asked to check and confirm details at each step, making the overall answer more reliable.

Tips: 

1. Break your question into smaller parts that can be checked separately.

2. Ask the AI to confirm each part before moving on to the next.

3. Use this method for complex topics where accuracy is important.

Method 3: Step-Back Prompting

Step-Back Prompting is a technique where you ask the AI to review its previous response and make sure it is accurate. 

By encouraging the AI to take a step back and reassess what it has said, you can help it catch and correct any mistakes. 

This method is useful for improving the overall quality and reliability of the AI's answers.

Examples: 

Before:

"Explain how photosynthesis works."

After:

"Explain how photosynthesis works. Now, step back and check if your explanation covers all the key points accurately."

In the second example, the AI is prompted to double-check its response, making sure it is complete and correct.

ChatGPT Response:

Step-Back Prompting
Step-Back Prompting

Tips: 

1. After getting an initial answer, ask the AI to review and confirm the information.

2. Encourage the AI to look for any errors or missing details.

3. Use this method for important topics where getting the details right is crucial.

Method 4: Contextual Anchoring

Contextual Anchoring is a method where you provide the AI with a specific context to guide its responses. 

By giving the AI more background information or a clear setting, you help it generate answers that are more relevant and accurate. 

This reduces the chance of the AI making things up or going off-topic.

Examples: 

Before:

"What are the benefits of exercise?"

After:

"In the context of heart health, what are the benefits of regular exercise?"

In the second example, the AI is given a specific context (heart health), which helps it focus on relevant information.

Tips: 

1. Include specific details or background information in your question to give the AI a clear context.

2. Use contextual anchoring for complex or broad topics to keep the AI's responses focused and accurate.

3. Adjust the context as needed to get the most relevant and useful information.

Method 5: Layered Questioning

Layered Questioning involves asking multiple, related questions in sequence to dig deeper into a topic. 

By breaking down a broad question into several smaller, more focused ones, you can help the AI provide more detailed and accurate information.

This method ensures that each part of the answer is thoroughly explored and verified.

Examples: 

Before:

"Tell me about renewable energy."

After:

"First, explain what renewable energy is. Next, list the main types of renewable energy sources. Finally, describe the benefits of using renewable energy."

In the second example, the AI is guided through a series of questions that build on each other, resulting in a more comprehensive and accurate response.

ChatGPT Response:

Layered Questioning
Layered Questioning

Tips: 

1. Start with a broad question and then break it down into smaller, related questions.

2. Ask the AI to address each part of the topic step by step.

3. Use this method to explore complex subjects in detail, ensuring each aspect is covered accurately.

Method 6: Reflective Prompting

Reflective Prompting is a technique where the AI is asked to reflect on its previous answer and consider if there are any errors or omissions. 

This helps the AI to self-correct and improve the accuracy of its responses. 

By encouraging the AI to think critically about its output, you can enhance the quality and reliability of the information it provides.

Examples: 

Before:

"Explain the process of photosynthesis. After: "Explain the process of photosynthesis. 

Now, reflect on your answer and check if you missed any important steps or details."

In the second example, the AI is prompted to review its own response and make improvements if necessary.

Tips: 

1. After receiving an initial answer, ask the AI to review and reflect on its response.

2. Encourage the AI to identify and correct any mistakes or missing information.

3. Use Reflective Prompting for topics where accuracy and completeness are essential.

Method 7: Scenario-Based Prompting

Scenario-Based Prompting is a method where you place the AI in a specific scenario to guide its responses. 

By creating a detailed scenario or setting, you help the AI focus on providing relevant and accurate information tailored to that context. 

This approach reduces the likelihood of the AI generating off-topic or incorrect information.

Examples: 

Before:

"What should you do in a medical emergency?"

After:

"Imagine you are a medical doctor and someone suddenly has a severe allergic reaction. What steps should you take to handle this medical emergency?"

In the second example, the AI is given a specific scenario, which helps it generate a more focused and relevant response.

ChatGPT Response:

Scenario-Based Prompting
Scenario-Based Prompting

Tips: 

1. Create detailed scenarios that are relevant to the topic you are asking about.

2. Use Scenario-Based Prompting for practical, real-world situations where specific actions or information are needed.

3. Adjust the scenario as needed to get the most accurate and useful response.

Method 8: Feedback Loop Integration

Feedback Loop Integration involves incorporating feedback into the AI's prompt engineering process.

This means you provide feedback on the AI’s responses, and use that feedback to improve future interactions. 

By continuously refining prompts based on feedback, you can help the AI learn to generate more accurate and reliable information over time.

Examples: 

Before:

"Tell me about the history of the internet."

After:

"Tell me about the history of the internet. Your last response missed key events. Please include the invention of the World Wide Web and the rise of social media."

In the second example, feedback is given to improve the AI’s next response, making it more complete and accurate.

Tips: 

1. Always provide specific feedback on the AI's responses to help guide its improvements.

2. Use past interactions to refine and improve future prompts.

3. Implement a continuous feedback loop to ensure the AI's performance keeps improving over time.

Method 9: Progressive Prompting

Progressive Prompting is a technique where prompts are gradually detailed to ensure the AI provides accurate and comprehensive answers. 

By starting with a broad question and progressively narrowing down the focus, you can guide the AI to cover all necessary aspects of a topic. 

This method helps in building up the information step-by-step, making it more reliable.

Examples: 

Before:

"Explain renewable energy."

After:

"Explain what renewable energy is. 
Now, list the main types of renewable energy sources. 
Finally, describe the benefits of using renewable energy."

In the second example, the AI is asked to provide more specific details at each step, resulting in a thorough and accurate explanation.

ChatGPT Response:

Progressive Prompting
Progressive Prompting

Tips: 

1. Begin with a general question and then add layers of specificity.

2. Ensure each step logically builds on the previous one to create a comprehensive response.

3. Use Progressive Prompting for topics that require detailed explanations and multiple aspects to be covered.

Conclusion: 9 Prompt Engineering Methods to Reduce Hallucinations

We have discussed nine methods to reduce AI hallucinations: “According to…” Prompting, Chain-of-Verification Prompting, Step-Back Prompting, Contextual Anchoring, Layered Questioning, Reflective Prompting, Scenario-Based Prompting, Feedback Loop Integration, and Progressive Prompting. 

Each of these techniques helps to guide AI responses to be more accurate and reliable.

Using these methods can improve the quality of AI-generated content, making it more trustworthy and useful. 

By applying these techniques, you can ensure that the AI provides more accurate, relevant, and coherent information.

Experiment with these methods in your own AI interactions to see how they improve the responses.

By continuously refining your approach, you can maximize the benefits of AI while minimizing the risks of hallucinations.

Key Takeaway:

6 Prompt Engineering Methods to Reduce Hallucinations:

1. “According to…” Prompting: Guides AI to use reliable sources, improving accuracy.

2. Chain-of-Verification: Verifies each response step-by-step.

3. Step-Back Prompting: AI reviews and corrects its answers.

4. Contextual Anchoring: Provides specific context for more relevant answers.

5. Layered Questioning: Breaks questions into parts for thorough verification.

[  {    "@type": "Question",    "name": "What are AI hallucinations?",    "acceptedAnswer": {      "@type": "Answer",      "text": "AI hallucinations occur when artificial intelligence systems generate outputs that are factually incorrect or nonsensical, even though they may appear coherent and logical. These hallucinations can undermine the reliability and credibility of AI-generated content."    }  },  {    "@type": "Question",    "name": "Why is it important to reduce AI hallucinations?",    "acceptedAnswer": {      "@type": "Answer",      "text": "Reducing AI hallucinations is crucial for improving the reliability and credibility of AI systems. Hallucinations can lead to misinformation, errors, and a lack of trust in AI applications, especially in critical areas like healthcare, finance, and customer service."    }  },  {    "@type": "Question",    "name": "What is 'According to…' prompting?",    "acceptedAnswer": {      "@type": "Answer",      "text": "'According to…' prompting is a technique where the AI is guided to base its responses on verifiable sources or established information. This helps the AI anchor its responses to specific, reliable information, improving accuracy and relevance."    }  },  {    "@type": "Question",    "name": "How does Chain-of-Verification Prompting work?",    "acceptedAnswer": {      "@type": "Answer",      "text": "Chain-of-Verification Prompting involves asking the AI to verify facts step by step. By confirming each part of its response, the AI can reduce mistakes and improve the accuracy of its answers."    }  },  {    "@type": "Question",    "name": "What is Step-Back Prompting?",    "acceptedAnswer": {      "@type": "Answer",      "text": "Step-Back Prompting is a technique where you ask the AI to review its previous response and ensure it is accurate. By encouraging the AI to reassess its answer, you can help it catch and correct any mistakes."    }  },  {    "@type": "Question",    "name": "What is Contextual Anchoring?",    "acceptedAnswer": {      "@type": "Answer",      "text": "Contextual Anchoring is a method where you provide the AI with a specific context to guide its responses. By giving the AI more background information or a clear setting, you help it generate answers that are more relevant and accurate."    }  },  {    "@type": "Question",    "name": "How does Layered Questioning reduce AI hallucinations?",    "acceptedAnswer": {      "@type": "Answer",      "text": "Layered Questioning involves asking multiple, related questions in sequence to dig deeper into a topic. This method ensures that each part of the answer is thoroughly explored and verified, helping the AI provide more detailed and accurate information."    }  },  {    "@type": "Question",    "name": "What is Reflective Prompting?",    "acceptedAnswer": {      "@type": "Answer",      "text": "Reflective Prompting is a technique where the AI is asked to reflect on its previous answer and consider if there are any errors or omissions. This helps the AI to self-correct and improve the accuracy of its responses."    }  },  {    "@type": "Question",    "name": "How does Scenario-Based Prompting work?",    "acceptedAnswer": {      "@type": "Answer",      "text": "Scenario-Based Prompting involves placing the AI in a specific scenario to guide its responses. By creating a detailed scenario or setting, you help the AI focus on providing relevant and accurate information tailored to that context."    }  },  {    "@type": "Question",    "name": "What is Feedback Loop Integration?",    "acceptedAnswer": {      "@type": "Answer",      "text": "Feedback Loop Integration involves incorporating feedback into the AI's prompt engineering process. By continuously refining prompts based on feedback, you can help the AI learn to generate more accurate and reliable information over time."    }  }]
Close icon