huan9huan / prompts

to be a professional prompt engineer
2 stars 0 forks source link

Andrew NG的Prompt Engineering 课程 #35

Open huan9huan opened 1 year ago

huan9huan commented 1 year ago

Objectives

Key result

huan9huan commented 1 year ago

inferring

huan9huan commented 1 year ago

summarizing

huan9huan commented 1 year ago

transforming

huan9huan commented 1 year ago

Expanding

prompt = f"""
You are a customer service AI assistant.
Your task is to send an email reply to a valued customer.
Given the customer email delimited by ```, \
Generate a reply to thank the customer for their review.
If the sentiment is positive or neutral, thank them for \
their review.
If the sentiment is negative, apologize and suggest that \
they can reach out to customer service. 
Make sure to use specific details from the review.
Write in a concise and professional tone.
Sign the email as `AI customer agent`.
Customer review: ```{review}```
Review sentiment: {sentiment}
"""
response = get_completion(prompt, temperature=0.7)
print(response)
huan9huan commented 1 year ago

ChatBot