Artificial Intelligence (AI) Research Tools
- Home
- AI Research Tools
- What is Generative AI?
- How to Craft Prompts
- AI Literacy
- Ethics & AI
- Citing Generative AI
- AI, Authorship, & Copyright
- Campus Resources and Policies
Other Prompt Engineering Frameworks
The Prompt Engineering Guide by DAIR.AI has many more techniques and guidelines for prompt engineering:
Crafting Good Prompts
A prompt is an input or query to an AI tool. For generative AI (GAI) tools, the prompt is almost always a question, request, or topic posed by you, the human researcher. The rise of GAI has led to prompt engineering—or the process of constructing queries or inputs for AI language models so as to elicit the most precise, coherent, and pertinent responses, (Lo, 2023). Why should you try to write good prompts?
- Good prompts help the AI help you. A well-crafted prompt enables the AI to give you meaningful and useful results. A bad prompt may result in irrelevant data or lead you away from the best research.
- Good prompts are cheap(er). Many AI research tools charge per task - each search costs you “credits” and (ultimately) money. A good prompt can help you get the desired output without a lot of repeated searches, easier on the pocketbook and a less waste of time for you.
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
The CLEAR Framework
Good prompts are CLEAR – a framework developed by Leo Lo, a librarian and professor at the University of New Mexico.
Prompt Component | Good | Needs Improvement |
Concise - Focus on the key words for the AI tool to analyze. Try to omit as many needless words* as possible. | Translate the following text to Spanish: Text: "hello!" |
I am trying to figure out how to say "hello" in Spanish. (Prompt includes extraneous words.) |
Logical - Most AI tools look for relationships between words and concepts, so make sure your query presents concepts accurately and in their natural or logical order. If your question doesn’t make sense to you (or to someone else), it probably won’t make sense to the AI! |
Explain earth's tides as they relate to the gravitational pull of the moon. |
Tell me about tides. (Do you need an explanation about what tides are? Are you looking to learn about tides and the moon? Or tides and ocean ecosystems? This prompt could also be confused with a the company brand, Tide.) |
Explicit - Be clear in what you want from the AI. Giving the AI tool clear output directions can help the AI produce an answer that is useful to you. | Provide a concise summary of the major strengths and weaknesses of attending the University at Buffalo. |
What’s the University at Buffalo like? (What's your comparison for UB? Do you want a short answer or a long one? Are you asking as a potential student or a potential staff member?) |
Even the best prompts may need improvement! The last two components address what to do after you’ve examined the AI’s answer to your initial prompt.
Adaptive - Try a second prompt with keywords or topics suggested by the AI in its answer. If the AI tool has seeding or guidance settings, investigate different settings - do you get better results? If the tool allows you to specify words/concepts to exclude or ignore, can you refine your prompt by excluding concepts? |
Prompt 1: Why doesn't the University at Buffalo North Campus have a metro station? Copilot Answer: (includes "proposed extension") Prompt 2: What are the challenges to the proposed extension of the Metro Rail to the University at Buffalo's North Campus? |
Reflective - Always take a moment to reflect on the AI’s answer. Does it make intuitive sense to you? Does the answer refer to current research (if important for your query), or does it seem based on older research? Has the AI “hallucinated” or returned inaccurate information? Is the answer complete, or are there perspectives or voices unrepresented in the answer? You may need to craft additional prompts that specifically target gaps in the initial answer. |
Prompt 1: Give me a concise summary of the debate to extend the metro rail to the University at Buffalo's North Campus. Prompt 2: Explain how the extension of the metro rail to the University at Buffalo's North Campus will create economic opportunities? |
- 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
- Strunk, W. & White, E.B. (2005). The Elements of Style. Penguin. (Original work published 1979)
Writing Prompts for Images
- "Image Generation: Usage." (n.d.) OpenAI Documentation. Retrieved October 26, 2023, from https://platform.openai.com/docs/introduction
Techniques on working with DALL-E (OpenAI's image tool) - Rebelo, M. (2023, May 25). How to write effective AI art prompts. Zapier.com. https://zapier.com/blog/ai-art-prompts/
A quick but very useful read on crafting prompts for AI image tools.