100 Prompting Techniques

100 Prompting Techniques

Prompting techniques in AI and machine learning, particularly in natural language processing (NLP), are methods used to guide or instruct an AI model to generate specific types of responses or outputs. These techniques are essential for effectively leveraging models like GPT (Generative Pre-trained Transformer) to perform the desired tasks or to receive the wanted outcomes.


I asked ChatGPT 4o to list prompting techniques. First, it gave me only the first 10 on the list (under 'common prompting techniques'). So, I continued to ask for more until I believed I had exhausted its ideas.


Here, I present to you 100 prompting techniques along with their descriptions and examples. The techniques are divided into different categories according to GPT response:

  • Common prompting techniques.
  • Nuanced techniques and variations.
  • Advanced, less common techniques.
  • Less common but still valuable in certain contexts.
  • Advanced niche techniques.
  • Advanced emerging techniques.


This will be long; so, I won't waste any more time. Let's just dive into it.



Common Prompting Techniques

1. Zero-Shot Prompting

Description: The model is given a task without any prior examples or additional context. It relies solely on its pre-existing knowledge to generate a response.

Example: "Translate the following sentence to French: 'Hello, how are you?'"

2. One-Shot Prompting

Description: The model is provided with one example of the task before being asked to perform it.

Example:

  • Instruction: "Translate the sentence to French. Example: 'Good morning' -> 'Bonjour'"
  • Task: "Translate the following sentence to French: 'Hello, how are you?'"

3. Few-Shot Prompting

Description: The model is given a few examples of the task to understand the pattern before being asked to generate a response.

Example:

  • Instruction: "Translate the sentences to French. Examples: 'Good morning' -> 'Bonjour', 'Thank you' -> 'Merci'"
  • Task: "Translate the following sentence to French: 'Hello, how are you?'"

4. Chain-of-Thought Prompting

Description: This technique involves prompting the model to think step-by-step, breaking down the reasoning process into smaller steps. This helps the model generate more accurate and logical responses.

Example: "If it is raining outside, and you don't have an umbrella, what should you do? First, check the weather. If it's raining, then..."

5. Instruction-Based Prompting

Description: The model is given explicit instructions on how to perform the task, often with additional context or guidelines.

Example: "Write a summary of the following article, focusing on the key points and main arguments."

6. Contextual Prompting

Description: Providing the model with a broader context or background information to help it generate a more informed response.

Example: "Given the recent advancements in AI and their impact on healthcare, write an article about the future of AI in medical diagnostics."

7. Template-Based Prompting

Description: Using pre-defined templates or structures to guide the model's response. This is useful for generating consistent outputs.

Example: "Generate a customer review for a product: 'I recently purchased [product name] and it has been [positive/negative experience]. The best feature is [feature].'"

8. Interactive Prompting

Description: Engaging in a back-and-forth interaction with the model, where the initial prompt is followed by additional prompts based on the model's responses.

Example:

  • User: "Tell me a story about a dragon."
  • AI: "Once upon a time, there was a dragon who lived in a cave."
  • User: "What was the dragon's name?"
  • AI: "The dragon's name was Drago."

9. Multi-Turn Prompting

Description: Involves multiple rounds of interaction, where each prompt builds on the previous responses to create a more complex and coherent output.

Example:

  • User: "Write a poem about the ocean."
  • AI: "The ocean is vast and deep, its secrets it does keep."
  • User: "Include imagery about the waves."
  • AI: "Waves crash with mighty force, on a never-ending course."

10. Role-Based Prompting

Description: Instructing the model to take on a specific role or persona to generate responses from that perspective.

Example: "You are a doctor. Explain to a patient how to manage their diabetes."




Nuanced Techniques and Variations

11. Self-Consistency Prompting

Description: The model generates multiple responses to the same prompt and then selects the most consistent or frequent answer. This can help improve reliability and accuracy.

Example: "Generate three different answers to the question 'What is the capital of France?' and choose the most consistent one."

