PROMPT DESIGN & ENGINEERING
'Prompt Engineering' is the design of written instructions (prompts) for GenAI tools that are optimized to generate and/or manipulate those tools' outputs in order to meet the user's desired criteria as closely as possible. The ability to create such prompts is considered to be one of the essentials of AI literacy.
The following growing collection of tools (guides, frameworks, articles, etc.) on Prompt Design/Prompt Engineering consists of extracted pieces from a variety of resources. Please explore the full text of those resources for a deeper understanding of their respective approaches to prompt design and engineering.
UNESCO provides the following definition of Prompt Engineering:
‘Prompt-engineering’refers to the processes and techniques for composing input to produce GenAI output that more closely resembles the user’s desired intent.
Their specific recommendations include:
- Use simple, clear and straightforward language that can be easily understood, avoiding complex or ambiguous wording.
- Include examples to illustrate the desired response or format of generated completions.
- Include context, which is crucial for generating relevant and meaningful completions.
- Refine and iterate as necessary, experimenting with different variations.
- Be ethical, avoiding prompts that may generate inappropriate, biased or harmful content.
From chapter 1.3: Prompt-engineering to generate desired outputs (p.10-11). In: Miao, Fengchun, & Holmes, W. (2023). Guidance for generative AI in education and research (UNESCO Digital Library, p. 44). UNESCO. https://unesdoc.unesco.org/ark:/48223/pf0000386693
From the abstract (p.1):
[...] The framework encompasses five core principles—Concise, Logical, Explicit, Adaptive, and Reflective—that facilitate more effective AI-generated content evaluation and creation. [...] By integrating the CLEAR Framework into information literacy instruction, academic librarians can empower students with critical thinking skills for the ChatGPT era and adapt to the rapidly evolving AI landscape in higher education.
From the article (p.2):
Prompt engineering is an invaluable skill for academic librarians, as it enables them to utilize the maximum potential of AI language models for information literacy instruction. By understanding the principles of prompt engineering and mastering the art of formulating effective queries, librarians can ensure that AI-generated content is not only accurate and coherent but also pertinent to their students’ particular needs and learning objectives.
Lo, L. S. (2023). The CLEAR path: A framework for enhancing information literacy through prompt engineering. The Journal of Academic Librarianship, 49(4), 102720. https://doi.org/10.1016/j.acalib.2023.102720
From the introduction:
This guide shares strategies and tactics for getting better results from large language models (sometimes referred to as GPT models) like GPT-4. The methods described [...] can sometimes be deployed in combination for greater effect. We encourage experimentation to find the methods that work best for you.
The six strategies described in the guide include tactical approaches and example prompts:
3. Split complex tasks into simpler subtasks
4. Give the model time to "think"
6. Test changes systematically
Note: In the introduction, OpenAI points out that some of the examples demonstrated currently work only with their most capable model, GPT-4.
OpenAI. (2023). Prompt Engineering. OpenAI Developer Platform: Guides. https://platform.openai.com/docs/guides/prompt-engineering/prompt-engineering
The 'OpenAI Cookbook' provides an extensive collection of resources for further exploration of prompt design and engineering. These resources include growing collections of...
Sanders, T., & Fishman, S. (2023, January 19). [Prompt Engineering]: Related resources from around the web. OpenAI Cookbook. https://cookbook.openai.com/articles/related_resources
Harvard University provides guidance for text-based GenAI and image generators. Their main recommendations on prompt design for text-based tools are:
Be specific
Role play: “Act as if…”
Tell it how you want your output to be presented
Use “do” and “don’t”
Consider tone and audience
Build on previous prompts
Correct mistakes and give feedback
Ask it to create your prompts or what else it needs from you
