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.

  • Clearly articulate the goal (e.g., "list the key ideas" or "develop a lesson plan")
  • Add the role that the AI should play (e.g. Act as an expert)
  • Establish mandatory specifications for the output, such as format, length, required information or unwanted topics.
AudienceWho are you writing for or talking to? (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). AI can also take on a specific persona or type of genre (e.g., in the style of Shakespeare or a rap lyricist).
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
  • 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.
  • Before submitting, as the AI "do you have any questions for me before you begin?”
RefineAdjust 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.

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 to explain to an undergraduate class.

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 300-word description, 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 description is for an instructor to explain and provide a summary to undergraduate students in a survey course on Western Civilization.
ToneMaintain an academic, balanced, and non-judgmental tone.

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