Image
Diagram of PATRR

 

The PATRR Prompt Engineering Framework is designed to help users create high-quality, reliable, and compliant prompts for generative AI. It ensures you move beyond vague questions to crafting instructions that deliver relevant, high-performance results.

 

 

 

Each letter in PATRR represents a key element you must define in your prompt:

ElementDescription
Purpose

Be specific about the information or product you want.

  • Add the role the AI should play (e.g. expert)
  • Clearly articulate the goal (e.g., "list the key ideas" or "develop a lesson plan")
  • If needed, establish mandatory specifications for the output, such as format, length, required information or unwanted topics.
  • Provide additional context as needed, such as text information that you would like it to draw from or consider and examples of what you want the output to look like.
AudienceWho are you writing for or talking to? Who is going to see the output from the generative AI? (This determines depth, detail, and language.)
ToneThis relates to the attitude, mood, or style you want to express (e.g., serious and formal, or friendly and persuasive).
Reflect

After receiving the result, pause and evaluate if the AI successfully met the goal. Check what worked, what missed the mark, and if the original prompt could have been clearer.

  • Check to see if the output adhered to technical and format specifications
  • Check that the output did not include topics that were specified as unwanted
Refine

Adjust your prompt and try again. This involves tweaking the prompt to ask the AI to provide more/less content, clarify a concept, or offer additional examples.

  • If a specification or format requirement was missed, use your refinement prompt to make the constraint absolutely clear.
  • If a content restriction was ignored, reinforce it and add an instruction to correct the error.
  • Don't forget to provide additional context where needed, such as text information that you would like it to draw from or consider and examples of what you want the output to look like.
  • Before submitting, as the AI "do you have any questions for me before you begin?”

View the following video for more information about each element of the PATRR Prompt Engineering Framework.

 

Example Prompt for an Undergraduate History Class

Goal: To create a comparison of the political philosophies behind the American and French Revolutions.

Purpose (goal, specification and restriction):Act as an expert historian specializing in the Age of Revolutions. Analyze and compare the core political philosophies (e.g., Enlightenment influence, views on rights, role of the state) of the American Revolution (1776) and the French Revolution (1789-1794).
The output must be structured as a 500-word essay, divided into exactly three body paragraphs.
Do not discuss economic causes, military campaigns, or social class structures; restrict the analysis strictly to political philosophy.

 
AudienceThe analysis is for an undergraduate survey course on Western Civilization.

 
ToneMaintain an academic, balanced, and non-judgmental tone.

Once the AI provides output, the user can reflect and refine.