Skip to Main Content

Generative AI Literacy

What is the best way to write GenAI prompts?

Crafting effective prompts is key to getting accurate and useful responses from Generative AI. This page offers strategies for writing clear, targeted prompts that help AI tools better understand your questions or requests. You'll also find tips on refining prompts and examples to improve the quality of AI-generated content.

Components of an Effective Prompt

Writing effective prompts can feel overwhelming at first with tons of guidelines and techniques that seem specific to different contexts and tools. Though there is no magical one-size-fits-all formula, certain fundamental components can be applied and adapted to most use cases.

Prompt Design Framework

Use the acronym PROMPT below to help you remember how to structure more effective generative AI prompts.

Persona

Assign a role.

Example: “You are a [literary critic / compliance officer / patent attorney / etc.].”

Requirements

Define the parameters for output.

Examples: Topical content to include / exclude, number of responses, word count / limit, reading level, standards compliance, etc.

Organization

Describe the structure of the output.

Examples: Alphabetical, chronological, table, bulleted or numbered list, step-by-step instructions, etc.

Medium

Describe the format of the output.

Examples: Prose, social media post, computer code, spreadsheet, website, slide deck, A/V, recipe, dialogue script, survey, interview, etc.

Purpose

Identify the rhetorical purpose and intended audience.

Examples: Explain, summarize, pitch, entertain,.. College students, English language learners, investor, first date, etc.

Tone

Specify the tone of the output.

Examples: Academic, professional, snarky, funny, inspirational, sentimental, foreboding, etc.

Source: Prompt Design Framework by Sarah Hartman-Caverly, CC BY-NC-SA 4.0. / Image adapted from visuals in the Prompt Design Framework worksheet.

Prompting Tips

Tips for creating text prompts for text output

Here are some tips to keep in mind when crafting effective prompts that LLMs can handle well for text-based tasks:

  • Use simple and natural language: Use straightforward language and a conversational tone.
  • Be clear and specific: Provide a clear, descriptive, and specific task or request you need the AI tool to complete.
  • Context matters: Relevant contextual information can help the AI tool understand the task fully.
  • Add examples, rules, or constraints as needed: Provide some examples of what you expect, or rules or constraints for the AI tool to follow, which can lead to better results.
  • Include outcome indicators: Provide specific instructions or expectations in your prompts to guide the LLM in generating focused and relevant content. This helps ensure the response aligns with your needs and produces more effective results.
  • Test and refine: Try with different words and structures, and refine them based on the results you get.
  • Always verify: AI tools like ChatGPT can sometimes provide incorrect or made-up information. So it is essential to verify or fact-check the responses.

For example, the prompt:

Write about Renaissance gardens.


Can be rewritten as:

Help me outline a presentation on Renaissance gardens by outlining the key features and cultural significance, with a focus on symmetry and symbolism.

 

This provides a clear structure and purpose for the response.

General Tips for Creating Images from Text Prompts:

  • Experiment with different words to see how they impact the images generated.
  • Cite or Acknowledge the use of AI when you use an AI-generated image in your own work.
  • Avoid Copyrighted References When creating AI prompts, avoid referencing copyrighted artistic works (such as "in the style of Studio Ghibli") in your descriptions. This practice helps ensure ethical use of AI tools by respecting the intellectual property rights of creators.

Keep it Simple
Prompts can be written in natural language. However, you may want to use phrases and keywords separated by commas to keep things simple. 

For example, the prompt: 

a minimalistic illustration of a college student wearing a blue backpack and waiting on a subway platform in a 1:1 aspect ratio


Can be rewritten as: 

minimalistic illustration, college student, with a blue backpack, waiting on a subway platform, 1:1 aspect ratio

 

Be Specific

Try to be specific in your description.Note that concrete language (e.g., a cloudy day) produces more predictable results while abstract language (e.g., a moody day) generates more varied results.

For example, instead of stating: 

"a landscape painting,"


You could try: 

"forest painting"

or

"waterfall painting"

 

Keep Prompts Short
Using between 3 to 5 descriptive elements is recommended if you are new to using AI image generators.

Remember Limitations
Understand the parameters of each AI tool.

For example, in Midjourney, you need to enter /imagine before your prompt. Also, --no handles negative prompts in Midjourney (e.g., --no trees excludes trees in images generated).

Attribution

Except where otherwise noted, this content is adapted from Prompt Engineering/Creation by The Learning Portal, a derivative of ""Using Generative Artificial Intelligence for Research" by Sheridan Library & Learning Services, CC BY-NC 4.0.