I have query on how do I fetch multiple entities at a single point and also verify that all entities are given before going further in the chat flow. How do I give a prompt to tell the user that a particular entity is missed out it needs to be given to continue.
Hi @ashwing2,
Please follow the instructions as mentioned under the below use cases and let us know if you have further questions.
Use Case 1:
Extracting entities from the user utterance and ask user only for the entity values which are not present in the utterance:
->Do Entity tagging for the utterances provided at the task and train them, the bot would extract the entities from the user utterances and would only ask those weren’t present in the utterance.
Ref to below snips for more details:
Sample dialog which collects source and destination from user:
Utterances trained by developer with the entities tagged:
Bot only prompting for entities which are not available in the utterance:
User Case 2:
Developer not sure at an entity node on what input user might provide, say location, for instance, the user could provide the City, State, Country (or) ZipCode.
-> Create 2 entity nodes of type Location & Zip code which need not be connected to any of the nodes in the dialog
->Create an entity node of type Composite entity and add the patterns by referencing the entities city and zipcode
Now user could provide either the city or zipcode and the data is stored in the context accordingly as shown below:
Thank you for the quick turn around, I have actually created a composite entity with four values Source, Destination, date and time. In my case I want all the four entities to be given to proceed, How do I do it? and how do I confirm that other values that was given are still intact?
@ashwing2 Well, when you are using a composite entity type, you could add patterns works on operations (or)/(and), meaning, the dialog progresses to the next node, if any of the entity values are provided or all the entity values are provided by user. (Depending on the composite pattern defined)
In your case, you can’t use a composite entity but can use all the entities and define NER at utterances based on which the user is only prompted the entities which are not provided in the utterance.
I tried out the Use case1 style, but I face issue please check the below screenshot, I have created two entities Source and destination linked in the flow as mandatory entity and am training the utterances.
In the above image I have added Chennai as source and Mumbai as Destination and also have trained it with individual sentences but see the below conversation,
As per my Utterance train Delhi should have been taken as Destination but its taking it as Source.
Please help me out it. Bot flow as simple as you had shown.
Hey @ashwing2, If I understand the user execution right, the utterance you have trained didn’t initiate the task. The utterance was provided at an entity node and so the bot extracted the entity value for current node based on the utterance.
Please do initiate the task with the utterances you have trained at the task itself and if you still see an issue, please provide us with the bot export so that we debug further.
One clarification, I have tried using both City and Location as entity type for Source and destination but it’s not working. But In use case 1 screenshot you had shared with me I could see it’s working may i known what entity type have you used for it.
The entity type shouldn’t create a problem (I have used both the city and location to see just in case) . Please share the dialog/ Bot Export and we’ll have the issue debugged.
Hey again @ashwing2 , Thanks for sharing the configuration. The entity extraction doesn’t seem to happen when invoking dialog in an other dialog and passing the utterances trained at invoked dialog . We do have an open issue for the same.
While, in your scenario, you should be invoking the intent as a dialog instead of sub-intent though as shown below for the entity extraction to happen.
We will followup the development team to expedite the issue (Entity extraction when intent is invoked as dialog in other dialog when user passes trained utterance). In the meanwhile, for your user case to work, add the name entity in the bookTrainTic dialog itself and pass the utterance , in which case the bot would only ask for Name and source instead of destination.
@ashwing2 I believe @Subrahmanyam already mentioned about an issue with entity extraction when the utterance is passed in case of linked dialog and referred to make changes in configuration. Did you get a chance to review and make changes as suggested? If not, please kindly do and let us know.
Yes I tried out what @Subrahmanyam I was not successful with it, that why I removed all those changes and sent you guys the export. What I had done is I tried creating a dialog task added name entity , bookTrainTic intent and source entity into it then connected rest to the dialog blocks out and but it gave an error saying couldn’t switch to that dialog. Correct me if my understanding is wrong.