Artificial Intelligence
Prompts in AI
Prompts are the instructions used to ask a large language model to perform a task and create an output. The more specific instructions you can give the generative AI, the better output you're going to get. Prompting generative AI each step of the way guides it to ensure consistency and keeps the AI on topic.
Whether you're asking a question or providing additional context, you are prompting the language model to perform a task for you. A prompt consists of a few words, a single sentence or paragraphs. Successful prompt crafting influences the quality and relevance of the generated output and the user's satisfaction in the answer. Providing as much instruction and context as you can to a large language model, like ChatGPT, will bring back a more helpful output to the task you've asked.
Some common tasks we ask large language models to perform for us are:
- text generation
- image generation
- questions & answer
- problem-solving
- writing code
- data analyzation
- text summarization & synthesizing
- writing posts, essays, & articles
- language translation
The CLEAR Framework
The CLEAR framework, created by Librarian Leo S. Lo at the University of New Mexico, is a framework to optimize prompts given to generative AI tools. To follow the CLEAR framework, prompts must be:
Concise: "brevity and clarity in prompts"
- This means to remain specific in your prompt.
Logical: "structured and coherent prompts"
- Maintain a logical flow and order of ideas within your prompt.
Explicit: "clear output specifications"
- Provide the AI tool with precise instructions on your desired output format, content, or scope to receive a stronger answer.
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
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
University of Calgary Access Permalink here
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 Management, 49(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.
Common Prompts for GPT based AI
Words to Include for Performing Specific Tasks:
- write/ explain/ summarize/ compose...
- provide/ analyze/compare & contrast....
- Rephrase/ Rewrite/ Reword...
- Expand on the following...
- Create....
To Ask Specific Questions:
- Who/ What/ When/ Where/ Why/ Whose/ Which....
- How did...
- How to...
To Include Specific Contexts:
- Write...in an academic tone in 500 words.
- Explain how to...in a professional setting.
AI Prompt Articles for further reading
- The 5 ChatGPT prompts including exact wording I use to save up to 8 hours a week of workAn article from the Insider looking at five prompts (hacks) to use within ChatGPT.
- 125+ Best ChatGPT Prompts for All Kinds of Workflow125 prompts for ChatGPT tasks and outputs.
- GitHub Awesome ChatGPT PromptsIn this repository, you will find a variety of prompts that can be used with ChatGPT
- How to perfect your prompt writing for ChatGPT, Midjourney and other AI generatorsAn article from the Conversation about improving prompts given to generative AI, including image generation.
- How to write effective AI art promptsAI art generators tend to require more attention to detail—and more attempts—before you get what you're looking for. This articles includes structures to follow.
- Prompt engineering for educators – making generative AI work for youA post from the University of Sydney about using prompts in generative AI, like GPT, for higher education.
- Promptpal: Your Prompt SuperpowerPrompts for ChatGPT, Midjourney, Bard, Bing, Notion & DALL-E
- Texas A & M University Approaches to Write or Craft PromptsA university library's page on AI prompts with a focus on ChatGPT.
- Top 13 ChatGPT Prompt Engineering Hacks: Master the Art of Crafting Effective PromptsArticle from the Perrin Collective on prompt engineering, including a prompt cheat sheet.
- The Ultimate List of 101 Clever ChatGPT Prompts that You Haven't Heard Of Yet101 prompts from Creative Boosters with exact wording for creating construct stimulating, engaging conversations with generative AI.
- Last Updated: Jul 25, 2024 7:49 AM
- URL: https://libguides.ucalgary.ca/artificialintelligence
- Print Page