paper2skills Playbook

Explainable Recommendation for Business Trust

Skill-Explainable-Recommendation · 05-推荐系统

causalexperimentforecastingoptimizationrecommendationknowledge_graphpricing推荐与搜索知识图谱与RAGMAS与智能体工程定价与利润WF-F 动态定价WF-G Listing内容优化
实现难度⭐⭐☆☆☆
业务优先级⭐⭐⭐⭐⭐
业务视角
适用角色运营负责人 / 选品负责人 · 产品经理 · 广告优化师
适用平台Amazon · DTC 独立站 · 邮件/SMS 个性化
什么情况下用老客来了只买一件就走,相关产品没被推出去;Bundle 商品连带销售做不起来;站内推荐位点击率低
成功是什么样的老客连带购买率提升 20-35%,客单价提升,品类交叉销售做起来
业务痛点
老客复购率上不去相关产品没有被看到Bundle 凑单没人用新品没有曝光机会

1. 解决的问题

黑盒推荐系统给用户推了"吸奶器",用户会问"为什么给我推这个?

2. 核心算法逻辑

核心问题:黑盒推荐系统给用户推了"吸奶器",用户会问"为什么给我推这个?"如果无法解释,用户不信任、不点击、甚至反感。业务方也不理解模型逻辑,无法优化。

3. 业务应用场景

业务问题:Momcozy 首页推荐位点击率2.5%,但用户调研显示40%的用户"不信任推荐结果"。需要给每个推荐商品添加一句话解释。

| 推荐原因 | 解释模板 | 示例 | |---------|---------|------| | 协同过滤 | "和您购买的{过往商品}很搭" | "和您买的吸奶器很搭:储奶袋" | | 内容相似 | "和您浏览过的{商品}功能相似" | "和您浏览的A款功能相似:静音升级" | | 知识关联 | "适合{宝宝阶段}的妈妈" | "适合6个月+宝宝:辅食机" | | 热门趋势 | "本周{品类}热销Top 3" | "本周吸奶器热销Top 3" | | 价格敏感 | "比您收藏的{商品}省${金额}" | "比您收藏的A款省$20" |

A/B测试结果: - 有解释版:点击率3.2%(+28%) - 无解释版:点击率2.5% - 解释类型效果排序:知识关联 > 协同过滤 > 价格敏感 > 热门趋势

4. 输入数据要求

请查看原始代码模板获取输入规格。

5. 输出结果

请查看原始代码模板获取输出规格。

6. 业务价值 / ROI

  • ROI:推荐点击率提升25-40%,用户信任度显著提升
  • 难度:⭐⭐☆☆☆(2/5)— 关联规则简单,NLG需要LLM
  • 优先级:⭐⭐⭐⭐⭐(5/5)— 推荐系统从"能用"到"可信"的关键一步

7. 代码模板

代码块数量:1 · 路径:未检测到

"""
Explainable Recommendation — 可解释推荐
支持:关联规则解释、知识图谱解释、SHAP解释
"""

import numpy as np
import pandas as pd
from collections import defaultdict, Counter


class AssociationRuleExplainer:
    """基于关联规则的解释器"""

    def __init__(self, min_support=0.01, min_confidence=0.3):
        self.min_support = min_support
        self.min_confidence = min_confidence
        self.rules = []

    def fit(self, transactions):
        """
        从交易记录挖掘关联规则

        Args:
            transactions: list of lists, each inner list is a user's purchase history
        """
        # 统计项集频率
        item_counts = Counter()
        pair_counts = defaultdict(Counter)
        total = len(transactions)

        for trans in transactions:
            unique_items = list(set(trans))
            for item in unique_items:
                item_counts[item] += 1
            for i, a in enumerate(unique_items):
                for b in unique_items[i+1:]:
                    pair_counts[a][b] += 1
                    pair_counts[b][a] += 1

        # 生成规则
        self.rules = []
        for a, neighbors in pair_counts.items():
            a_support = item_counts[a] / total
            if a_support < self.min_support:
                continue
            for b, count in neighbors.most_common(10):
                confidence = count / item_counts[a]
                if confidence >= self.min_confidence:
                    lift = confidence / (item_counts[b] / total)
                    self.rules.append({
                        'antecedent': a,
                        'consequent': b,
                        'confidence': confidence,
                        'lift': lift,
                        'support': count / total
                    })

        # 按lift排序
        self.rules.sort(key=lambda x: x['lift'], reverse=True)
        return self

8. 论文来源

未自动抽取;请查看原始 Skill 卡片。