prod_review = """ Got this panda plush toy for my daughter's birthday, \ who loves it and takes it everywhere. It's soft and \ super cute, and its face has a friendly look. It's \ a bit small for what I paid though. I think there \ might be other options that are bigger for the \ same price. It arrived a day earlier than expected, \ so I got to play with it myself before I gave it \ to her. """
prompt = f""" Your task is to generate a short summary of a product \ review from an ecommerce site. Summarize the review below, delimited by triple backticks, in at most 30 words. Review: ```{prod_review}``` """
response = get_completion(prompt) print(response)
回答:
1 2
Soft and cute panda plush toy loved by daughter, but a bit small for the price. Arrived early.
如果总结的时候,我们更关注快递方面的信息呢?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
prompt = f""" Your task is to generate a short summary of a product \ review from an ecommerce site to give feedback to the \ Shipping deparmtment. Summarize the review below, delimited by triple backticks, in at most 30 words, and focusing on any aspects \ that mention shipping and delivery of the product. Review: ```{prod_review}``` """
response = get_completion(prompt) print(response)
回答:
1
The panda plush toy arrived a day earlier than expected, but the customer felt it was a bit small for the price paid.
很明显,这里特地提到了The panda plush toy比期望的时间早一天到达。
如果总结的时候,我们更关注价格方面的信息呢?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
prompt = f""" Your task is to generate a short summary of a product \ review from an ecommerce site to give feedback to the \ pricing deparmtment, responsible for determining the \ price of the product. Summarize the review below, delimited by triple backticks, in at most 30 words, and focusing on any aspects \ that are relevant to the price and perceived value. Review: ```{prod_review}``` """
response = get_completion(prompt) print(response)
回答:
1
The panda plush toy is soft, cute, and loved by the recipient, but the price may be too high for its size.
总结文字中提到了The panda plush toy不值这个价,因为尺寸对不起这么高的价格。
另外我们也可以从文本中抽取需要的关键信息。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
prompt = f""" Your task is to extract relevant information from \ a product review from an ecommerce site to give \ feedback to the Shipping department. From the review below, delimited by triple quotes \ extract the information relevant to shipping and \ delivery. Limit to 30 words. Review: ```{prod_review}``` """