Product Recommender
Overview
This skill handles all "help me choose" queries. It goes beyond listing products —
it understands the customer's situation, filters intelligently, and presents
a curated shortlist with reasons.
Depends on: products[] in knowledge base (Step 03).
Works better with: inventory data (to exclude out-of-stock items).
Intent Extraction
Before recommending, extract these signals from the conversation:
| Signal | Examples | How to Extract |
|---|
| Budget | "500以内", "¥200左右", "不超过1000" | Parse number + direction |
| Recipient |
"送妈妈", "给男朋友", "自用" | Named or implied |
| Occasion | "生日", "面试", "日常穿", "夏天用" | Event or context |
| Preferences | "素色", "轻便", "不要太甜", "简约风" | Style/attribute keywords |
| Age/Gender | "30岁女性", "老年人", "男生" | Demographic |
| Constraints | "不含酒精", "纯棉", "防水" | Hard requirements |
| Quantity | "买一套", "各来一个" | Number intent |
If critical signals are missing (especially budget), ask one clarifying question.
Never ask for all missing fields at once.
Reference: intent-extraction.md
Filtering Logic
Apply filters in this order (hard → soft):
- 1. Hard filters (eliminate if not met):
- Budget:
price ≤ budget_max (or
sale_price if active)
- Hard constraints: attribute must match (e.g., "纯棉" → filter by material tag)
- Stock: exclude if
stock_qty == 0 (when inventory data available)
- 2. Soft scoring (rank what remains):
- Recipient match:
suitable_for overlap with recipient description
- Occasion match:
tags overlap with occasion keywords
- Style/preference match:
description +
tags keyword overlap
- Popularity signal: use
sales_rank if available, else recency
- 3. Return top N (default: 3, configurable via
max_recommendations)
Reference: filtering-logic.md
Recommendation Presentation
Standard format (3 recommendations)
CODEBLOCK0
Gift recommendation (add wrapping note)
CODEBLOCK1
Upsell (when appropriate)
If the customer's budget allows 20% more for a meaningfully better option:
"还有一款 ¥[price+] 的[产品名],多了[key upgrade],性价比也很高,要不要看看?"
Only suggest once per conversation. Never push if customer declines.
Special Flows
"帮我比较" (Comparison)
When customer names 2+ specific products:
- - Fetch both from KB
- Build a comparison table: price / key specs / suitable for / verdict
- Give a clear recommendation, not just data
"搭配什么" (Outfit/Pairing)
When customer asks what goes with a product:
- - Identify the anchor product
- Filter KB for complementary items (matching category tags: "搭配", "配套")
- Present as a complete set with total price
"再便宜一点" (Price objection)
When customer asks for cheaper options after seeing recommendations:
- - Re-filter with lower budget
- If nothing cheaper: explain value at current price, don't apologize for price
"没有我想要的" (No match)
When no product passes the filters:
- 1. Tell the customer honestly
- Suggest the closest available option
- Offer to notify when matching product arrives (log as feature request)
Script
Use scripts/recommend.py for deterministic filtering and scoring.
Reference: filtering-logic.md
产品推荐器
概述
本技能处理所有帮我选择类查询。它不仅仅是列出产品——它能理解客户的具体情况,智能筛选,并呈现精选推荐列表及推荐理由。
依赖项: 知识库中的products[](步骤03)。
配合使用效果更佳: 库存数据(用于排除缺货商品)。
意图提取
在推荐之前,从对话中提取以下信号:
| 信号 | 示例 | 提取方式 |
|---|
| 预算 | 500以内, ¥200左右, 不超过1000 | 解析数字+方向 |
| 收礼人 |
送妈妈, 给男朋友, 自用 | 明确提及或隐含 |
| 场合 | 生日, 面试, 日常穿, 夏天用 | 事件或情境 |
| 偏好 | 素色, 轻便, 不要太甜, 简约风 | 风格/属性关键词 |
| 年龄/性别 | 30岁女性, 老年人, 男生 | 人口统计特征 |
| 限制条件 | 不含酒精, 纯棉, 防水 | 硬性要求 |
| 数量 | 买一套, 各来一个 | 数量意图 |
如果缺少关键信号(尤其是预算),请提出一个澄清性问题。切勿一次性询问所有缺失信息。
参考: intent-extraction.md
筛选逻辑
按以下顺序应用筛选条件(硬性→软性):
- 1. 硬性筛选(不满足则排除):
- 预算:price ≤ budget
max(如有促销价则用saleprice)
- 硬性限制:属性必须匹配(例如纯棉→按材质标签筛选)
- 库存:若stock_qty == 0则排除(有库存数据时)
- 2. 软性评分(对剩余商品排序):
- 收礼人匹配:suitable_for与收礼人描述的重叠度
- 场合匹配:tags与场合关键词的重叠度
- 风格/偏好匹配:description+tags关键词重叠度
- 热度信号:有sales_rank则用,否则按更新时间
- 3. 返回前N个(默认:3,可通过max_recommendations配置)
参考: filtering-logic.md
推荐呈现
标准格式(3个推荐)
为您推荐 3 款最适合的选择:
1️⃣ [产品名] ¥[price]
[一句话说明为什么适合这个场景/人群]
[关键亮点:1-2个最相关的属性]
2️⃣ [产品名] ¥[price]
[...]
3️⃣ [产品名] ¥[price]
[...]
[可选] 您更倾向哪款?我可以帮您查一下库存~
礼品推荐(添加包装说明)
送礼推荐:[产品名] ¥[price]
[为什么适合作为礼物 — 一句话]
[礼盒包装是否可用 if known]
向上销售(适当时)
如果客户的预算允许增加20%以获得明显更好的选择:
还有一款 ¥[price+] 的[产品名],多了[key upgrade],性价比也很高,要不要看看?
每次对话仅建议一次。若客户拒绝,切勿强推。
特殊流程
帮我比较(比较)
当客户提到2个以上具体产品时:
- - 从知识库获取所有产品信息
- 构建对比表格:价格/关键规格/适用人群/结论
- 给出明确推荐,而非仅提供数据
搭配什么(搭配/组合)
当客户询问某产品的搭配时:
- - 确定核心产品
- 从知识库筛选互补商品(匹配品类标签:搭配, 配套)
- 以套装形式呈现,包含总价
再便宜一点(价格异议)
当客户看到推荐后要求更便宜选项时:
- - 用更低预算重新筛选
- 若无更便宜选项:解释当前价格的价值,不要为价格道歉
没有我想要的(无匹配)
当没有产品通过筛选时:
- 1. 如实告知客户
- 推荐最接近的可用选项
- 提供到货通知(记录为功能需求)
脚本
使用scripts/recommend.py进行确定性筛选和评分。
参考: filtering-logic.md