12. Contrastive Prompting

Description: Providing contrasting examples to help the model distinguish between different scenarios or responses.

Example: "Explain the difference between a cat and a dog. A cat is a small, often domesticated carnivorous mammal. A dog is a domesticated carnivorous mammal that typically has a long snout and acute sense of smell."

13. Error Analysis Prompting

Description: Asking the model to identify and correct its own errors. This technique can help in tasks that require precision.

Example: "Here is a sentence: 'She don't like apples.' Identify and correct the grammatical error."

14. Iterative Refinement Prompting

Description: Involves repeatedly refining the prompt or response to improve accuracy and relevance. This can be particularly useful for complex tasks.

Example: "Write a summary of this article. Now, refine the summary to include more details about the main argument."

15. Instruction with Example Variations

Description: Combining instructions with multiple varied examples to cover a wider range of scenarios and ensure the model can generalize better.

Example:

  • Instruction: "Translate the following sentences to French."
  • Examples: "'Good morning' -> 'Bonjour', 'How are you?' -> 'Comment ?a va?', 'See you later' -> 'à plus tard'"

16. Mixed-Modality Prompting

Description: Combining text prompts with other modalities, such as images or audio, to provide richer context.

Example: "Describe the scene in this picture" (accompanied by an image).

17. Style-Based Prompting

Description: Instructing the model to generate responses in a specific style or tone, such as formal, informal, humorous, or academic.

Example: "Write a humorous review of the movie 'Inception'."

18. Perspective-Based Prompting

Description: Asking the model to generate responses from different perspectives or viewpoints, which can be useful for tasks requiring empathy or understanding multiple sides of an issue.

Example: "Write an opinion piece on climate change from the perspective of a scientist and then from the perspective of a concerned citizen."

19. Sequential Task Prompting

Description: Breaking down a complex task into a series of simpler, sequential prompts, each building on the previous one.

Example:

  • Step 1: "Identify the main topic of this paragraph."
  • Step 2: "List three key points related to this topic."
  • Step 3: "Summarize the paragraph based on these key points."

20. Domain-Specific Prompting

Description: Tailoring the prompt to a specific domain or industry to leverage the model's knowledge in that area.

Example: "Explain the process of gene editing using CRISPR in simple terms."

21. Conditional Prompting

Description: Providing conditional instructions that guide the model to respond differently based on specific conditions.

Example: "If the input is a question about history, provide a detailed answer. If it's about science, give a brief explanation."

22. Multi-Task Prompting

Description: Combining multiple tasks within a single prompt to leverage the model's ability to handle diverse queries.

Example: "Translate the following sentence to French and then summarize its meaning in English: 'The quick brown fox jumps over the lazy dog.'"




Advanced, Less Common Techniques

23. Retrieval-Augmented Prompting

Description: Incorporating external knowledge retrieval into the prompting process to provide the model with up-to-date or detailed information from a database or the internet. Example: "Using information from the latest WHO guidelines, explain the recommended treatments for COVID-19."

24. Analogical Prompting

Description: Using analogies to help the model understand and generate responses by drawing parallels between similar concepts or situations.

Example: "Explain blockchain technology as if you were explaining a digital version of a traditional ledger."

25. Task-Specific Prompting

Description: Designing prompts that are highly specific to a particular task or application, often involving detailed instructions and examples tailored to that task.

Example: "For the task of sentiment analysis, classify the following review as positive, negative, or neutral: 'I loved the movie, it was fantastic and well-acted.'"

26. Counterfactual Prompting

Description: Exploring "what-if" scenarios by prompting the model to consider alternative outcomes or situations.

Example: "What would have happened if Alexander the Great had not died young?"

27. Hypothetical Prompting

Description: Asking the model to consider hypothetical situations or speculative scenarios to generate creative or forward-thinking responses.

Example: "Imagine a world where humans can live on Mars. Describe the potential challenges and benefits of this scenario."

28. Reflective (Reasoning) Prompting

