Basic Use

Prompt Engineering I

This section will provide guidance on developing effective GenAI prompts to generate optimal results.

Prompt Template Patters

Prompts play a pivotal role in the functionality of generative AI, acting as the fundamental channel of communication between the user and the AI. They are designed to direct the AI’s generation of specific outputs or execution of tasks. The complexity of prompts can vary greatly, often comprising multiple elements that must be coherently integrated, which is where prompt template patterns come into play. These templates ensure clarity and consistency in prompts, reflecting their importance in the AI’s performance. This is the first of three Prompting Template adapted from the insights of Yi Zhou (2023). 


TOCD Prompt Template Patterns

This template is simple and efficient yielding clear results.  This Pattern consists of 4 main elements. Each of these elements possess a variety of attributes. These are discussed below.  

This states the general goal of the prompts. In addition to defining what is to be accomplished, the task also provides guidance around the perspective of who is to be completing the task. This involves three things.

Role – Define the persona you want the AI to take. For example, “Dietician,” “Tommy Douglas,” or “expert in the works of Shakespeare.” Each of these roles will change the information generate from the prompt according to the persona.

Behavioural Signals – Highlight the key traits you want for the persona. For example, “Professional,” “Young,” “Well-Traveled,” “Best Selling,” etc. Each of the traits you specify will change the information generated by your prompt.

Task – State the goal of the prompt. for example, “List,” “Describe,” “Summarize,” or “Create”.

Provides additional layers to help your generated information reflect your intentions. You can define context around things like intended audience, specific goals for the task and perspectives. These can be thought of an additional specificities or constraints to add to the prompt. this could include things like “For 35 first year university students,” “To motivate a change in behaviour” or “With a limited budget.

The output describes how you want the information generated to be presented. This can include things like “Format,” “Structure,”” Qualities,”, “Content” and any “Do’s” or “Don’ts” you have identified. It is up to you how many of these you use. If you want your generated information to be broad or general, define fewer of these output criteria. If you want your generated information to be very specific, define all of these and more.

This provides contextual cues that help to boost AI accuracy by identifying information to draw on or compare to. This may include things like “Past records,” “Benchmarks,” or “Identified related examples.”


Template Framework

The Components as described are: 
◉ Role 
◉ Behavioral Signals
◉ Task 
◉ Structure 
◉ Specifications/Constraints 
◉ Data 
These can be combined into a prompt as indicated below.  
“Act as a [Role] with [behaviour] performs [task] ensures [structure]. Remember [Specifications/Constraints] and [Data].” 


Template in Action

Example  

Act as a Psychology Instructor [Role] who is an expert in the works of Carl Jung [Behavioural Signals]Create a quiz for students on Jungian Archetypes [Task]. This quiz should be 5 multiple choice questions [Structure]. Each question should have 4 answers, one correct and three distractors [Specifications/Constraints].  The questions should only explore the information contained in the 1964 book, Man and his Symbols [Data]

Ethical Use of Generative AI