现在我们开始案例演示,我们要要为客户的评论写一个自定义的电子邮件回复,所以先给定一个客户评论和情绪,我们将生成一个自定义的回复。我们给的指令是:你是一个客户服务的 AI 助理,你的任务是给一个有价值的客户发送电子邮件回复,如果情绪是积极或者中性的那么就感谢用户的评论,如果情绪是消极的,那么就道歉,并建议用户联系客户服务部。并以 AI 客户代理的身份在邮件中签名。(Isa Fulford说告知用户这是 AI 生成的,并让用户知道保持透明是很重要的😄),我们先将temperature设置为 1.0。
# and the original customer message, customize the email sentiment = "negative" # review for a blender review = f""" So,they still had the 17 piece system on seasonal\ sale for around $49 in the month of November,about\ half off, but for some reason (call it price gouging) around the second week of December the prices all went up to about anywhere from between $70-$89 for the same system. And the 11 piece system went up around $10 or so in price also from the earlier sale price of $29.\ So it looks okay,but if you look at the base, the part \ where the blade locks into place doesn't look as good \ as in previous editions from a few years ago, but I\ plan to be very gentle with it (example,I crush\ very hard items 1ike beans,ice,rice,etc.in the\ blender first then pulverize them in the serving size \ I want in the blender then switch to the whipping \ blade for a finer flour, and use the cross cutting blade \ first when making smoothies, then use the flat blade \ if I need them finer/less pulpy). Special tip when making smoothies, finely cut and freeze the fruits and\ vegetables (if using spinach-lightly stew soften the \ spinach then freeze until ready for use-and if making \ sorbet,use a small to medium sized food processor)\ that you plan to use that way you can avoid adding so! much ice if atfall-when making your smoothie.\ After about a Year, the motor was making a funny noise.\ I called customer service but the warranty expired \ already,so I had to buy another one. FYI: The overal1\ quality has gone done in these types of products,so\ they are kind of counting on brand recognition and\ consumer loyalty to maintain sales. Got it in about\ two days. """
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 cut to customer service. Make sure to usefspecitic details trom the review. write in a concise and professional tone. Sign the email as ~AI customer agent. Customer review:```{review}``` Review sentiment: {sentiment} """
来看看模型的输出:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
**Subject:** Thank You for Your Feedback
Dear Valued Customer,
Thank you for taking the time to share your detailed review. We sincerely apologize for the concerns you’ve raised regarding the price changes, product quality, and warranty experience. Your feedback is important to us, and we regret that your experience did not meet your expectations.
We understand your frustration with the pricing adjustments and the durability of the product. Please know that we strive to offer fair pricing and high-quality items, and we’re sorry this wasn’t reflected in your case.
If you’d like to discuss this further, our customer service team would be happy to assist you. You can reach them at [customer service email/phone].
Thank you again for your honest feedback—it helps us improve.
然后我还是使用上面使用 AI 给用户的评论回复电子邮件的案例来实验,我将temperature 设置为 0,然后多次发送了请求,得到的答案都是:
1 2 3 4 5 6 7 8 9 10 11 12
**Subject:** Thank You for Your Feedback
Dear Valued Customer,
Thank you for taking the time to share your detailed review. We sincerely apologize for the frustrations you’ve experienced, including the price changes and concerns about the product’s quality and durability. Your feedback is important to us, and we regret that your experience did not meet expectations.
We’re sorry to hear about the issue with the motor and the expired warranty. If you’d like further assistance, please don’t hesitate to reach out to our customer service team—we’d be happy to help however we can.
We appreciate your honest inputand will share it with our team to drive improvements. Thank you for your loyalty, and we hope to have the opportunity to serve you better in the future.