Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

customer_service.json 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. {
  2. "components": {
  3. "begin": {
  4. "obj":{
  5. "component_name": "Begin",
  6. "params": {
  7. "prologue": "Hi! How can I help you?"
  8. }
  9. },
  10. "downstream": ["answer:0"],
  11. "upstream": []
  12. },
  13. "answer:0": {
  14. "obj": {
  15. "component_name": "Answer",
  16. "params": {}
  17. },
  18. "downstream": ["categorize:0"],
  19. "upstream": ["begin", "generate:0", "generate:casual", "generate:answer", "generate:complain", "generate:ask_contact", "message:get_contact"]
  20. },
  21. "categorize:0": {
  22. "obj": {
  23. "component_name": "Categorize",
  24. "params": {
  25. "llm_id": "deepseek-chat",
  26. "category_description": {
  27. "product_related": {
  28. "description": "The question is about the product usage, appearance and how it works.",
  29. "examples": "Why it always beaming?\nHow to install it onto the wall?\nIt leaks, what to do?\nException: Can't connect to ES cluster\nHow to build the RAGFlow image from scratch",
  30. "to": "retrieval:0"
  31. },
  32. "casual": {
  33. "description": "The question is not about the product usage, appearance and how it works. Just casual chat.",
  34. "examples": "How are you doing?\nWhat is your name?\nAre you a robot?\nWhat's the weather?\nWill it rain?",
  35. "to": "generate:casual"
  36. },
  37. "complain": {
  38. "description": "Complain even curse about the product or service you provide. But the comment is not specific enough.",
  39. "examples": "How bad is it.\nIt's really sucks.\nDamn, for God's sake, can it be more steady?\nShit, I just can't use this shit.\nI can't stand it anymore.",
  40. "to": "generate:complain"
  41. },
  42. "answer": {
  43. "description": "This answer provide a specific contact information, like e-mail, phone number, wechat number, line number, twitter, discord, etc,.",
  44. "examples": "My phone number is 203921\nkevinhu.hk@gmail.com\nThis is my discord number: johndowson_29384",
  45. "to": "message:get_contact"
  46. }
  47. },
  48. "message_history_window_size": 8
  49. }
  50. },
  51. "downstream": ["retrieval:0", "generate:casual", "generate:complain", "message:get_contact"],
  52. "upstream": ["answer:0"]
  53. },
  54. "generate:casual": {
  55. "obj": {
  56. "component_name": "Generate",
  57. "params": {
  58. "llm_id": "deepseek-chat",
  59. "prompt": "You are a customer support. But the customer wants to have a casual chat with you instead of consulting about the product. Be nice, funny, enthusiasm and concern.",
  60. "temperature": 0.9,
  61. "message_history_window_size": 12,
  62. "cite": false
  63. }
  64. },
  65. "downstream": ["answer:0"],
  66. "upstream": ["categorize:0"]
  67. },
  68. "generate:complain": {
  69. "obj": {
  70. "component_name": "Generate",
  71. "params": {
  72. "llm_id": "deepseek-chat",
  73. "prompt": "You are a customer support. the Customers complain even curse about the products but not specific enough. You need to ask him/her what's the specific problem with the product. Be nice, patient and concern to soothe your customers’ emotions at first place.",
  74. "temperature": 0.9,
  75. "message_history_window_size": 12,
  76. "cite": false
  77. }
  78. },
  79. "downstream": ["answer:0"],
  80. "upstream": ["categorize:0"]
  81. },
  82. "retrieval:0": {
  83. "obj": {
  84. "component_name": "Retrieval",
  85. "params": {
  86. "similarity_threshold": 0.2,
  87. "keywords_similarity_weight": 0.3,
  88. "top_n": 6,
  89. "top_k": 1024,
  90. "rerank_id": "BAAI/bge-reranker-v2-m3",
  91. "kb_ids": ["869a236818b811ef91dffa163e197198"]
  92. }
  93. },
  94. "downstream": ["relevant:0"],
  95. "upstream": ["categorize:0"]
  96. },
  97. "relevant:0": {
  98. "obj": {
  99. "component_name": "Relevant",
  100. "params": {
  101. "llm_id": "deepseek-chat",
  102. "temperature": 0.02,
  103. "yes": "generate:answer",
  104. "no": "generate:ask_contact"
  105. }
  106. },
  107. "downstream": ["generate:answer", "generate:ask_contact"],
  108. "upstream": ["retrieval:0"]
  109. },
  110. "generate:answer": {
  111. "obj": {
  112. "component_name": "Generate",
  113. "params": {
  114. "llm_id": "deepseek-chat",
  115. "prompt": "You are an intelligent assistant. Please answer the question based on content of knowledge base. When all knowledge base content is irrelevant to the question, your answer must include the sentence \"The answer you are looking for is not found in the knowledge base!\". Answers need to consider chat history.\n Knowledge base content is as following:\n {input}\n The above is the content of knowledge base.",
  116. "temperature": 0.02
  117. }
  118. },
  119. "downstream": ["answer:0"],
  120. "upstream": ["relevant:0"]
  121. },
  122. "generate:ask_contact": {
  123. "obj": {
  124. "component_name": "Generate",
  125. "params": {
  126. "llm_id": "deepseek-chat",
  127. "prompt": "You are a customer support. But you can't answer to customers' question. You need to request their contact like E-mail, phone number, Wechat number, LINE number, twitter, discord, etc,. Product experts will contact them later. Please do not ask the same question twice.",
  128. "temperature": 0.9,
  129. "message_history_window_size": 12,
  130. "cite": false
  131. }
  132. },
  133. "downstream": ["answer:0"],
  134. "upstream": ["relevant:0"]
  135. },
  136. "message:get_contact": {
  137. "obj":{
  138. "component_name": "Message",
  139. "params": {
  140. "messages": [
  141. "Okay, I've already write this down. What else I can do for you?",
  142. "Get it. What else I can do for you?",
  143. "Thanks for your trust! Our expert will contact ASAP. So, anything else I can do for you?",
  144. "Thanks! So, anything else I can do for you?"
  145. ]
  146. }
  147. },
  148. "downstream": ["answer:0"],
  149. "upstream": ["categorize:0"]
  150. }
  151. },
  152. "history": [],
  153. "messages": [],
  154. "path": [],
  155. "reference": [],
  156. "answer": []
  157. }