Entity Pattern - how to tune results

chatbots

(Robert Hedges) #1

I am building a bot to retrieve news articles. I have set up an Entity pattern * news, to extract the entity from the request. e.g. “can you get me Amazon news please” correctly identifies the intent as ‘get news’ and extracts the entity ‘Amazon’. So far so good, BUT when the user types ‘can you get me news articles?’ the Entity gets set to ‘can you get me’. How can I stop this happening?

Also, I follow the request with a response “here is your news on Amazon is there anything else I can help you with?” Is it possible to store the Intent so that when the user responds: ‘Microsoft please’ the bot will know the intent is still ‘get news’ and change the Entity.

thank you


(Subrahmanyam Donepudi) #2

Hi @robhedg ,
Reg:

A entity pattern like “can you get me * news?” extracts the word positioned at “*” in the user utterance.
In your case, you could have the pattern updated as mentioned or have the ML utterance “can you get me news articles?” trained for the bot.
If the ML utterance is trained, the bot identifies the utterance and utterance and would ask the entity value.
Please note that an utterance like “can you get me Amazon news please” can be added against ML and NER can be tagged against the word “Amazon”. This shows a similar behavior as well for intent identification and entity extraction based on the ML model training.

Reg:
Below is a configuration we could suggest to achieve your usecase.
Have a entity node with the message “here is your news on Amazon is there anything else I can help you with?” in your dialog for presenting the message to the user.
Have a condition to transition to a script node from the above entity node.
Override the value for the entity (Ex: the entity which collected “Amazon” previously ) from the script node and then transition it to the same service node to get the results.