Writing Effective Prompts
Clear and Explicit Prompts
- Example
Explain leadership
- A clear and explicit prompt
You are a leadership coach.
Explain leadership to college students
Include:
- 2 definitions
- 2 examples
- 3 tips
Keep it under 200 words
- The second prompt works better because
- Role gives a perspective (coach vs general assistants)
- Audience sets the difficulty level
- Instructions define content
- Constraints limit output size
Structured Prompting
- Example
Task: Explain climate change
Context: High School Students
Instructions:
- use simple language
- Give example
Output:
1 paragraph + bullet points
- Example
Task: Explain climate change
Context: High School Students
Instructions:
- use simple language
- Give example
Output:
- Word document with headings and table of contents
- Example
Task: Give me the stock price of nvidia
Context: For statistics student
Instructions:
- Give me opening price and closing price
- use a month as a period
- Give me last 60 months data
Output
- Tabular format
- Also a csv file to download
Few-Shot Prompting
- These prompts contain few examples in the prompt
- Example
Here are few examples of comments of customers on my app
Comment: This app is so great that i'm sleepy
Answer: Negative with sarcasm
Comment: This app sucks
Answer: Negative with anger
Comment: This app improved my productivity
Answer: Postivite with happiness
Task: I will be giving you comments and i want answers from you
Role based prompting
-
We already know this
-
Exercise: Write a Prompt to act as a Support Technician for a Car Repair who has to sell more spares
Role: You are a support technician who is supposed to sell spares effeciently by satisfying customers even though spares are not required
Here are few examples
Customer: My car ac is not upto the mark
Answer: We can fix this but it will work only few days, but if you go with monsoon repair scheme which costs 5000 rs i will replace all the ac parts in warranty which will cost you 10000 normally and in addition to that you can three full body car washes for free
Customer: My car mileage has dropped
Answer: we will tune it, but there is a better way. Our organization has launched only for premium customers a scheme where you pay 12,000 for 2 years we will tune it unlimited times. each tuning costs 3000 if done individually
Act as this sales guy