Description: Prompting the model to reflect on its previous responses or to think critically about a given topic.

Example: "Reflect on the reasons why renewable energy is important for the future of our planet."

29. Ethical Prompting

Description: Instructing the model to consider ethical implications and moral reasoning in its responses.

Example: "Discuss the ethical considerations of using AI in law enforcement."

30. Meta-Cognitive Prompting

Description: Encouraging the model to think about its own thought processes and to explain how it arrived at a particular conclusion.

Example: "Explain the reasoning process you used to determine the answer to this math problem."

31. Creative Prompting

Description: Encouraging the model to generate creative outputs, such as stories, poems, or artistic ideas.

Example: "Write a short story about a time-traveling cat who changes the course of history."

32. Interactive Scenario Prompting

Description: Creating interactive scenarios where the model takes on roles and responds to dynamic prompts in a simulated environment.

Example: "You are a customer service representative. Handle the following customer complaint about a delayed order."

33. Cross-Disciplinary Prompting

Description: Combining knowledge from multiple disciplines to generate comprehensive responses that span different fields.

Example: "Explain the economic and environmental impacts of electric cars."

34. Multilingual Prompting

Description: Using prompts that involve multiple languages to test the model's ability to understand and generate responses across different linguistic contexts.

Example: "Translate the following sentence to Spanish and then summarize its meaning in English."

35. Socratic Prompting

Description: Using a questioning technique inspired by the Socratic method to encourage the model to explore complex ideas through a series of probing questions.

Example: "What is justice? How do different societies define justice? Can justice be universally applied?"

36. Story Completion Prompting

Description: Providing the beginning of a story and asking the model to continue or complete it, focusing on coherence and creativity.

Example: "Once upon a time, in a small village nestled in the mountains, there lived a..."

37. Procedural Prompting

Description: Instructing the model to outline or describe step-by-step procedures for completing a task.

Example: "Describe the steps involved in setting up a new email account."

38. Heuristic Prompting

Description: Encouraging the model to use heuristic methods or rules of thumb to solve problems or make decisions.

Example: "What are some heuristic techniques for quickly estimating the sum of large numbers?"

39. Collaborative Prompting

Description: Engaging the model in a collaborative task where it works together with the user to generate responses or solutions.

Example: "Let's brainstorm ideas for a new app. I'll start: How about an app that tracks your daily water intake?"




Less Common But Still Valuable in Certain Contexts

40. Scenario-Based Prompting

Description: Creating detailed scenarios or situational contexts to help the model generate responses that are relevant to specific circumstances.

Example: "Imagine you are a teacher in a classroom during a fire drill. How would you ensure all students evacuate safely?"

41. Goal-Oriented Prompting

Description: Designing prompts that specify a clear goal or outcome the model should aim to achieve in its response.

Example: "Generate a marketing email that aims to increase subscriptions to our newsletter."

42. Contrastive Explanation Prompting

Description: Asking the model to explain why one option or scenario is better or worse than another.

Example: "Why is solar energy considered more sustainable than fossil fuels?"

43. Policy-Based Prompting

Description: Using prompts that simulate policy-making or decision-making scenarios to explore the implications of different choices.

Example: "As a city mayor, propose a policy to reduce traffic congestion and explain its benefits."

44. Sequential Planning Prompting

Description: Instructing the model to create a step-by-step plan to achieve a complex task or goal.

Example: "Outline a plan to start a community garden, from securing a location to planting the first seeds."

45. Emotional Tone Prompting

Description: Guiding the model to generate responses with a specific emotional tone or mood.

Example: "Write an apology letter with a sincere and regretful tone."

46. Adaptation Prompting

Description: Asking the model to adapt its responses based on feedback or changing requirements.

Example: "Rewrite the following paragraph to make it more engaging and less formal."

47. Perspective Shift Prompting

Description: Instructing the model to consider a situation from different perspectives or roles.

Example: "Describe the impact of remote work from the perspective of an employee and then from the perspective of an employer."

