Knowledge-base

Take a look at the following conversation:

  • User: What is the cuisine of PastaBar?
  • Bot: PastaBar has an Italian cuisine.
  • User: Does it have wifi?
  • Bot: Yes.
  • User: Can you give me an address?

In the question “Does it have wifi?”, the user refers to “PastaBar” by the word “it”. If the NER detected “it” as the entity mention , the knowledge base action would resolve it to the last mentioned object in the conversation, “PastaBar”.

In the next input, the user refers indirectly to the object “PastaBar” instead of mentioning it explicitly. The knowledge base action would detect that the user wants to obtain the value of a specific attribute, in this case, the address. If no mention or object was detected by the NER, the action assumes the user is referring to the most recently mentioned object, “PastaBar”.

What if NER detects 2 entities in the previous query , to which the mention will get mapped

Hi Avinash,

It’s up to you and the design you choose.

In the first user utterance you would typically set a RestaurantName slot to PastaBar and until the user identifies another restaurant your actions and forms would assume they are referring to that restaurant. If you only want to allow one restaurant and the user specifies two or more in the first utterance, What is the cuisine of PastaBar and Bistro Turkuaz, your custom action or form could detect this and let them know you can only give them one. Or you could set a list slot and answer for both.

Greg