Skip to Main Content
Stony Brook University

Guide to Generative AI

A guide to tools, resources, and issues regarding ChatGPT and other generative AI technologies in academics and research.

What is Prompt Engineering?

In order to generate results from an AI tool like ChatGPT, Claude, or Gemini, you need to give it a text prompt telling it what you want it to generate. The way you write the prompt and the level of directions you include will effect the quality and relevance of what the AI generates. The skill of writing a prompt to fit the appropriate use is called prompt engineering.

Here are some basic principles to keep in mind, followed by some sample frameworks that have been developed.

  • Tell the AI what format you want the results to be: "create an outline using bullet points"; "write an abstract of 200-300 words"; "create a table comparing..."
  • Give the AI a role: "you are an expert in human resource management"; "you are a motivational speaker..."
  • Provide examples: see the "Few Shot" framework below.
  • If you don't like the results of your first prompt, ask again by rephrasing or expanding on what you want.

Frameworks

A number of frameworks have been developed to help guide you in formulating prompts. Some representative models are listed below. 

CLEAR

  • CONCISE: brevity and clarity in prompts.
  • LOGICAL: structured and coherent.
  • EXPLICIT: clear output specifications.
  • ADAPTIVE: flexibility and customization after the initial prompt.
  • REFLECTIVE: continuous evaluation and improvement

 

Source: Lo, Leo, S. (2023). The CLEAR path: A Framework for Enhancing Information Literacy through Prompt EngineeringThe Journal of Academic Librarianship49(4).

 

CRISPE

  • CAPACITY and ROLE: who you want the LLM to be .
    "You are an expert in interior design..."
  • INSIGHT: additional contextual information.
    "...working with a a local bakery specializing in gluten-free cakes for pets."
  • STATEMENT: the task you need performed 
    "Write a script for a 30-second video that will entice first-time pet owners to purchase the cakes."
  • PERSONALITY: the tone/style of the output
    "Use a lowkey humorous approach incorporating dad jokes."
  • EXPERIMENT: request multiple examples
    "Provide five variations of the script."

Nigh, Matt. 20203. ChatGPT3-Free-Prompt-List: A Free Guide for Learning to Create ChatGPT3 Prompts. GitHub. https://github.com/mattnigh/ChatGPT-Free-Prompt-List

FEW SHOT

Providing a few examples of what you want within the prompt. 
"Convert the following adjectives into adverbs:

Adjective: Quick
Adverb: Quickly

Adjective: Easy
Adverb: Easily

Adjective: Happy
Adverb: Happily

Adjective: uncomfortable 

Adjective: stubborn

ZERO SHOT

Giving the AI tool a simple, direct command on what to do. No additional context or instruction. ("Give me three synonyms for the word squishy.").