简体   繁体   English

Watson Assistent 中的对话节点和意图问题

[英]Problem with dialog nodes and intents in Watson Assistent

I'm using IBM Watson Assistant for creating a chatbot.我正在使用 IBM Watson Assistant 创建聊天机器人。 I'm using the web interface with the intents, entities and dialog flow|tree (I don't know how it is called, I'm just calling it web interface).我正在使用带有意图、实体和对话流|树的 Web 界面(我不知道它是如何调用的,我只是将其称为 Web 界面)。 I have four problems and hope that someone can help with it.我有四个问题,希望有人能帮忙解决。

  1. I have created two intens: #how_are_you with an example "How are you?"我创建了两个 Intens:#how_are_you 和一个例子“你好吗?” and intent #feeling_good with example "I'm good".和意图#feeling_good 示例“我很好”。 Of course I have much more examples for these two intents.当然,我有更多关于这两个意图的例子。 In the dialog I have now a parent node looking for #feeling_good and a child node looking for #how_are_you (skipping user input in-between).在对话框中,我现在有一个寻找#feeling_good 的父节点和一个寻找#how_are_you 的子节点(跳过中间的用户输入)。 When a user now inputs the sentence "I'm good. How are you?"当用户现在输入句子“我很好。你好吗?” then only #feeling_good is triggered but not #how_are_you.那么只有#feeling_good 被触发,而不是#how_are_you。 How can I trigger both intents with only one user input?如何仅用一个用户输入触发两个意图?

  2. I would like to have one node in the dialog which waits for say 100s and then sends another message to the user.我希望对话框中有一个节点等待 100 秒,然后向用户发送另一条消息。 Waiting is no problem (using pause) but how can I do it that only a message is sent after the 100s if the user did not send another message during the waiting period?等待没有问题(使用暂停)但是如果用户在等待期间没有发送另一条消息,我怎么能做到在 100 秒后只发送一条消息? That means when the user sends a message the waiting node should be canceled.这意味着当用户发送消息时,应该取消等待节点。

  3. I have a node which checks for a certain intent.我有一个检查特定意图的节点。 When the intent does not match I'm jumping back to the parent node.当意图不匹配时,我将跳回到父节点。 The problem is that the text from the parent node is repeated each time.问题是来自父节点的文本每次都会重复。 How can I prevent this repetition when jumping back?跳回时如何防止这种重复?

  4. The last question is perhaps a bit more tricky.最后一个问题可能有点棘手。 I would like to define an array of the numbers [1,2,3,4,5].我想定义一个数字数组 [1,2,3,4,5]。 Then one node should sample a random number without replacement from that array (eg 2), ie the remaining array is then [1,3,4,5].然后一个节点应该从该数组(例如2)中采样一个没有替换的随机数,即剩余的数组是[1,3,4,5]。 After some time another node should pick another number at random from the array (say 4).一段时间后,另一个节点应该从数组中随机选择另一个数字(比如 4)。 And so on.等等。 How can this be implemented?如何实施? I know about variables (eg $var) but I don't know how to represent arrays and sample random numbers.我知道变量(例如 $var),但我不知道如何表示数组和样本随机数。

Thank you so much for your answers in advance.非常感谢您提前回答。 And happy new year to everybody.并祝大家新年快乐。

1) In Watson Assistant always the intent with the highest confidence is used first. 1) 在 Watson Assistant 中,始终首先使用具有最高置信度的意图。 Hence processing multiple intents triggered by one sentence is tricky.因此,处理由一个句子触发的多个意图是很棘手的。 The "best" solution is to use composite intent - #HELLO_HOW_ARE_YOU. “最佳”解决方案是使用复合意图 - #HELLO_HOW_ARE_YOU。 Alternatively you can create conditions that would check if the first two intents returned are a comination of #HELLO and #HOW_ARE_YOU或者,您可以创建条件来检查返回的前两个意图是否是 #HELLO 和 #HOW_ARE_YOU 的组合

2) Waiting and sending messages due to inactivity should be ideally handled by the client implementing the chat console in your interface. 2) 由于不活动而等待和发送消息最好由在您的界面中实现聊天控制台的客户端处理。 WA is not well suited for these types of operations, while there is some support, better way how to handle these is get your client application - when inactivity detected - to send something that will be mapped to #INACTIVITY_INTENT and WA will respond with your message coupled with that intent. WA 不太适合这些类型的操作,虽然有一些支持,但更好的处理方法是让您的客户端应用程序 - 当检测到不活动时 - 发送一些将映射到 #INACTIVITY_INTENT 的内容,WA 将响应您的消息加上那个意图。

3) Don't jump to the node but jump to the first child of that node and use wait for user input . 3)不要跳转到节点而是跳转到该节点的第一个子节点并使用wait for user input

4) This is possible. 4)这是可能的。 WA expression language supports getting random number, getting the size of an array and removing elements from the array. WA 表达式语言支持获取随机数、获取数组的大小和从数组中删除元素。 Eg <? $array.remove(new Random().nextInt(3))?>例如<? $array.remove(new Random().nextInt(3))?> <? $array.remove(new Random().nextInt(3))?>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM