The Structure of a Good Prompt

A good prompt has 4 key elements: Role, Task, Requirements, Instructions.

Let’s take a look at each one in depth.

Role

Prompts starting with “act as…” or “pretend to be…” will provide responses similar to that of the role which you provide. Setting a specific role for a given prompt increases the likelihood of more accurate information, when done appropriately.

  • E.g. act as an expert in the field of computer science
    • Determines the type of information and the way the information is communicated to you.
    • Also determines the interactivity of the conversation.

Task

The task is a summary of what you want the prompt to do. There is a lot of creativity that comes into writing a great task. It can range from generating birthday gift ideas to doing game show questions with the content from your last lecture.

  • Outline what you want the GenAI tool to do.
  • Be specific about the task’s objective, as unclear objectives lead to worse outputs.

Requirements

Writing clear requirements is all about giving as much information as possible to ensure your response does not use any incorrect assumptions. GenAI tools make assumptions for any information they do not have in the prompt.

  • It is often important to define what an output should look like and conditions that affect the output.
  • This includes the various conditions to limit the assumptions made by the model.

Instructions

Instructions will inform the GenAI tool how to complete the task. Instructions can include examples of how it is supposed to work, steps it can follow or any information.

  • How should the AI go about completing its task.
  • Examples of how it could go about tasks.
  • Feedback on steps it has taken will improve this even further.

Review the C.L.E.A.R. Framework for Prompt Engineering (Lo, 2023)

Assumptions that can lead to incorrect output

Large language models (LLMs) generate responses based on the wording and context of prompts, making assumptions that can affect the accuracy and bias of their output. It is crucial to critically evaluate these assumptions and consider multiple perspectives when interpreting AI-generated content.

Watch this short video demonstrating how the model makes an incorrect assumption from an entered prompt.

Reference: Lo, L. S. (2023). The Art and Science of Prompt Engineering: A New Literacy in the Information Age. Internet reference services quarterly, ahead-of-print (ahead-of-print), 1-8. https://doi.org/10.1080/10875301.2023.2227621

Attribution: Adapted from University of Sydney AI in Education licensed under a Creative Commons BY-NC 4.0 licence

definition

Licence

Icon for the Creative Commons Attribution-NonCommercial 4.0 International License

Are You AI Ready? Investigating AI tools in Higher Education - Faculty Guide Copyright © by SATLE Project Team 'Are You AI Ready?' University College Dublin is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, except where otherwise noted.

Share This Book