Skip to Main Content

Prompt Engineering for GenAI: Prompt frame works

The ability to design meaningful prompts for GenAI tools is one of the core competencies required to successfully use them, and this LibGuide is designed to introduce to the basics of prompt design.

Introduction

There are many frameworks that can help with creating and structuring effective prompts. Some of them are mentioned below. You can "play" with several of them, and see which one works best for you. 

CLEAR frame work

The CLEAR Framework

The CLEAR framework is a framework to optimize prompts given to generative AI tools. To follow the CLEAR framework, prompts must be: 

  1. Concise: "brevity and clarity in prompts": This means to remain specific in your prompt. 
  2. Logical: "structured and coherent prompts": Maintain a logical flow and order of ideas within your prompt.
  3. Explicit: "clear output specifications": Provide the AI tool with precise instructions on your desired output format, content, or scope to receive a stronger answer. 
  4. Adaptive: "flexibility and customization in prompts": Experiment with various prompt formulations and phrasing to attempt different ways of framing an issue to see new answers from the generative AI 
  5. Reflective: "continuous evaluation and improvement of prompts": Adjust and improve your approach and prompt to the AI tool by evaluating the performance of the AI based on your own assessments of the answers it gives. 

This information comes from the following article. It is highly encouraged to read through this article if you would like to improve your prompt writing. 

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

Creating succesful prompts

Creating Successful Prompts

Instruction: Including explicit instructions for the desired behavior, such as: ask the model to think step by step, to rephrase an idea, to summarize an idea, to synthesize two or more ideas. If you are able to, include context as well. 

  • User Example: I am preparing an undergraduate level paper on biofuels vs fossil fuels for my electrical engineering class. Develop a list of key arguments on the positives of biofuels and the positives of fossil fuels with citations. 

Context: Providing context to the generative AI will help it understand it's task. Explaining your role, the AI's role, the expected outcomes, or why you are asking for this completed task will help with a better outcome. For example: 

  • User Example: I am an undergraduate student preparing a presentation on biofuels to my energy & engineering class. Please provide me a step by step guide in getting started. 

Instruction and context work well when used together. Prompting generative AI to give you the best output takes trial and error, so reword your prompt a few ways to see what generates the best response. 

Explain & Check: Explain your topic or query and check the generative AI understands. 

  • User Example:  “Do not start writing yet,” and “Do you understand?” 

Clarifying Questions: Have the generative AI ask questions to clarify what output you want. 

  • User Example: “Please ask me all the questions you need to understand my prompt”. 

Tone and Direction: Guide the generative AI for their output to be in a particular direction, style, tone or format.

  • User Example: "Write a 250 word summary in an academic tone about the connection between biodiesel and crop waste." 
  • User Example: "Take the key points from the previous answer and write a response in a professional tone." 
  • User Example: "Synthesize this article and break the arguments down to a grade 12 level" 

Provide Examples: Provide an example that you have already created or have found, such as: demonstrations of the output needed, a set of keywords, or a reference text.  

  • User Example: Find me more articles published between 2005-2020 like this: Demirbas, A. (2008). Biofuels sources, biofuel policy, biofuel economy and global biofuel projections. Energy Conversion and Management49(8), 2106–2116. https://doi.org/10.1016/j.enconman.2008.02.020. 

Act as Expert: Have the generative AI teach you about the topic you are interested in. 

  • User Example: “I am going to conduct a narrative review on Mitral Valve Repair vs. Replacement. I want you to act as an expert. I will ask you some questions and you will advise me on how to approach each step.” 
  • User Example: “Guide me through the concept of “(topic)” in (subject) through an example”. 

Other tips: 

  • Divide a large topic or question into smaller questions and ask the generative AI step by step. 
  • Create "New Chats" for each unrelated question and topic so the generative AI can start fresh. You can also ask the generative AI to ignore the previous information you have given it.  
  • ChatGPT is not currently connected to the internet. If looking for the most up to date answers, use the Bing Chat function. 
  • Use preloaded prompts from plugins and extensions downloaded to your internet browser. 
  • Copy and paste your research question into the generative AI to receive feedback, ask for step-by-step instructions on the research process, or to provide counterarguments to your premise. (Thompson Rivers University Library, 2024)

RTF framework

RTF (Request-Task-Format) Framework:

This framework simplifies AI interactions by breaking down prompts into three components: Request, Task, and Format. It ensures clarity and precision in communication, making it easier for the AI to understand and execute tasks.

For example, “Request: Generate a report, Task: Analyze sales data, Format: PDF.”

PROMPT framework

PROMPT Framework:

This framework focuses on Clarity, Precision, Efficiency, Personalization, and Structure. It aims to minimize misinterpretation, optimize response generation, and tailor outputs to specific contexts.

For example, “Clarity: Describe the destinations amenities, Precision: Include only key features, Efficiency: Keep it concise.”

SMART framework

SMART Framework:

The SMART framework stands for Specific, Measurable, Achievable, Relevant, and Time-bound. It helps create well-defined and actionable prompts by setting clear goals and criteria.

For example, “Specific: Increase guest satisfaction, Measurable: Achieve a 10% improvement, Achievable: Implement new training programs, Relevant: Focus on customer service, Time-bound: Within six months."

TREE framework

TREE Framework:

The TREE framework stands for Task, Reasoning, Examples, and Explanation. It guides the AI to perform tasks by providing reasoning, examples, and explanations.

For example, “Task: Recommend a restaurant, Reasoning: Based on guest preferences, Examples: Previous recommendations, Explanation: Why this restaurant is suitable.”

PEAR framework

PEAR Framework:

The PEAR framework stands for Purpose, Expectations, Actions, and Results. It helps structure prompts by defining the purpose, setting expectations, outlining actions, and specifying desired results.

For example, “Purpose: Improve room service, Expectations: Faster response times, Actions: Implement new procedures, Results: Higher guest satisfaction.”