api-config.json 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. {
  2. "name": "review-highlight-extraction",
  3. "displayName": "好评亮点提取",
  4. "description": "从好评中提取用户最认可的产品亮点,识别竞品核心卖点和可借鉴的优势",
  5. "category": "review-analysis",
  6. "version": "1.0.0",
  7. "type": "analysis",
  8. "parameters": {
  9. "reviewCorpus": {
  10. "type": "object",
  11. "required": true,
  12. "description": "review-batch-collection 输出的评论语料"
  13. },
  14. "targetAsins": {
  15. "type": "array",
  16. "items": { "type": "string" },
  17. "required": false,
  18. "description": "指定分析的ASIN"
  19. },
  20. "highlightCategories": {
  21. "type": "array",
  22. "items": { "type": "string" },
  23. "required": false,
  24. "default": ["品质感知", "功能表现", "设计美学", "使用体验", "性价比", "包装送礼"],
  25. "description": "预定义亮点类别"
  26. }
  27. },
  28. "pipeline": [
  29. {
  30. "step": 1,
  31. "name": "过滤好评",
  32. "type": "filter",
  33. "logic": "filterPositiveReviews(reviewCorpus.reviews, { stars: [4, 5], targetAsins })",
  34. "algorithm": {
  35. "filter": "star>=4 && (targetAsins.length==0 || targetAsins.includes(asin))",
  36. "implementation": "遍历reviews数组,保留star>=4的评论,可选按targetAsins进一步过滤"
  37. },
  38. "output": "positiveReviews"
  39. },
  40. {
  41. "step": 2,
  42. "name": "AI提取亮点主题",
  43. "type": "ai",
  44. "logic": "extractHighlights(positiveReviews, { highlightCategories })",
  45. "aiConfig": {
  46. "systemPrompt": "你是跨境电商VOC分析师。只输出一个合法JSON对象。禁止输出Markdown、代码围栏、解释文字。",
  47. "userPromptTemplate": "以下是好评样本([星级][ASIN] 标题 | 摘要)。请归纳产品亮点主题,按用户认可度排序:\n${payload}",
  48. "outputFormat": "{\"highlights\":[{\"topic\":\"穿着舒适\",\"score\":90,\"category\":\"使用体验\",\"examples\":[\"超级舒服\"]}]}",
  49. "temperature": 0.2,
  50. "maxTokens": 2000,
  51. "payloadFormat": "每条评论格式化为 [star★][ASIN] title | content截取前200字,按batch发送给AI"
  52. },
  53. "output": "rawHighlights"
  54. },
  55. {
  56. "step": 3,
  57. "name": "亮点聚类+热度排序",
  58. "type": "compute",
  59. "logic": "clusterAndRank(rawHighlights, positiveReviews)",
  60. "algorithm": {
  61. "cluster": "语义相近的合并为一个topic,各最多8条",
  62. "hotScore": "score = frequency*0.5 + sentimentIntensity*0.3 + helpfulCount*0.2",
  63. "implementation": "将AI返回的亮点按topic合并,统计frequency,用hotScore公式排序"
  64. },
  65. "output": "rankedHighlights"
  66. },
  67. {
  68. "step": 4,
  69. "name": "识别竞品核心卖点",
  70. "type": "compute",
  71. "logic": "identifyCompetitorAdvantages(rankedHighlights, targetAsins)",
  72. "algorithm": {
  73. "perAsin": "每个ASIN的top3亮点 = 该竞品核心卖点",
  74. "shared": "多个竞品共有的亮点 = 品类基本需求",
  75. "unique": "某竞品独有亮点 = 其差异化优势",
  76. "implementation": "按ASIN分组亮点,找出多个ASIN共有的(品类基本需求)和单ASIN独有的(差异化优势)"
  77. },
  78. "output": "competitorAdvantages"
  79. },
  80. {
  81. "step": 5,
  82. "name": "Listing卖点植入建议",
  83. "type": "compute",
  84. "logic": "generateListingSellpointAdvice(rankedHighlights, competitorAdvantages)",
  85. "algorithm": {
  86. "titleAdvice": {
  87. "rule": "将top3亮点词根植入标题前65字符",
  88. "format": "核心词前置 + 用户意图补充 + 中文意图提示"
  89. },
  90. "bulletAdvice": {
  91. "rule": "前1-2个bullet自然融入高频亮点词",
  92. "highlight": "突出用户意图,与竞品做差异化"
  93. },
  94. "aplusAdvice": "A+页面突出好评主题场景化展示,强化用户信任",
  95. "sellpointPriority": "品类共有亮点(必备基础) > 本品独有亮点(差异化) > 竞品独有亮点(跟进参考)"
  96. },
  97. "output": "listingSellpointAdvice"
  98. }
  99. ],
  100. "response": {
  101. "type": "object",
  102. "properties": {
  103. "highlights": {
  104. "type": "array",
  105. "description": "按频率排序的亮点列表",
  106. "items": {
  107. "type": "object",
  108. "properties": {
  109. "topic": { "type": "string" },
  110. "score": { "type": "integer", "description": "0-100热度" },
  111. "category": { "type": "string" },
  112. "frequency": { "type": "integer" },
  113. "examples": { "type": "array", "items": { "type": "string" } }
  114. }
  115. }
  116. },
  117. "competitorAdvantages": {
  118. "type": "object",
  119. "description": "各竞品的独有亮点",
  120. "additionalProperties": { "type": "array" }
  121. },
  122. "actionableInsights": {
  123. "type": "array",
  124. "description": "可执行的产品策略建议",
  125. "items": {
  126. "type": "object",
  127. "properties": {
  128. "insight": { "type": "string" },
  129. "action": { "type": "string" },
  130. "priority": { "type": "string", "enum": ["high", "medium", "low"] }
  131. }
  132. }
  133. },
  134. "listingSellpointAdvice": {
  135. "type": "object",
  136. "description": "Listing卖点植入建议",
  137. "properties": {
  138. "titleKeywords": { "type": "array", "items": { "type": "string" }, "description": "建议植入标题的亮点词根" },
  139. "bulletHighlights": { "type": "array", "items": { "type": "string" }, "description": "建议在bullet中突出的卖点" },
  140. "aplusThemes": { "type": "array", "items": { "type": "string" }, "description": "A+页面建议展示的场景主题" },
  141. "sellpointPriority": { "type": "array", "items": { "type": "object", "properties": { "sellpoint": {"type":"string"}, "type": {"type":"string", "enum":["required","differentiation","reference"]}, "source": {"type":"string"} } } }
  142. }
  143. }
  144. }
  145. },
  146. "timeout": 60000,
  147. "retry": {
  148. "maxAttempts": 2,
  149. "delay": 1000,
  150. "backoffMultiplier": 2
  151. }
  152. }