One similar phrase but for two different intents

时间:2019-01-07 13:55:03

标签: chatbot dialogflow

I have two intents. Both, however, may use a common phrase of "What is the status of ...". The first intent is for Request Tickets and shall always include a Request Number which starts with REQ. For example, "what is the status of REQ0054896?". The second intent is for the status of a service, such as "What is the status of Google Mail?".

I have made a custom entity for the REQ Number which is in Dialogflow as REQ@sys.number-integer:number-interger. I have also done the training and ensuring that the intents are matched however it does not always return the correct values.

I'd like it so that whenever the REQ number is entered, it matches it to the entity and understands that the user is asking for the status of a request, rather than for a business service.

Request Intent

Business Service Intent

Incorrect Intent Match

As you can see from the above images, the phrase of "What is the status of..." is a common factor in both intents. Then the screenshot shows that a question in which a REQ number is used, it matches with the Business Service Intent.

1 个答案:

答案 0 :(得分:1)

在主类之前添加一个简单的基于规则的意图分类器,在这种情况下,当您可以确定地捕获某些意图时,可以省去一些麻烦。

我不了解您算法的详细信息(数据,模型等),但显然“什么是”这一部分不重要。降低这类单词重要性的一种技术是使用tf-idf等标准作为权重函数。