0

In watson-conversation, I have reached a point where I ask the user their car number (registration), which follows this format: 0000BBB (4 numbers, 3 letters).

I want to type that to the user like:

User: "My car id is 0123asd"

Watson: "Okay so your car id is this one: 0123asd"!

I have tried defining an entity #carId with some examples, but every time I input something with that format (0000BBB), it shows "irrelevant".

If the chat detects #carId, respond with Okay so this is your carId! @exampleCarId (I have some examples like 5487qwe, or 8521rty, I thought the machine learning below that would learn the "pattern").

enter image description here

And my #carId has these examples:

enter image description here

I know I am missing something! Do I need to code anything? I think it's not necessary. I tried to save it on a sys-number but it does not work as it is not a "number".

4

1 回答 1

1

大多数开发人员会认为他的汽车 ID 是一个实体(用 @ 表示)。IBM Watson Assistant 允许定义所谓的基于字典的实体。这种实体的一种形式是基于模式的。因此,您将定义一个由 4 个数字和 3 个字母组成的模式。

您可能有一个意图(用 # 表示)来标识用户输入了汽车 ID。在对话节点中,您可以匹配意图,然后将实际 ID 的匹配实体分配给变量。

链接的文档有示例。

于 2019-01-28T10:03:07.520 回答