ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"description": "受控的用户记忆问答对比集(实验 3-11)。用于离线量化『在嵌入/索引前对记忆块做上下文化』相较『直接索引原始对话块』在召回用户事实上的提升。每个 chunk 同时给出 text(原始对话块)与 context(上下文前缀,代表由 LLM 生成的『情境锚定』摘要)。gold 为该 query 对应的正确记忆块 id。数据集刻意包含若干『孤立片段』(如『好的,就订这个吧』),它们脱离上下文后几乎不含可检索信号——这正是本章要说明的痛点。",
|
||||
"note": "本文件为教学用受控数据集;生产环境的 context 由 LLM 逐块生成、并用神经嵌入检索(需 API)。此处以确定性的 BM25 词法检索作为无需 API 的离线代理,度量的是同一份 context 分别拼接前后对召回的影响。",
|
||||
"chunks": [
|
||||
{
|
||||
"id": "flight_detail",
|
||||
"scenario": "flight",
|
||||
"text": "用户:帮我看看从上海到西雅图的单程航班。\n助手:为您找到达美航空 DL588,10 月 12 日出发,单程含税 500 美元。",
|
||||
"context": "本段来自用户与旅行助手 2024 年 10 月的机票预订对话,讨论上海飞西雅图的单程航班:达美 DL588,含税 500 美元。"
|
||||
},
|
||||
{
|
||||
"id": "flight_confirm",
|
||||
"scenario": "flight",
|
||||
"text": "用户:好的,就订这个吧。\n助手:已为您预订,稍后发送电子行程单。",
|
||||
"context": "本段承接上文,用户确认预订那张 500 美元、上海飞西雅图的达美 DL588 单程机票。"
|
||||
},
|
||||
{
|
||||
"id": "hotel_detail",
|
||||
"scenario": "hotel",
|
||||
"text": "用户:西雅图市中心有什么酒店推荐?\n助手:推荐凯悦酒店,10 月 12 日至 15 日三晚共 840 美元。",
|
||||
"context": "本段来自同一次西雅图行程的酒店预订讨论:凯悦酒店,10 月 12-15 日三晚 840 美元。"
|
||||
},
|
||||
{
|
||||
"id": "hotel_confirm",
|
||||
"scenario": "hotel",
|
||||
"text": "用户:可以,帮我订下来。\n助手:好的,已锁定房间。",
|
||||
"context": "本段承接上文,用户确认预订西雅图凯悦酒店三晚(840 美元)的房间。"
|
||||
},
|
||||
{
|
||||
"id": "bank_account",
|
||||
"scenario": "bank",
|
||||
"text": "助手:您的新支票账户已开通。\n用户:号码是多少?\n助手:账号是 4429853327,路由号 123006800。",
|
||||
"context": "本段来自用户在第一国民银行开设支票账户的通话,客服告知支票账号 4429853327 与路由号 123006800。"
|
||||
},
|
||||
{
|
||||
"id": "bank_confirm",
|
||||
"scenario": "bank",
|
||||
"text": "用户:记下了,就用这个。\n助手:好的,已为您设置为默认收款账户。",
|
||||
"context": "本段承接上文,用户确认使用第一国民银行支票账户 4429853327 作为默认收款账户。"
|
||||
},
|
||||
{
|
||||
"id": "passport",
|
||||
"scenario": "travel_doc",
|
||||
"text": "用户:顺便问下,我护照还有效吧?\n助手:您的护照 2025 年 2 月 18 日到期,出行前请留意。",
|
||||
"context": "本段提到用户 Jessica 的护照将于 2025 年 2 月 18 日过期,与其一月的东京出行相关。"
|
||||
},
|
||||
{
|
||||
"id": "medication",
|
||||
"scenario": "medical",
|
||||
"text": "医生:这次给你把剂量调整一下。\n用户:好的,听你的。",
|
||||
"context": "本段来自复诊对话,医生将用户的二甲双胍剂量由每日 500 毫克上调至每日 1000 毫克。"
|
||||
},
|
||||
{
|
||||
"id": "restaurant_pref",
|
||||
"scenario": "preference",
|
||||
"text": "用户:我不吃香菜,也对花生过敏。\n助手:已记录您的饮食禁忌。",
|
||||
"context": "本段记录用户的饮食偏好与过敏信息:不吃香菜,对花生过敏。"
|
||||
},
|
||||
{
|
||||
"id": "gym_distractor",
|
||||
"scenario": "gym",
|
||||
"text": "用户:我想办张健身卡。\n助手:我们有月卡和年卡两种,年卡 1200 元。",
|
||||
"context": "本段来自健身房会籍咨询,年卡 1200 元。"
|
||||
},
|
||||
{
|
||||
"id": "car_distractor",
|
||||
"scenario": "car",
|
||||
"text": "用户:租车大概多少钱一天?\n助手:经济型每天 45 美元,含基础保险。",
|
||||
"context": "本段来自租车询价,经济型每天 45 美元。"
|
||||
},
|
||||
{
|
||||
"id": "insurance_distractor",
|
||||
"scenario": "insurance",
|
||||
"text": "用户:我的车险什么时候续?\n助手:您的保单 12 月 1 日到期,可提前一个月续保。",
|
||||
"context": "本段来自车险咨询,保单 12 月 1 日到期。"
|
||||
}
|
||||
],
|
||||
"queries": [
|
||||
{"q": "我最后确认预订的那张上海到西雅图的机票是哪个航班?", "gold": "flight_confirm"},
|
||||
{"q": "我订的西雅图酒店确认了吗,是哪家?", "gold": "hotel_confirm"},
|
||||
{"q": "我设为默认收款的银行支票账户是哪个?", "gold": "bank_confirm"},
|
||||
{"q": "从上海到西雅图那趟航班的票价是多少?", "gold": "flight_detail"},
|
||||
{"q": "我的护照什么时候过期?", "gold": "passport"},
|
||||
{"q": "医生把我的二甲双胍剂量调成多少了?", "gold": "medication"},
|
||||
{"q": "我有哪些饮食过敏和忌口?", "gold": "restaurant_pref"},
|
||||
{"q": "西雅图凯悦酒店三晚一共多少钱?", "gold": "hotel_detail"}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user