🔧 Prompt Engineering Toolkit

Introduction

Based on White et al. (2023), this toolkit presents a categorized set of reusable “prompt patterns” to help you interact more effectively with ChatGPT. These patterns are structured techniques designed to solve common problems when prompting large language models (LLMs).

Prompt Engineering Showcase

Special thanks to Adam Garry, Dell Director of Global Education Strategy, for putting together this really cool way of summarizing all of the patterns in the course. This is a great example of applying prompt engineering for creative problem solving:

Even more amazing is his combination of generative AI techniques to create new videos describing the patterns!
Pattern Category Prompt Pattern
Input Semantics Meta Language Creation
Output Customization Output Automater
Output Customization Persona
Output Customization Visualization Generator
Output Customization Recipe
Output Customization Template
Error Identification Fact Check List
Error Identification Reflection
Prompt Improvement Question Refinement
Alternative Approaches Cognitive Verifier
Alternative Approaches Refusal Breaker
Interaction Flipped Interaction
Interaction Game Play
Interaction Infinite Generation
Context Control Context Manager

📦 Meta Language Creation

🎨 Translation

📎 Appendix

Original Document: Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT (White et al., 2023)

📚 References

  1. Bommasani et al., 2021. On the opportunities and risks of foundation models. arXiv:2108.07258.
  2. Bang et al., 2023. A multitask, multilingual, multimodal evaluation of ChatGPT. arXiv:2302.04023.
  3. Gilson et al., 2022. How well does ChatGPT do when taking the medical licensing exams? medRxiv.
  4. Carleton et al., 2022. Architecting the future of software engineering. IEEE Computer, 55(9).
  5. GitHub Copilot. https://github.com/features/copilot
  6. Asare et al., 2022. Is GitHub’s Copilot as bad as humans at introducing vulnerabilities? arXiv:2204.04741.
  7. Pearce et al., 2022. Asleep at the keyboard? IEEE Security and Privacy.
  8. Krochmalski, J. (2014). IntelliJ IDEA Essentials. Packt.
  9. Liu et al., 2023. A systematic survey of prompting methods. ACM Computing Surveys.
  10. Gamma et al., 1995. Design patterns: elements of reusable object-oriented software.
  11. Schmidt et al., 2013. Pattern-oriented software architecture.
  12. OpenAI. ChatGPT: https://openai.com/blog/chatgpt
  13. OpenAI. DALL¡E 2: https://openai.com/dall-e-2/
  14. Zhou et al., 2022. Least-to-most prompting. arXiv:2205.10625.
  15. Ellson et al., 2004. Graphviz and Dynagraph. In Graph Drawing Software.
  16. Owen, S. Building a virtual machine inside a JavaScript library. https://www.engraved.blog/building-a-virtual-machine-inside
  17. Zhang et al., 2017. Applying software patterns in blockchain-based healthcare apps.
  18. Xu et al., 2018. A pattern collection for blockchain-based applications.
  19. Van Dis et al., 2023. ChatGPT: five priorities for research. Nature.
  20. Reynolds & McDonell, 2021. Prompt programming beyond few-shot. arXiv:2102.07350.
  21. Wei et al., 2022. Chain of thought prompting. arXiv:2201.11903.
  22. Wei et al., 2022. Emergent abilities of LLMs. arXiv:2206.07682.
  23. Zhou et al., 2022. LLMs as human-level prompt engineers. arXiv:2211.01910.
  24. Shin et al., 2020. AutoPrompt. arXiv:2010.15980.
  25. Radford et al., 2019. Language models are unsupervised multitask learners.
  26. Jung et al., 2022. Maieutic prompting. arXiv:2205.11822.
  27. Arora et al., 2023. Ask Me Anything prompting. ICLR.
  28. Liu & Chilton, 2022. Design guidelines for prompt engineering. CHI.
  29. Maddigan & Susnjak, 2023. Chat2Vis. arXiv:2302.02094.
  30. Han et al., 2022. PTR: Prompt tuning with rules. AI Open.
  31. Wang et al., 2023. Boolean queries for systematic reviews. arXiv:2302.03495.
  32. Xia & Zhang, 2023. Conversational automated program repair. arXiv:2301.13246.
  33. Choi et al., 2023. ChatGPT goes to law school. SSRN.
  34. Frieder et al., 2023. Mathematical capabilities of ChatGPT. arXiv:2301.13867.