48. Contextual Query Expansion

Description: Providing additional context or background information to expand on a query and elicit more detailed responses.

Example: "Given the economic downturn in the early 2020s, discuss the long-term impacts on the job market."

49. Hypothesis Testing Prompting

Description: Asking the model to test a hypothesis or predict the outcome of a hypothetical scenario.

Example: "What would be the effect on global warming if all countries switched to renewable energy sources by 2050?"

50. Role-Playing Prompting

Description: Instructing the model to role-play a specific character or professional to generate contextually appropriate responses.

Example: "As a financial advisor, what would you recommend to someone looking to invest in real estate?"

51. Adaptive Learning Prompting

Description: Guiding the model to learn and adapt from previous interactions to improve future responses.

Example: "Based on our previous conversation about healthy diets, suggest a weekly meal plan."

52. Multi-Perspective Analysis

Description: Encouraging the model to analyze a topic from multiple perspectives, providing a more holistic view.

Example: "Analyze the pros and cons of remote education from the perspectives of students, teachers, and parents."

53. Cognitive Bias Prompting

Description: Instructing the model to identify and explain potential cognitive biases in decision-making or reasoning.

Example: "Explain how confirmation bias might affect someone's opinion on climate change."

54. Creative Constraint Prompting

Description: Setting specific constraints or rules to guide the model's creative output.

Example: "Write a poem about autumn using only five-syllable lines."

55. Expert Opinion Prompting

Description: Asking the model to generate responses as if it were an expert in a particular field.

Example: "As a nutritionist, what advice would you give to someone trying to lose weight?"

56. Cultural Context Prompting

Description: Providing cultural context to help the model generate culturally sensitive and appropriate responses.

Example: "Describe the significance of the Lunar New Year in Chinese culture."

57. Ethical Dilemma Prompting

Description: Presenting ethical dilemmas to explore the model's ability to reason about complex moral issues.

Example: "What are the ethical considerations of using AI in hiring processes?"

58. Multistep Reasoning Prompting

Description: Encouraging the model to break down complex reasoning tasks into multiple steps.

Example: "Explain the process of natural selection in five distinct steps."

59. Translation and Explanation Prompting

Description: Asking the model to translate a text and then explain the translation choices.

Example: "Translate the following sentence to Spanish and explain why you chose each word: 'The quick brown fox jumps over the lazy dog.'"

60. Personalized Prompting

Description: Customizing prompts to suit the specific preferences or needs of a user.

Example: "Generate a workout plan tailored for someone who enjoys outdoor activities and has 30 minutes a day to exercise."

61. Long-Form Content Prompting

Description: Instructing the model to generate extended pieces of content, such as essays, reports, or detailed guides.

Example: "Write a comprehensive guide on the benefits and challenges of adopting electric vehicles."




Advanced Niche Techniques

62. Argumentative Prompting

Description: Encouraging the model to construct and present a well-structured argument, including supporting evidence and counterarguments.

Example: "Construct an argument for why universal basic income should be implemented, including potential objections and responses to those objections."

63. Procedural Knowledge Prompting

Description: Asking the model to describe procedural knowledge or "how-to" instructions in a clear, step-by-step manner.

Example: "Describe how to change a car tire, step by step."

64. Real-Time Adaptation Prompting

Description: Prompting the model to adapt its responses in real-time based on immediate feedback or new information provided during an interaction.

Example: "After each of my questions, adjust your response based on the new information I provide."

65. Comparative Analysis Prompting

Description: Instructing the model to compare and contrast different items, ideas, or concepts, highlighting similarities and differences.

Example: "Compare and contrast the economic systems of capitalism and socialism."

66. Multimodal Integration Prompting

Description: Combining multiple modes of input, such as text, images, and audio, to generate comprehensive responses that integrate these various forms of information.

Example: "Given this image of a plant and the description of its environment, identify the plant species and suggest optimal care tips."

