Dialogflow - Match intent if phrase is ever present

十年热恋 提交于 2019-12-10 11:14:37

问题


Two of the intents I have within Dialogflow is to search the users current Incidents or Requests within our service management module. What I would like to do, is to get Dialogflow to match to the correct intent if a Request Number or Incident number is ever entered into the bot.

For example, every incident has a prefix of INC and requests have a prefix of REQ. Ideally, if at any point there appears INC or REQ in the user's message, then it would match to the relevant intent. So a user could either say 'INC123456' or 'What is the status of INC123456', and in both cases, the search would match the intent.

To my knowledge, this is what the Template Mode should do, but I have had no luck so far with it. Does anyone have a solution? :)


回答1:


Try defining a custom entity and training your intent accordingly as below:

Entity

Intent

Define similar intents for INC as well. You may need to parse the parameter received and validate it through a regular expression.

There might be multiple approaches to solve your problem.

Hope that helps!



来源:https://stackoverflow.com/questions/53557235/dialogflow-match-intent-if-phrase-is-ever-present

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!