Find helpful tutorials or share inspiring use cases on AI technology for higher education.

Shared content may not reflect the policies of Tilburg University on the use of AI. 

Analogical Prompting: Sometimes, Even AI Appreciates a Good Analogy

One of the essential skills we humans use before solving problems is that we think before we act. More specifically, there’s a good chance that before you perform a task, you recall similar situations you’ve experienced before. You reflect on similar challenges from the past before embarking on a complex task.

Does this sound like an effective way to help AI solve problems by first thinking about similar situations? How can we apply this? That’s exactly what we’ll discuss in this article. Today, you’re adding a new skill to your prompt cookbook: analogical prompting.

How Does Analogical Prompting Work?

Analogical prompting is a technique where you encourage the AI to first think of relevant examples or similar situations before tackling the actual problem. This process unfolds in three simple steps:

  1. Present the Problem
    • Clearly and concisely formulate the problem you want the AI to solve.
  2. Ask the AI to Think of Similar Situations
    • Encourage the AI to consider similar challenges or experiences that are relevant to the current problem.
  3. Have the AI Solve the Original Problem
    • Using the insights from similar situations, ask the AI to address the original problem.

Advantages of Analogical Prompting

Instead of providing examples yourself, you let the AI come up with its own relevant situations. This has several benefits:

  • Flexibility: The AI can apply this technique to any type of question or problem, regardless of the subject or complexity.
  • Creativity: By drawing from its knowledge base, the AI can offer unique and unexpected insights that you might not have considered.
  • Efficiency: You don’t have to spend time preparing examples; the AI generates them autonomously, which speeds up the process.

The Rationale Behind It

Recently, researchers have made significant progress in the field of analogical prompting in artificial intelligence. Their findings offer the following insights:

  • Inspired by Human Thinking: The technique is inspired by how humans use past experiences to solve new problems. By drawing analogies with known situations, AI can mimic human reasoning and provide more effective solutions.
  • Self-Generated Examples: Instead of relying on predefined examples, AI models are able to come up with relevant analogies and situations themselves that fit the problem. This increases the flexibility and applicability of their answers.
  • Improved Performance: Applying analogical prompting has led to improved AI performance in various tasks, such as natural language processing, problem-solving, and decision-making. Models can better understand and answer more complex questions.
  • Effectiveness in Large Models: This technique appears to be particularly effective in advanced AI systems with extensive language models. Thanks to their capacity to process large amounts of data and patterns, they can form deeper and more contextual analogies.

These findings show that as we teach AI to reason in a way that more closely resembles human thinking, we can improve the quality and effectiveness of their output. By integrating analogical prompting, we make AI systems not only smarter but also more creative and better attuned to complex human needs.

Advantages Over Other Prompt Techniques

Analogical prompting has much in common with the prompt technique known as few-shot prompting. In few-shot prompting, you provide the AI with a few examples—the “few shots”—to show the model what the desired answer looks like. The main difference between these two techniques, however, is that with analogical prompting, you don’t need to provide your own examples. Instead, you encourage the AI to come up with relevant examples or analogies that relate to the problem.

This not only saves time and effort, as you don’t need to prepare examples, but it can also increase the creativity and relevance of the generated examples. Because the AI draws from its extensive knowledge base, the self-generated analogies can better align with the specific problem and offer new insights that you might not have considered.

Moreover, analogical prompting leads to a greater diversity of output. Because the AI comes up with analogies itself, there’s a higher chance that the answers will vary and offer unique perspectives. In few-shot prompting, on the other hand, the answers may be more limited to the style and content of the examples you provided, which can reduce variation.

Although analogical prompting offers many advantages, it also has a possible disadvantage compared to few-shot prompting. In few-shot prompting, you have more control over the AI’s output. By providing your own examples, you can precisely steer the AI in terms of the style, tone, and content of the answer. This is especially useful when consistency and specific guidelines are important for the task.

The Analogical Prompts

There are numerous ways to put analogical prompts into practice, and we encourage all of you to experiment with them. Of course, we’ll provide a starting point to showcase the possibilities.

Prompt template

Use this prompt to come up with similar situations or analogies that help you better understand a concept or solve a problem.

Template:

[Your question or problem here]

First, come up with three similar situations or analogies related to this problem or concept.

Use these analogies to solve the original problem or better understand the concept.

How can I understand the concept of fuzzy clustering? First, come up with three analogies that help illustrate how fuzzy clustering works. Use these analogies to help me better understand the concept of fuzzy clustering.


With Emphasis on Diversity

Use this prompt to come up with diverse and varied examples that improve your understanding and stimulate your creativity.

Template:

[Your question or problem here]

Come up with five diverse but relevant analogies or examples that relate to this problem or concept in different ways.

Use these examples as inspiration to solve the problem or understand the concept.

How can I integrate five relevant case studies to create multiple-choice quiz questions for my marketing course? Come up with five diverse but relevant examples of marketing cases from different sectors. Use these examples as inspiration to formulate multiple-choice questions that test important concepts in marketing.


Combining Knowledge and Examples

Use this prompt to develop an understanding by explaining concepts and connecting practical examples with your assignment.

Template:

[Your question or problem here]

Give a brief explanation of the key concepts and terminology involved.

Then describe two practical examples or case studies that are similar.

Use this knowledge and examples to solve the original problem or understand the concept.

How can I apply the principles of clustering in my data analysis assignment on customer segmentation? Provide a brief explanation of what clustering entails and what types of clustering algorithms exist. Then describe two practical examples where clustering is used for customer segmentation. Use this knowledge and examples to solve the original problem or understand the concept.

Conclusion

Analogical prompting is a new technique aimed at getting the best out of AI systems. By encouraging the AI to think about similar situations, we mimic the human thought process. This not only leads to better and more thoughtful answers but also provides insight into how the AI arrives at its conclusions.

This method offers a unique ‘shortcut’ to improved AI performance without the need to provide examples yourself. It is a flexible and time-saving approach that leverages the AI’s creativity and extensive knowledge.

Experiment with analogical prompting and discover how you can make the AI think like an experienced professional in your field. By embracing this technique, you not only elevate the quality of the AI output to a higher level but also enrich your own understanding and problem-solving abilities.