Skip to Main Content

Artificial Intelligence (AI)

What is Prompt Engineering?

Defined by Gemini, prompt engineering is like giving instructions to a generative AI tool. You write specific prompts or questions to guide the AI to generate the exact response you want. It's like being a director, crafting the perfect script to get the desired outcome from your AI actor.  

Tips

  • "Temperature" is a parameter that impacts how creative or precise Gen AI output is. Some chatbots make it easy to choose the temperature and give you options right up front. For example, Microsoft CoPilot has buttons near the text box for "more creative," "more balanced," and "more precise." If you aren't sure how to control the temperature in the chatbot you are using, just ask it.
  • Iteration is important. Even with a well engineered prompt, you will probably have to ask the chatbot to make refinements. Different chatbots have different limits. You may go back and forth 30 times in one conversation in UT's licensed version of Microsoft CoPilot.
  • It is helpful to feed chatbots examples to get what you need. For example, if you are writing a letter of recommendation for someone for a fellowship, you may want to upload the applicant's letter of inerest and provide a description of the fellowship as part of your prompt. Keep privacy concerns in mind if you choose to do this. 
  • Consider using "in the style of..." as part of your prompt. For example, iyou may ask it to write a poem about your topic in the style of Emily Dickinson or create an image of your topic in the style of Edward Hopper.
  • Remember that Gen AI is designed to be plausible, not credible. Make sure to check the information it provides in reputable sources.

Prompt Engineering Models

There are numerous prompt engineering models available. We have highlighted a few below and a quick web search will find many more.

PROMPT Design Framework by Sarah Hartman-Caverly, Librarian Penn State Berks

  • Persona - assign a role
  • Requirements - define parameters for output 
  • Organization - describe the structure of the output
  • Medium - describe the format of the output
  • Purpose - identify the rhetorical purpse and intended audience
  • Tone - specify the tone of output (ex: academic)

Example using this framework:

  • Original: Outline a paper about self-driving cars in cities with a lot of traffic
  • New: You are a college student majoring in transportation engineering. Produce a numbered, multi-level outline for a 7 page academic paper for a college-level transportation engineering class about the challenges and solutions for introducing self-driving cars into a high traffic city.

CLEAR Framework by Leo S. Lo, Dean of the College of University Libraries and Learning Sciences, University of New Mexico

  • Concise - Is there superfluous language?
  • Logical - Is the prompt structured logically like instructions should be?
  • Explicit - Is the prompt explicit enough about what to produce and in what format?
  • Adaptive - Do I need to adapt/change the prompt to get what I need?
  • Reflective - Is this what I needed? Is the information provided accurate and credible?

Example using this framework:

  • Original: Can you explain photosynthesis and lay it out in steps?
  • New: Provide a one page, step-by-step explanation of photosynthesis at the seventh grade level. 
  • Adaptive - revising the prompt if needed
  • Reflective - check factual information against credible sources

This work, "Artificial Intelligence (AI)," is adapted from "Artificial Intelligence (AI)" by University of Texas, used under CC BY-NC 4.0.
"Artificial Intelligence (AI)" is licensed under CC BY-NC 4.0 by Gateway Technical College Libraries.