67. Interactive Learning Prompting

Description: Designing prompts that allow the model to engage in an interactive learning process, adapting and improving its responses based on user feedback.

Example: "Explain photosynthesis, and after each part of your explanation, I'll ask follow-up questions to deepen the understanding."

68. Causal Reasoning Prompting

Description: Encouraging the model to explain the cause-and-effect relationships within a given scenario or set of data.

Example: "Explain the causes and effects of deforestation on the global ecosystem."

69. Hypothesis Generation Prompting

Description: Asking the model to generate and explore potential hypotheses for a given question or problem.

Example: "Generate three possible hypotheses for why a particular species of bird is declining in population."

70. Multi-Task Learning Prompting

Description: Combining several tasks within a single prompt to test the model's ability to multitask and manage complex queries.

Example: "Translate the following paragraph to French, then summarize it in English, and finally, analyze its main argument."

71. Context-Dependent Prompting

Description: Providing detailed context or background information that the model must use to generate relevant responses.

Example: "Given the context of the American Civil War, discuss the economic factors that contributed to the conflict."

72. Iterative Improvement Prompting

Description: Prompting the model to iteratively refine and improve upon an initial response based on feedback or additional prompts.

Example: "Write an introduction for my research paper. After I review it, refine the introduction to include more details about the research methods."

73. Societal Impact Prompting

Description: Asking the model to explore and explain the societal impacts of a particular technology, policy, or event.

Example: "Discuss the societal impacts of social media on youth behavior and mental health."

74. Diagnostic Prompting

Description: Using prompts to diagnose a problem or issue based on provided symptoms or data.

Example: "Based on these symptoms (fever, cough, fatigue), what potential illnesses could be diagnosed, and what are the next steps for treatment?"

75. Temporal Reasoning Prompting

Description: Encouraging the model to reason about events and scenarios over time, considering temporal sequences and changes.

Example: "Describe the evolution of computing technology from the 1950s to the present day."

76. Ethical Scenario Prompting

Description: Presenting ethical dilemmas and asking the model to explore possible resolutions and their implications.

Example: "A self-driving car must choose between hitting a pedestrian or swerving and injuring its passengers. Discuss the ethical considerations of such a decision."

77. Cross-Cultural Prompting

Description: Asking the model to generate responses that are sensitive to and inclusive of different cultural perspectives and norms.

Example: "Describe the New Year celebrations in different cultures around the world."

78. Reflective Prompting

Description: Encouraging the model to reflect on its own responses and provide a meta-cognitive evaluation.

Example: "Reflect on the quality of the summary you just provided and suggest ways it could be improved."

79. Heuristic Evaluation Prompting

Description: Prompting the model to apply heuristic rules or guidelines to evaluate or solve a problem.

Example: "Use heuristic evaluation to assess the usability of this new mobile app interface."

80. Scenario Planning Prompting

Description: Using detailed hypothetical scenarios to guide the model in planning and decision-making.

Example: "Plan a response strategy for a company facing a major data breach, considering both short-term and long-term actions."

81. Exploratory Data Analysis Prompting

Description: Asking the model to explore and analyze a given dataset, providing insights and visualizations.

Example: "Analyze this dataset on climate change indicators and summarize the key trends and patterns."



Alas! I started to receive a complaint from ChatGPT; however, I continued to ask for more and received this final list.


Screenshot of ChatGPT chat. Apparent complaints are underlined.


Advanced Emerging Techniques

82. Adaptive Contextualization

Description: Adapting the context dynamically based on the user's input and previous interactions to provide more accurate and relevant responses.

Example: "Based on our earlier discussion about renewable energy, how would you address the challenge of energy storage?"

83. Complex Query Decomposition

Description: Breaking down complex queries into simpler sub-queries that the model can handle more effectively before synthesizing the final response.

Example: "Explain the impact of climate change on marine life. First, describe the main effects of climate change, then detail how these effects influence marine ecosystems."

84. Hierarchical Prompting

