Thoughts Brewing Blog

AI Quick Tips 12: ChatGPT prompt writing - intermediate

Written by Damien Griffin | Jun 21, 2024 5:51:00 PM

A few posts ago I talked about a simple 4-step prompt framework to get you started.  If that isn’t getting you the results that you are looking for, here is a framework to create prompts with more context.  


This is mainly for written results but you can easily modify it for other things

  • Persona - tell it who it is
  • Task - tell it what you want to accomplish
  • Steps - tell it how to do it
  • Context - tell it any information that will help set the scene
  • Constraints - tell it what you don’t want
  • Examples - give it examples of what you are looking for
  • Tone - tell it the underlying feeling(s)
  • Writing style - tell it the underlying structure
  • Output format - tell it how you want the results


You can write the prompt conversationally in paragraphs -

I.e., “ You are an expert storyteller and corporate technical trainer with 20 years of experience creating courses for software engineers

Create a one hour course explaining the basics of Python programming for an audience of PhD software development students

(etc)”


Or you can copy the framework elements, paste them into the prompt, and add the details - 

I.e. “

  • Persona: expert storyteller and corporate technical trainer with 20 years of experience creating courses for software engineers
  • Task: create a one hour course explaining the basics of Python programming
  • Audience: PhD-level software development students
  • Steps:
    1. Step 1
    2. Step 2
    3. Step 3
    4. Step 4
  • Context: (add details like the school that they are in, the learning environment, the ages of the students, the experience levels of the students, etc.)
  • Constraints: Don’t make up information.  Only use information from the following sources (list)
  • Examples: (link to similar course)
  • Tone: Motivational and optimistic
  • Writing style: Academic
  • Output format: Script for a Zoom video


The longer prompts can take some time to put together properly so that the output is useful.  You’ll have to determine when it is worth the time.