How to talk to AIs: Prompt Design 101

By
HyunSoo Suh
June 01, 2023

The Evolution of AI

Artificial Intelligence (AI), often called traditional AI, has been around since the 1950s. It has been used with different degrees of success in various fields for years. Traditional AI uses training data to execute specific instructions and make decisions according to preset algorithms, the criteria for actions.

Generative AI, referred to as conventional AI, coined in the 1960s with the advent of chatbots, has evolved into a new category of AI models. One of the pioneering examples was the ELIZA chatbot, which simulated the role of a psychotherapist engaging in natural language conversations with humans. The emergence of modern generative AI in the 2010s can largely be attributed to the prominence of deep learning techniques, mainly through the introduction of Generative Adversarial Networks (GANs). These machine learning algorithms enabled generative AI to produce images, videos, and audio, signifying a breakthrough in the field.

Generative AI can identify and classify inputs like traditional AI did, but also generate new content in response to natural language input. Prompt design is essential to reap effective results from generative AI (GenAI) tools.

What is a Prompt?

A prompt is a phrase given to an AI model to generate a response. The predictive model is designed to provide us with information, insights, or creative ideas tailored to our needs. It is the equivalent of having a knowledgeable assistant at our fingertips.

The performance of the AI model hinges upon the volume of the data as well as the context provided through our input. With sufficient context, the AI models can answer correctly and avoid making stuff up, which we call hallucination. Tailoring clear and concise input helps GenAI tools understand the user's intent and can help us get more in-depth information out of the model and connect various topics. Reflecting on how to formulate our prompt can significantly enhance the outcomes.

Elements of a Prompt

What constitutes a prompt? A prompt is mainly made of everyday language, but there's more to it in terms of structure. It's beneficial to envision a prompt as encompassing any of the following elements;

  • Instructions or Questions (required)
  • Data or contextual information (optional)
  • Example (optional)

Prompt Design

Prompt design focuses on designing inputs for GenAI tools, which will produce optimal outputs. It's about structuring our communication with these GenAI tools to get what we need without going back and forth or repeatedly rewording our questions.

Prompt Design Guideline 

  • Specific and Clear
    • Ensure your prompt is clear and concise. It should communicate exactly what you want from the AI without any ambiguity.
  • Personas set the Context
    • Embed a persona in your prompt to provide a consistent character or role for the AI, enhancing engagement and contextual grounding.
  • Instruction Ordering
    • Place crucial instructions early in the prompt, as models read from start to finish, and essential information at the beginning can guide the response effectively.
  • Examples
    • Include examples within your prompt to guide the AI towards the kind of response you're looking for.
  • Multi-step Instructions
    • Break down your prompt into step-by-step instructions for complex tasks to guide the AI through the process.
  • Error Checking
    • Include instructions for the model to check for errors or confirm accuracy before providing the final output, especially for critical or sensitive tasks.

As for teaching and learning use cases for AI, Ethan and Lilach Mollick have devised a prompt utilized in business school classrooms, portraying AI as a feedback provider. To illustrate this in action, here's a partially demonstrated instance of a dialogue between a "student" and the AI feedback system. In this conversation, the student shared some details about the assignment and the objectives set for it, and in return, the AI offered suggestions for enhancement and posed questions to engage the student further. Although the feedback could have been more flawless, it provided a foundation for the student to build upon and refine their work.

GenAI tools can play a pivotal role in this transformative process, assisting faculty, researchers, students and administrators in higher education. It's worth noting that these tools will continue to advance and become increasingly prevalent in the near future.

 

References

OpenAI. (2023). ChatGPT [Large language model].

Google Cloud. (n.d.). Introduction to Prompt Design. https://cloud.google.com/vertex-ai/docs/generative-ai/learn/introduction-prompt-design

Prompting Guide. (n.d.). https://www.promptingguide.ai/

AI as Feedback Generator by Ethan Mollick, associate professor of innovation and entrepreneurship at the Wharton School of the University of Pennsylvania, and Lilach Mollick, director of pedagogy at Wharton Interactive.