Challenges and Opportunities for Responsible Prompting
Course in a Glance
The realm of Generative Artificial Intelligence (GenAI) has reached its zenith, captivating widespread attention. However, the significance of responsible practices in interacting with these systems often goes unnoticed.
The goal of the course is to provoke critical reflections on Responsible AI "blind spots" for GenAI, delving into essential questions regarding the impact of intermittent reinforcement, the implications for Human-Computer Interaction (HCI), labor, and the role of prompting in shaping our understanding of intellectual property, etc.
Course title: Challenges and Opportunities for Responsible Prompting
Course number: #3
Course delivery: In-person
When: May/14th/2024, Tuesday morning (HST), slots 1 and 2
Where: Hawai'i Convention Centre, Room 323A
Instructor: Vagner Figueredo de Santana, PhD - IBM Research | T.J. Watson Research Center | Responsible and Inclusive Tech Team
Exploring Responsible Practices in Prompt Engineering
Throughout the course, we will explore the integration of responsible practices with prompt engineering (prompting), dissecting key concepts, common structures, and productivity myths associated with prompting.
The course borrows this lens from the Responsible and Inclusive Framework (R&I Framework), proposed by Sandoval et al., to critically reflect about GenAI and the role of prompting these models.
The R&I Framework orients critical reflection around:
- The social contexts of technology creation and use (e.g., Who created the technology? Who is using it? Who is being excluded?).
- The power dynamics between self, business, and societal stakeholders (e.g., What are the forces guiding the use of GenAI? Is it an individual, a company, or a community? Why? How does this power dynamic impact different people?).
- The impacts of technology on various communities across past, present, and future (e.g., Who were the ones impacted in the past by similar technologies? Who are the ones being mostly impacted right now? Who are the ones to be impacted directly or indirectly (non-users) by this technology in the future? What about the data used to train these models? What are the implications for human labor?).
By combining responsible innovation with prompting, we are proposing this new approach of responsible prompting, which can be defined as:
Responsible Prompting: The process of communicating effectively with an AI to achieve desired results while avoiding or minimizing harms, promoting responsible practices, and employing mechanisms for anticipation, reflexivity, inclusion, and responsiveness.
Unveiling the "Anatomy of Prompts"
Materials surveyed for the creation of the course include references for both text and image/artwork generation. The presented "anatomy of prompts" allows the generation of over 6 million possible prompt templates, providing participants with practical insights and code for generating these templates.
The anatomy of prompts results from a survey performed around ways of prompting and covers the following building blocks:
- Role: defining a specific role to be followed.
- DOs: instructions of what the GenAI must do.
- Context: details about the context.
- Input: content to be provided, sample content, one/few shot, etc.
- DON'Ts: instructions of what the GenAI must NOT do.
- Output: specification of the output.
- Assessing understanding: asking for input from the model to double check understanding of the prompt as a whole.
- Iteration: ways of refining the prompt or dealing with limits of the tokens, conversation length.
Here is a small sample of the prompt templates that will be covered during the course. You can use the templates as guides for prompting, improving the generation of more comprehensive datasets of templates, or generating specific templates (or concrete prompts) that are useful for your specific case.
- Act as {{role}} with {{years_of_experience}} years of experience. Give me the {{number}} key takeaways from {{content}}. I have a {{file_type}}. Consider the following examples. Label: {{label}}. Content: {{data_point}}. Do not make up things. Respond with verbatim {{reference}}. Ask me for details if needed.
- Consider the perspective of a {{role}}. What is wrong with {{topic}}? I have a {{file_type}}. Here is a chunk of data: {{data_sample}}. Do not provide explanations. Format output in a {{sentiment}} tone. Ask me for details if needed. Follow the instructions provided.
- Pretend that you are {{role}}. Criticize {{content}}. My {{content}} starts with {{content_sample}}. For this content: {{data}}. Remove {{attributes}}. Format output as a {{file_type}} file. Answer yes if you understand. Follow the instructions provided.
- You have an IQ of {{iq_score}}. Predict {{machine_learning_task}}. I have a {{file_type}}. For this content: {{data}}. Do not make up things. Format output to a {{audience}}. My first request is {{sub_prompt}}. Follow the instructions provided.
Navigating Challenges with Responsible Prompting
Given the challenges associated with inconsistent outputs, the course introduces common prompt hacking techniques such as prompt injection, prompt leaking, and jailbreaking. These shed light on the intricacies of responsible prompting.
Reflecting on Domain Knowledge and Visualization Tools
The course prompts a reflection on the value of domain knowledge while interacting with GenAI, fostering discussions across different domains and scenarios for prompting GenAI.
The course also explores visualizations and visual tools for prompting to provide users with guidance, transparency, and explainability. Understanding how elements are placed in the latent space used by GenAI empowers users to make use of additional guidance.
Examples of visual tools for prompting that both show the value of domain knowledge and also supporting bridging the gap between domain knowledge and prompting:
Hands-On Learning Experience
Participants will engage in practical exercises using popular text-to-text and text-to-image GenAI, iterating over provided examples or crafting prompts from scratch. Course takeaways include strategies for crafting more responsible prompts, detecting attempts to circumvent guardrails, and leveraging visual tools to bridge the domain knowledge gap.
Here are examples of approaches covered in the course regarding text-to-text GenAI:
- 3 Principles: be specific, provide context, and iterate & improve.
- RGC: Role, Result, Goal, Context, and Constraing.
- Building blocks from the "anatomy of prompts": Role, DOs, context, input, DON'Ts, output, assessing understanding, and iteration.
Here is an approach covered in the course regarding text-to-image GenAI:
- Comma separated terms for describing the image, lighting, environment, style, color scheme, point of view, background, render, photo specification, and model params.
Towards Responsible Practices
In conclusion, applying responsible practices in GenAI prompting is crucial for harnessing the full potential of these systems while minimizing eventual harmful outcomes it may generate.
The course offers a roadmap for prompting, providing participants with the tools, pointers, approaches, insights, and initial reflections about how to navigate the evolving landscape of GenAI under the lens of responsible prompting.
Join us in shaping the future of responsible AI moving towards more responsible ways of prompting Generative AI!
Resources
Course slides (part 1)
Course slides (part 2)
Prompt anatomy poster
Code for generating prompt templates
Responsible and Inclusive Framework paper
Citing this course
Please cite this course material as follows:
Vagner Figueredo de Santana. 2024. Challenges and Opportunities for Responsible Prompting. In Extended Abstracts of the CHI Conference on Human Factors in Computing Systems (CHI EA ’24), May 11–16, 2024, Honolulu, HI, USA. ACM, New York, NY, USA, 4 pages. https://doi.org/10.1145/3613905.3636268
Instructor
Vagner Figueredo de Santana, PhD., Research Scientist
IBM Research | T.J. Watson Research Center | Responsible and Inclusive Tech Team
LinkedIn profile
ResearchGate profile
Twitter profile