Slot filling chatbot, suggestion chips in prompts

2019-07-22 21:16发布

问题:

Hi I am creating slot filling chatbot where I would like to ask as much open question as possible at the beginning to make my flow the most similar to the normal conversation.

How can I achieve two types of prompts one general to specify which parameter is missing and if user will not fill it in a correct way then i would like to suggest him answers by using suggestion chips? (Blue on the flow diagram above)

回答1:

AFAIK, your requirements can only be implemented in webhook code; the Dialogflow configuration is not enough to set up this kind of dialog. A webhook is necessary - however, some resources discourage that altogether. Go and read The different types of Dialogflow (API.AI) slot filling tasks carefully.

If you decide to start using webhook for slot-filling (this sample webhook implementation is a good starting point), it will:

+----------+         +-------------+        +-------------+
|          | ------> |             | -----> |             |
|   User   |         | Dialogflow  |        |   Webhook   |
|          | <------ |             | <----- |             |
+----------+         +-------------+        +-------------+
  1. receive a request with the recognized intent and entities
  2. ask follow-up questions (either asking for a missing entity or offering a suggestion if an unsupported value was provided)

Basically, this means that Dialogflow is now used only for natural language understanding (NLU) and the webhook becomes responsible for dialog management.



回答2:

So far as I understand, dialogflow.com has no such provision to define multiple prompts within single intent so either way to do this is to use webhooks for slot-filling. I can see here, https://miningbusinessdata.com/different-types-api-ai-slot-filling-tasks/ that this is not a recommended way of solving your problem & this is because once you enter in webhook, you will have to write your own logic of NLP to handle user responses & understand the context of what user wants to say. So instead of having multiple prompts like what type of vehicle->plane->we don't have this (enter car/truck), you can directly say what type of vehicle (please enter any of this: car/truck) so you don't have to define multiple prompts here & your work will be done. Unless you have car/truck in user says of your intent, it will continue promoting same question.



标签: dialogflow