将 category 从 6 类扩展为 8 类标准枚举并允许补充自定义类别,同步更新提取规则与校验映射;新增面向业务的 ECharts 流程说明页面。 Co-authored-by: Cursor <cursoragent@cursor.com>
88 lines
4.1 KiB
YAML
88 lines
4.1 KiB
YAML
# Few-shot 示例:output 为 YAML 对象,程序自动转为 JSON 字符串
|
||
- instruction: "示例 1 教学:展示正常长评论如何标准提取,如何准确分类产品优点、缺陷以及物流问题。"
|
||
review: "Bought this for my 12yo lab who struggles with stairs. It is very soft and helps her get onto the bed easily. But the zipper broke after a week and the shipping box was damaged."
|
||
output:
|
||
audience: "12yo lab"
|
||
pain_points:
|
||
- "struggles with stairs"
|
||
- "difficulty getting onto bed"
|
||
product_feedback:
|
||
- aspect: "fabric"
|
||
opinion: "very soft"
|
||
sentiment: Positive
|
||
category: Quality
|
||
- aspect: "zipper"
|
||
opinion: "broke after a week"
|
||
sentiment: Negative
|
||
category: Quality
|
||
- aspect: "shipping box"
|
||
opinion: "damaged"
|
||
sentiment: Negative
|
||
category: Logistics
|
||
|
||
- instruction: "示例 2 教学:防混淆与隐性属性提炼。什么是「产品缺陷(如讲太快)」,它属于 product_feedback,绝不是 pain_points(用户需求)!并提炼出 teaching speed 这个隐性反馈对象。"
|
||
review: "The course content is good, the teacher speaks too fast, can't keep up."
|
||
output:
|
||
audience: "student"
|
||
pain_points: []
|
||
product_feedback:
|
||
- aspect: "course content"
|
||
opinion: "good"
|
||
sentiment: Positive
|
||
category: Quality
|
||
- aspect: "teaching speed"
|
||
opinion: "too fast to keep up"
|
||
sentiment: Negative
|
||
category: Function
|
||
|
||
- instruction: "示例 3 教学:深度上下文推理。如何通过动作(抓跳蚤)推理出使用者(pet),如何通过「全家能睡觉」推理出用户需求(失眠),以及如何将「Worth every penny」准确归类为对 Price(价格)的产品反馈。"
|
||
review: "Finally found something that stops the midnight flea scratching! The chemical smell is a bit strong initially, but it fades. Worth every penny since our family can finally sleep."
|
||
output:
|
||
audience: "pet"
|
||
pain_points:
|
||
- "midnight flea scratching"
|
||
- "sleep deprivation"
|
||
product_feedback:
|
||
- aspect: "chemical smell"
|
||
opinion: "strong initially but fades"
|
||
sentiment: Neutral
|
||
category: Quality
|
||
- aspect: "price"
|
||
opinion: "worth every penny"
|
||
sentiment: Positive
|
||
category: Price
|
||
|
||
- instruction: "示例 4 教学:1) 非英语评论(例如西班牙语)输出必须全英文,禁止保留原文非英文片段,先理解语义再用英文短语表达;2) 「随附配件」不属于 8 个标准类别,演示如何补充一个简洁的英文新类别 'Accessories'。"
|
||
review: "El producto en sí está muy bien, viene con 2 cristales templados y 2 grips para los joycon. Pero es lo que he leido en algunos comentarios, la funda huele como a tabaco jajaja es raro pero es así"
|
||
output:
|
||
audience: "self"
|
||
pain_points: []
|
||
product_feedback:
|
||
- aspect: "product"
|
||
opinion: "it's fine"
|
||
sentiment: Positive
|
||
category: Quality
|
||
- aspect: "included accessories"
|
||
opinion: "comes with 2 tempered glass and 2 grips"
|
||
sentiment: Positive
|
||
category: Accessories
|
||
- aspect: "case smell"
|
||
opinion: "smells like tobacco, strange"
|
||
sentiment: Negative
|
||
category: Quality
|
||
|
||
- instruction: "示例 5 教学:保留关键成分与症状等核心具体词汇。绝不能将带有具体成分/病症的词泛化提取。例如遇到「chicken flavor」(鸡肉风味)或「joint pain」(关节疼痛)时,必须保留核心修饰词,绝不能错误缩减提取为「flavor」或「pain」。"
|
||
review: "My elderly cat suffers from severe joint pain. But he is very attracted by the chicken flavor of this supplement! It really helps him walk better."
|
||
output:
|
||
audience: "elderly cat"
|
||
pain_points:
|
||
- "severe joint pain"
|
||
product_feedback:
|
||
- aspect: "chicken flavor"
|
||
opinion: "very attracted"
|
||
sentiment: Positive
|
||
category: Quality
|
||
- aspect: "mobility improvement"
|
||
opinion: "helps walk better"
|
||
sentiment: Positive
|
||
category: Function
|