Master the Perfect ChatGPT Prompt Formula (in just 8 minutes)!
Jeff Su
3,879,180 views • 3 years ago Save 3 min 5 min read
Video Summary
Unlock the secrets to crafting perfect prompts for AI chatbots like ChatGPT and Google Bard with a six-component formula designed to yield consistently high-quality results. The speaker, a tech professional, reveals the hierarchy of prompt elements: task, context, exemplars, persona, format, and tone, emphasizing that while a task is mandatory, not all components are needed for every request.
Discover how to define clear actions with verbs, provide just enough context by asking key questions about user background, success metrics, and environment, and leverage examples to guide AI output. The formula also includes assigning a persona, specifying the desired format, and setting the tone, offering practical examples for each, from workout plans to professional emails, demonstrating how a comprehensive prompt dramatically outperforms a simple one.
Short Highlights
- The six essential building blocks for effective AI prompts are Task, Context, Exemplars, Persona, Format, and Tone.
- A clear 'task' is mandatory for any prompt, starting with an action verb.
- 'Context' is crucial and should answer: user's background, definition of success, and environment.
- 'Exemplars' (examples) significantly improve output quality.
- 'Persona' defines the AI's role, like a physical therapist or recruiter.
- 'Format' dictates the output structure (e.g., tables, emails, markdown).
- 'Tone' sets the emotional style (e.g., casual, formal, witty).
Key Details
The Six Building Blocks of a Prompt [00:43]
- Prompts are built on six key components: Task, Context, Exemplars, Persona, Format, and Tone.
- These components have an order of importance, with Task being the most critical and Tone the least.
- A simple prompt like 'I'm a 70kg male give me a 3-month training program' demonstrates the hierarchy.
"the reason why the task is higher up in the formula hierarchy is if we just input the task without the context there's still some sort of meaningful output"
Defining the Task [01:41]
- The 'task' component should always begin with an action verb like 'generate,' 'write,' or 'analyze.'
- Clearly articulate the desired end goal, whether it's a single action or a multi-step process.
- An example of a complex task is 'analyzing hundreds of user feedback sharing the top three takeaways and categorizing the feedback based on the team responsible.'
"The rule of thumb is to always start the task sentence with an action verb generate give write analyze Etc and clearly articulate what your end goal is"
Providing Effective Context [02:09]
- To refine context, ask three key questions: What is the user's background? What does success look like? What environment are they in?
- Adding context to the workout example, such as 'looking to put on 5 kg of muscle mass over the next 3 months. I only have time to go to the gym twice a week and for 1 hour each session,' provides necessary constraints.
- The goal is to provide just enough information to narrow down possibilities without overwhelming the AI.
"it's important to include relevant context and exemplars and it's nice to have Persona format and tone"
Leveraging Exemplars [03:05]
- Exemplars, or examples, drastically improve the quality of AI-generated output.
- Examples can range from simple rewrites of resume bullet points using a specific structure to more complex frameworks like the STAR method for interview prep.
- Referencing an existing job description when asking for a new one can ensure similar formatting and professional language.
"all the research on large language models llms have shown that including examples within the prompt drastically improves the quality of the output"
Assigning Persona and Format [04:29]
- The 'Persona' component involves defining who you want the AI to act as, such as a physical therapist or a senior product marketing manager.
- Naming famous individuals can also work if they are widely recognized.
- 'Format' specifies the desired output structure, like tables, emails, or markdown, helping to visualize the end result.
"the Persona component is basically who you want chat PT and bar to be and the pro tip here is to think of someone you wish you had instant access to with the task you're facing"
Setting the Tone and a Comprehensive Example [06:21]
- 'Tone' dictates the emotional style of the output, such as casual, formal, witty, or enthusiastic.
- A pro tip for tone is to describe the feeling you want to convey, like 'taken seriously without coming off as too stuck up.'
- A comprehensive prompt example combines all six components to generate a detailed email from a senior product marketing manager to their boss about a successful product launch.
"Tone is easy to understand use a casual or formal tone of voice give me a witty output show enthusiasm sound pessimistic"
Comparing Prompt Effectiveness [08:00]
- A simple prompt yields a generic output, while a comprehensive prompt using the six-component formula produces a much more usable and specific result.
- The speaker contrasts a basic prompt for an email update with a detailed one, highlighting the significant difference in output quality.
"there's a pretty big difference in terms of how generic and usable the end result is"