AI教程 2025年01月16日
0 收藏 0 点赞 374 浏览 5880 个字
摘要 :

面向开发者的LLM入门课程-评估英文版提(2): 英文版提示 2.人工评估 import langchain langchain.debug = True #重新运行与上面相同的示例,可以看到它开始打印出更多……

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

面向开发者的LLM入门课程-评估英文版提(2)

面向开发者的LLM入门课程-评估英文版提(2):

英文版提示

2.人工评估

import langchain
langchain.debug = True
#重新运行与上面相同的示例,可以看到它开始打印出更多的信息
qa.run(examples[0][“query”])
langchain.debug = False

[chain/start] [1:chain:RetrievalQA] Entering Chain run with input:
{
“query”: “Do the Cozy Comfort Pullover Set have side pockets?”
}
[chain/start] [1:chain:RetrievalQA > 3:chain:StuffDocumentsChain] Entering Chain
run with input:
[inputs]
[chain/start] [1:chain:RetrievalQA > 3:chain:StuffDocumentsChain >
4:chain:LLMChain] Entering Chain run with input:
{
“question”: “Do the Cozy Comfort Pullover Set have side pockets?”,
“context”: “: 10nname: Cozy Comfort Pullover Set, Stripendescription: Perfect
for lounging, this striped knit set lives up to its name. We used ultrasoft
fabric and an easy design that’s as comfortable at bedtime as it is when we have
to make a quick run out.nnSize & Fitn- Pants are Favorite Fit: Sits lower on
the waist.n- Relaxed Fit: Our most generous fit sits farthest from the
body.nnFabric & Caren- In the softest blend of 63% polyester, 35% rayon and 2%
spandex.nnAdditional Featuresn- Relaxed fit top with raglan sleeves and
rounded hem.n- Pull-on pants have a wide elastic waistband and drawstring, side
pockets and a modern slim leg.nnImported.<<<<>>>>>: 73nname: Cozy Cuddles Knit
Pullover Setndescription: Perfect for lounging, this knit set lives up to its
name. We used ultrasoft fabric and an easy design that’s as comfortable at
bedtime as it is when we have to make a quick run out. nnSize & Fit nPants are
Favorite Fit: Sits lower on the waist. nRelaxed Fit: Our most generous fit sits
farthest from the body. nnFabric & Care nIn the softest blend of 63%
polyester, 35% rayon and 2% spandex.nnAdditional Features nRelaxed fit top
with raglan sleeves and rounded hem. nPull-on pants have a wide elastic
waistband and drawstring, side pockets and a modern slim leg. nImported.
<<<<>>>>>: 151nname: Cozy Quilted Sweatshirtndescription: Our sweatshirt is an
instant classic with its great quilted texture and versatile weight that easily
transitions between seasons. With a traditional fit that is relaxed through the
chest, sleeve, and waist, this pullover is lightweight enough to be worn most
months of the year. The cotton blend fabric is super soft and comfortable, making
it the perfect casual layer. To make dressing easy, this sweatshirt also features
a snap placket and a heritage-inspired Mt. Katahdin logo patch. For care, machine
wash and dry. Imported.<<<<>>>>>: 265nname: Cozy Workout Vestndescription: For
serious warmth that won’t weigh you down, reach for this fleece-lined vest, which
provides you with layering options whether you’re inside or outdoors.nSize &
FitnRelaxed Fit. Falls at hip.nFabric & CarenSoft, textured fleece lining.
Nylon shell. Machine wash and dry. nAdditional Features nTwo handwarmer
pockets. Knit side panels stretch for a more flattering fit. Shell fabric is
treated to resist water and stains. Imported.”
}
[llm/start] [1:chain:RetrievalQA > 3:chain:StuffDocumentsChain > 4:chain:LLMChain
> 5:llm:ChatOpenAI] Entering LLM run with input:
{
“prompts”: [
“System: Use the following pieces of context to answer the users question.
nIf you don’t know the answer, just say that you don’t know, don’t try to make
up an answer.n—————-n: 10nname: Cozy Comfort Pullover Set,
Stripendescription: Perfect for lounging, this striped knit set lives up to its
name. We used ultrasoft fabric and an easy design that’s as comfortable at
bedtime as it is when we have to make a quick run out.nnSize & Fitn- Pants are
Favorite Fit: Sits lower on the waist.n- Relaxed Fit: Our most generous fit sits
farthest from the body.nnFabric & Caren- In the softest blend of 63%
polyester, 35% rayon and 2% spandex.nnAdditional Featuresn- Relaxed fit top
with raglan sleeves and rounded hem.n- Pull-on pants have a wide elastic
waistband and drawstring, side pockets and a modern slim leg.nnImported.
<<<<>>>>>: 73nname: Cozy Cuddles Knit Pullover Setndescription: Perfect for
lounging, this knit set lives up to its name. We used ultrasoft fabric and an
easy design that’s as comfortable at bedtime as it is when we have to make a
quick run out. nnSize & Fit nPants are Favorite Fit: Sits lower on the waist.
nRelaxed Fit: Our most generous fit sits farthest from the body. nnFabric &
Care nIn the softest blend of 63% polyester, 35% rayon and 2%
spandex.nnAdditional Features nRelaxed fit top with raglan sleeves and rounded
hem. nPull-on pants have a wide elastic waistband and drawstring, side pockets
and a modern slim leg. nImported.<<<<>>>>>: 151nname: Cozy Quilted
Sweatshirtndescription: Our sweatshirt is an instant classic with its great
quilted texture and versatile weight that easily transitions between seasons.
With a traditional fit that is relaxed through the chest, sleeve, and waist, this
pullover is lightweight enough to be worn most months of the year. The cotton
blend fabric is super soft and comfortable, making it the perfect casual layer.
To make dressing easy, this sweatshirt also features a snap placket and a
heritage-inspired Mt. Katahdin logo patch. For care, machine wash and dry.
Imported.<<<<>>>>>: 265nname: Cozy Workout Vestndescription: For serious warmth
that won’t weigh you down, reach for this fleece-lined vest, which provides you
with layering options whether you’re inside or outdoors.nSize & FitnRelaxed
Fit. Falls at hip.nFabric & CarenSoft, textured fleece lining. Nylon shell.
Machine wash and dry. nAdditional Features nTwo handwarmer pockets. Knit side
panels stretch for a more flattering fit. Shell fabric is treated to resist water
and stains. Imported.nHuman: Do the Cozy Comfort Pullover Set have side
pockets?”
]
}
[llm/end] [1:chain:RetrievalQA > 3:chain:StuffDocumentsChain > 4:chain:LLMChain >
5:llm:ChatOpenAI] [879.746ms] Exiting LLM run with output:
{
“generations”: [
[
{
“text”: “Yes, the Cozy Comfort Pullover Set does have side pockets.”,
“generation_info”: {
“finish_reason”: “stop”
},
“message”: {
“lc”: 1,
“type”: “constructor”,
“id”: [
“langchain”,
“schema”,
“messages”,
“AIMessage”
],
“kwargs”: {
“content”: “Yes, the Cozy Comfort Pullover Set does have side
pockets.”,
“additional_kwargs”: {}
}
}
}
]
],
“llm_output”: {
“token_usage”: {
“prompt_tokens”: 626,
“completion_tokens”: 14,
“total_tokens”: 640
},
“model_name”: “gpt-3.5-turbo”
},
“run”: null
}
[chain/end] [1:chain:RetrievalQA > 3:chain:StuffDocumentsChain >
4:chain:LLMChain] [880.5269999999999ms] Exiting Chain run with output:
{
“text”: “Yes, the Cozy Comfort Pullover Set does have side pockets.”
}
[chain/end] [1:chain:RetrievalQA > 3:chain:StuffDocumentsChain]
[881.4499999999999ms] Exiting Chain run with output:
{
“output_text”: “Yes, the Cozy Comfort Pullover Set does have side pockets.”
}
[chain/end] [1:chain:RetrievalQA] [1.21s] Exiting Chain run with output:
{
“result”: “Yes, the Cozy Comfort Pullover Set does have side pockets.”
}

