Dialogflow - Match intent if phrase is ever presen

2019-05-29 04:04发布

问题:

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!



标签: dialogflow