- 教 Agent 用 execute_shell_command + curl 完成 VOC 采集与查询 - 与黑手党提案 UDE 诊断阶段整合 - 零依赖:无需额外安装,利用已有 VOC 后端
4.3 KiB
4.3 KiB
| name | description | metadata | ||||||
|---|---|---|---|---|---|---|---|---|
| voc_research | VOC 研究采集与分析工具。通过调用 VOC 后端 API 完成消费者声音数据的采集、查看和分析。在黑手党提案的准备阶段(UDE 诊断)特别有用。 |
|
VOC 研究工具
当用户需要采集消费者声音数据、查看 VOC 分析结果、创建 VOC 研究时,使用此 Skill。
本工具通过 execute_shell_command 调用 VOC 后端 REST API。
API 基地址
https://brand.brainwork.club/voc/api/research
核心工作流
场景 1:为黑手党提案采集 VOC 数据
当用户说"帮我采集 XX 品牌的 VOC 数据"时:
第一步:检查是否有同品牌的已有研究
curl -s https://brand.brainwork.club/voc/api/research/list | python3 -m json.tool
如果已有同品牌研究,直接使用其 id,跳到第三步。
第二步:创建新研究(仅当无已有研究时)
curl -s -X POST https://brand.brainwork.club/voc/api/research \
-H "Content-Type: application/json" \
-d '{"brand_name": "品牌名"}' | python3 -m json.tool
返回 research_id,记住它。
第三步:提交研究卡片(自动触发采集)
curl -s -X PUT https://brand.brainwork.club/voc/api/research/{id}/card \
-H "Content-Type: application/json" \
-d '{
"brand_name": "天维美",
"category": "跨境保健品",
"focus_product": "护肝片",
"competitors": [{"name": "Swisse"}, {"name": "Blackmores"}],
"keywords": [
{"keyword": "天维美 护肝片", "category": "brand"},
{"keyword": "护肝片 推荐", "category": "category"},
{"keyword": "Swisse 护肝", "category": "compete"}
]
}' | python3 -m json.tool
⚠️ 提交卡片后, 服务器会自动开始采集。采集是异步的,通常 30 秒到 2 分钟完成。
第四步:检查采集状态
curl -s https://brand.brainwork.club/voc/api/research/{id}/pipeline | python3 -m json.tool
等 collect 步骤的 status 变为 done 后再继续。
第五步:查看 VOC 数据
# 查看 VOC 列表(前 20 条)
curl -s "https://brand.brainwork.club/voc/api/research/{id}/voc-list?page=1&page_size=20" | python3 -m json.tool
# 查看聚类分析
curl -s "https://brand.brainwork.club/voc/api/research/{id}/focus-state?lens=task" | python3 -m json.tool
# 查看帖子分组
curl -s "https://brand.brainwork.club/voc/api/research/{id}/items-grouped?view=included" | python3 -m json.tool
场景 2:查看已有研究的数据
用户说"看看 XX 品牌的 VOC 数据"时:
# 列出所有研究
curl -s https://brand.brainwork.club/voc/api/research/list | python3 -m json.tool
# 获取研究详情(含统计)
curl -s https://brand.brainwork.club/voc/api/research/{id} | python3 -m json.tool
# 获取 VOC 数据
curl -s "https://brand.brainwork.club/voc/api/research/{id}/voc-list?page=1&page_size=20" | python3 -m json.tool
场景 3:获取研究报告
curl -s https://brand.brainwork.club/voc/api/research/{id}/report | python3 -m json.tool
与黑手党提案的整合
VOC 数据在黑手党提案流程中的作用:
- 准备阶段 - UDE 诊断:VOC 数据中的用户抱怨 = 不满意效果(UDE),直接用于诊断
- 步骤 1 - 冲突图:VOC 中矛盾性表达(如"想买但太贵")= 冲突素材
- 步骤 2 - 惯例揭示:VOC 中的"大家都这样""行业惯例"表述 = 待打破的惯例
- 步骤 5 - 提案验证:VOC 数据量和情感分布 = 提案的实证基础
关键字段说明
VOC 列表返回的每条记录包含:
text:评论/笔记原文platform:来源平台(douyin/xiaohongshu)like_count:点赞数(可作为共鸣度指标)author_type:real_user / brand_official / marketingtag:LLM 标注的主题标签dimension:归属的分析维度
注意事项
- API 无需认证,直接 curl 即可
- 所有写操作返回
{received: true},实际结果通过 SSE 推送(但 Agent 不需要监听 SSE,等几秒后直接查询即可) - 采集需要 TikHub API Key,目前服务器已配置好。未来支持用户自带 Key
- 全局缓存机制:同一关键词的数据跨研究复用,不会重复调 API