面向开发者的LLM入门课程-评估英文版提(3)
面向开发者的LLM入门课程-评估英文版提(3):英文版提示 3.通过LLM进行评估实例 langchain.debug = False #为所有不同的...

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

微信扫一扫

支付宝扫一扫

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

相关推荐
01-17

面向开发者的LLM入门教程-文档加载-PDF文档: 文档加载 用户个人数据可以以多种形式呈现:PDF 文档…

276
01-16

面向开发者的LLM入门教程-使用LangChain访问个人数据: 在大数据时代,数据的价值越来越重要。想要…

374
01-16

面向开发者的LLM入门课程-代理英文版(3): 3. 定义自己的工具并在代理中使用 # 导入tool函数装饰…

374
01-16

面向开发者的LLM入门课程-代理英文版(2): 2. 使用LangChain内置工具PythonREPLTool from langch…

374
01-16

面向开发者的LLM入门课程-代理英文版(1): 1. 使用LangChain内置工具llm-math和wikipedia from l…

374
01-16

面向开发者的LLM入门课程-定义工具在代理中使用: 定义自己的工具并在代理中使用 在本节,我们将创…

374
01-16

面向开发者的LLM入门课程-内置工具PythonREPLTool: 使用LangChain内置工具PythonREPLTool 我们创…

374
01-16

面向开发者的LLM入门课程-llm-math和wikipedia: 代理 大型语言模型(LLMs)非常强大,但它们缺乏“…

374
发表评论
暂无评论

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

助力原创内容

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

扫描二维码

手机访问本站