Fetching Multiple Entity and all needs to obtained before proceeding the follow

Hi All,

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.

Thanks

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:

image

Utterances trained by developer with the entities tagged:

image

Bot only prompting for entities which are not available in the utterance:
image

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

image
image

->Create an entity node of type Composite entity and add the patterns by referencing the entities city and zipcode

image

Now user could provide either the city or zipcode and the data is stored in the context accordingly as shown below:
image
image

Thanks,
Subbu

1 Like

Hi @Subrahmanyam,

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?

Thanks
Ashwin

@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.

Kr,
Subbu

Cool thanks a lot @Subrahmanyam. Will try out and come back.

Hi @Subrahmanyam,

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.

image

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,

image

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.

Thanks
Ashwin

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.

Refer to below link related to entity extraction based on user provided utterances:
https://developer.kore.ai/docs/bots/bot-builder/defining-bot-tasks/dialog-tasks/working-with-the-entity-node/

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.

Hi @Subrahmanyam,

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.

Thanks,

Ashwin

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.

Kr,
Subbu

Hi @Subrahmanyam,

I am still facing issue with using entity type, Source is Location and Destination as city I have assigned now, tried the below conversation,

“Would like to book a ticket to Bangalore” this conversation should take destination is given and not source but it doesn’t work like that.

I am not able to share you the Bot Export JSON file. Here how do I share it with you?

@ashwing2 I tried with the same entity types you mentioned in the issue and it seems to be working as expected. Please refer to the below screenshot:
image
image
image

@swathi.vadlamani Could you please liaise with Ashwin by taking the bot export file to validate the issue from your side?

Kr,
Subbu

Hi @Subrahmanyam,

Just sharing you my try in screenshots below for the same scenario,
Bot Builder:
image

Conversation & JSON:
image

ML:
image

This is what I have done.

Thanks
Ashwin

@ashwing2 Can you please share your bot with koresupport@kore.com for further analysis?

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.

image

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.

Kr,
Subbu

HI @swathi.vadlamani

I had shared my export branch through the mail ID you had shared with me. Any luck on what it was?

Thanks,

Ashwin

Ashwin,

What is the name of the bot?

Thanks
Swathi

Hi Swathi,

Its trailBot and intent name is Train Intent

Thanks
Ashwin

@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.

Thanks
Swathi

Hi @swathi.vadlamani,

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.

Thanks

Ashwin

@ashwing2 give us sometime. We will take a look at it and will get back at our earliest!

Thanks
Swathi