Building blocks of prompt
engineering
Components of prompts in order of importance
1. Task *mandatory to have this in your prompt*
2. Context *important*
3. Example *important*
4. Persona *nice to have*
5. Format *nice to have*
6. Tone *nice to have*
use this formula for maximum
prompt efficiency:
à[Persona]
+ [context] + [task] + [Example] + [format] + [Tone]
best practices for each component:
·
Task: always start task with action verb with specific end
goal
·
Context: What is background, What does
success look like, describe environment
·
Examples: provide an explicit example of what the goal may look like.
·
Persona: who you want the assistance to be. Ie) fitness consultant
·
Format: how
do you want to see your response.
·
Tone: what is the feeling behind the response to sound like
Example Prompt:
·
You are a Project manager for a small construction company and you have just unveiled
a master project plan for a new bridge that is to be constructed. Write an email to your manager announcing the completion of the project plan. The email should
include project background(why the bridge is needed),
business results section(quantifiable business metrics), and end with a section
thanking the engineers and partner contractors for assisting in the project
plan. Use
clear and concise language and write in a confident yet friendly voice. The email should
follow the exact format as the one I shared below:
Dear [Manager Name],
I hope this email finds you well…..
The level of interest and enthusiasm from the county has surpassed our initial
expectations, …
I would like to extend my apprecation to the engineering teams at
our company and our contracting partners.
Best Regards,
[My name]
[Title]
[Contact information]