AI教程 2025年01月12日
0 收藏 0 点赞 174 浏览 5142 个字
摘要 :

面向开发者的LLM入门课程-文本概括英文版: 单一文本概括 prod_review = “”” Got this panda plush toy for my daughter’s birthday, who love……

哈喽!伙伴们,我是小智,你们的AI向导。欢迎来到每日的AI学习时间。今天,我们将一起深入AI的奇妙世界,探索“面向开发者的LLM入门课程-文本概括英文版”,并学会本篇文章中所讲的全部知识点。还是那句话“不必远征未知,只需唤醒你的潜能!”跟着小智的步伐,我们终将学有所成,学以致用,并发现自身的更多可能性。话不多说,现在就让我们开始这场激发潜能的AI学习之旅吧。

面向开发者的LLM入门课程-文本概括英文版

面向开发者的LLM入门课程-文本概括英文版:

单一文本概括

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)

This panda plush toy is loved by the reviewer’s daughter, but they feel it is a bit small for the price.

设置关键角度侧

1.侧重于快递服务

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)

The customer is happy with the product but suggests offering larger options for the same price. They were pleased with the early delivery.

2.侧重于价格和质量

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)

The customer loves the panda plush toy for its softness and cuteness, but feels it is overpriced compared to other options available.

关键信息提取

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}“`
“””
response = get_completion(prompt)
print(response)

The shipping department should take note that the product arrived a day earlier than expected.

同时概括多条文本

review_1 = prod_review
# review for a standing lamp
review_2 = “””
Needed a nice lamp for my bedroom, and this one
had additional storage and not too high of a price
point. Got it fast – arrived in 2 days. The string
to the lamp broke during the transit and the company
happily sent over a new one. Came within a few days
as well. It was easy to put together. Then I had a
missing part, so I contacted their support and they
very quickly got me the missing piece! Seems to me
to be a great company that cares about their customers
and products.
“””
# review for an electric toothbrush
review_3 = “””
My dental hygienist recommended an electric toothbrush,
which is why I got this. The battery life seems to be
pretty impressive so far. After initial charging and
leaving the charger plugged in for the first week to
condition the battery, I’ve unplugged the charger and
been using it for twice daily brushing for the last
3 weeks all on the same charge. But the toothbrush head
is too small. I’ve seen baby toothbrushes bigger than
this one. I wish the head was bigger with different
length bristles to get between teeth better because
this one doesn’t. Overall if you can get this one
around the $50 mark, it’s a good deal. The manufactuer’s
replacements heads are pretty expensive, but you can
get generic ones that’re more reasonably priced. This
toothbrush makes me feel like I’ve been to the dentist
every day. My teeth feel sparkly clean!
“””
# review for a blender
review_4 = “””
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 like 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 at all-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 overall
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.
“””
reviews = [review_1, review_2, review_3, review_4]

for i in range(len(reviews)):
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 20 words.
Review: “`{reviews[i]}“`
“””
response = get_completion(prompt)
print(i, response, “n”)

0 Soft and cute panda plush toy loved by daughter, but small for the price.
Arrived early.
1 Great lamp with storage, fast delivery, excellent customer service, and easy
assembly. Highly recommended.
2 Impressive battery life, but toothbrush head is too small. Good deal if bought
around $50.
3 The reviewer found the price increase after the sale disappointing and noticed
a decrease in quality over time.

面向开发者的LLM入门课程-情感推断
面向开发者的LLM入门课程-情感推断:情感推断 1.情感倾向分析 让我们以一则电商平台上的台灯评论为例,通过此例,我们将学习如何...

嘿,伙伴们,今天我们的AI探索之旅已经圆满结束。关于“面向开发者的LLM入门课程-文本概括英文版”的内容已经分享给大家了。感谢你们的陪伴,希望这次旅程让你对AI能够更了解、更喜欢。谨记,精准提问是解锁AI潜能的钥匙哦!如果有小伙伴想要了解学习更多的AI知识,请关注我们的官网“AI智研社”,保证让你收获满满呦!

微信扫一扫

支付宝扫一扫

版权: 转载请注明出处:https://www.ai-blog.cn/2455.html

相关推荐
01-15

面向开发者的LLM入门课程-路由链: 路由链 到目前为止,我们已经学习了大语言模型链和顺序链。但是…

215
01-15

面向开发者的LLM入门课程-顺序链: 顺序链 当只有一个输入和一个输出时,简单顺序链(SimpleSequen…

174
01-15

面向开发者的LLM入门课程-简单顺序链: 简单顺序链 顺序链(SequentialChains)是按预定义顺序执行…

174
01-15

面向开发者的LLM入门课程-大语言模型链: 模型链 链(Chains)通常将大语言模型(LLM)与提示(Pro…

174
01-15

面向开发者的LLM入门课程-对话储存英文版提示: 英文版提示 1.对话缓存储存 from langchain.chains…

174
01-15

面向开发者的LLM入门课程-对话摘要缓存储存: 对话摘要缓存储存 对话摘要缓存储存,使用 LLM 对到…

174
01-15

面向开发者的LLM入门课程-对话字符缓存储存: 对话字符缓存储存 使用对话字符缓存记忆,内存将限制…

174
01-15

面向开发者的LLM入门课程-对话缓存窗口储存: 对话缓存窗口储存 随着对话变得越来越长,所需的内存…

174
发表评论
暂无评论

还没有评论呢,快来抢沙发~

助力原创内容

快速提升站内名气成为大牛

扫描二维码

手机访问本站