Description: Structuring prompts in a hierarchical manner to guide the model through layers of information and reasoning.

Example: "Outline the process of scientific research. Start with hypothesis formation, then proceed to experimental design, data collection, analysis, and conclusion."

85. Perspective-Blending Prompting

Description: Combining multiple perspectives or viewpoints within a single response to provide a balanced and comprehensive answer.

Example: "Discuss the benefits and drawbacks of remote work from the perspectives of employees, employers, and society at large."

86. Hypothetical Scenario Evaluation

Description: Evaluating hypothetical scenarios by considering potential outcomes and implications.

Example: "If a new law is passed to ban single-use plastics, what could be the environmental, economic, and social impacts over the next decade?"

87. Context-Aware Retrieval

Description: Using prompts that direct the model to retrieve and incorporate specific contextual information relevant to the query.

Example: "Using the latest data on COVID-19 vaccination rates, analyze the potential timeline for achieving herd immunity in the United States."

88. Thought Experiment Prompting

Description: Engaging the model in thought experiments to explore theoretical or philosophical questions.

Example: "Imagine a world where artificial intelligence governs human societies. What are the potential benefits and risks of such a scenario?"

89. Socratic Dialogue Prompting

Description: Engaging the model in a Socratic dialogue where it asks and answers questions to deepen understanding.

Example: "What is justice? Why do different societies have different interpretations of justice? How can we reconcile these differences?"

90. Dynamic Role Switching

Description: Prompting the model to switch roles dynamically within a conversation to explore different perspectives and responses.

Example: "As a teacher, explain the importance of homework. Now, switch to the role of a student and argue why homework might be unnecessary."

91. Analytical Reasoning Prompting

Description: Encouraging the model to apply analytical reasoning to break down and solve problems.

Example: "Analyze the factors contributing to the decline in bee populations and propose possible solutions to mitigate this issue."

92. Reflective Evaluation Prompting

Description: Prompting the model to reflect on and evaluate its own responses for accuracy and quality.

Example: "Review your previous answer about the causes of World War II and identify any areas where the explanation could be improved."

93. Speculative Fiction Prompting

Description: Instructing the model to create speculative fiction scenarios to explore futuristic or imaginative concepts.

Example: "Write a short story set in a future where humans have colonized Mars and established a new society."

94. Algorithmic Reasoning Prompting

Description: Asking the model to describe and explain the steps of specific algorithms or logical processes.

Example: "Explain how the A* search algorithm works in pathfinding applications."

95. Policy Impact Analysis Prompting

Description: Evaluating the potential impacts of proposed policies or regulations.

Example: "Analyze the potential effects of implementing a universal basic income policy on the economy and social welfare."

96. Introspective Reasoning Prompting

Description: Encouraging the model to introspect and provide reasoning for its own decision-making processes.

Example: "Explain why you chose the specific examples used in your explanation of climate change effects."

97. Iterative Question Refinement

Description: Refining questions iteratively to narrow down and focus on the most relevant aspects of a topic.

Example: "What are the primary causes of deforestation? Now, narrow down the causes specific to the Amazon rainforest."

98. Cross-Disciplinary Synthesis

Description: Synthesizing information across multiple disciplines to provide a well-rounded response.

Example: "Discuss the relationship between technological advancements and cultural changes in society."

99. Data-Driven Hypothesis Testing

Description: Using data to formulate and test hypotheses, guiding the model to make evidence-based conclusions.

Example: "Using data on global temperature changes, test the hypothesis that human activities are the primary drivers of climate change."

100. Ethical Framework Evaluation

Description: Evaluating decisions or actions within different ethical frameworks to explore moral implications.

Example: "Evaluate the use of autonomous drones in warfare from the perspectives of utilitarianism and deontological ethics."




Do you think ChatGPT hallucinates? Or did you notice any repeated techniques? Which one is your favorite? Let me know in the comments.


要查看或添加评论,请登录

社区洞察

其他会员也浏览了