When a user converses with travel bot for booking his/her journey (maybe flight/train/bus), the bot identifies source and destination precisely if user query mentions source location as former and destination location as latter.
For instance, Book me a flight from Chennai to Bangalore.
Here, bot identifies locations accurately. Chennai is identified as source location since the location occurs first in user query and Bangalore is identified as the destination since it is the second location entity in the query.

But, if a user enters a query “Book me a flight to Bangalore from Chennai.”
It fails to identify the right source and destination since bot considers the first occurrence of location as source and interprets Bangalore as source location, instead of “destination” and Chennai as the destination location instead of “source”.

The above concern can be handled by building a custom model. The model has to be trained with sample documents to identify the right source and destination locations using Watson Knowledge Studio (WKS) which can then be deployed to Natural Language Understanding (NLU) and integrated with chatbot using Watson Assistant & IBM Cloud Functions. Read detailed solution for this problem statement here->https://github.com/IBMDevConnect/travel-identify-source-destination

This write-up is co-authored by Rajesh Gudikoti.

2 comments on"Identify location entities accurately in chatbot using Watson Knowledge Studio, NLU & Watson Assistant"

  1. Could anyone help to write the NLU code for extracting the conversation entity?
    Use case: We have setup a chatbot using watson conversation and updated the entities and response nodes.Need to integrate the watson NLU service to analyse the typed text and pass to watson entity

  2. Mateus Petrolli August 08, 2018

    Hi, Riya,

    Nice post. I work with Watson Assistant to build custom chatbots for customers in Brazil and I’m having a similar problem. My question is: is there any other way to resolve this issue without using WKS and NLU? I mean.. only using Watson Assistant with entities or regular expressions. I’ve been really stuck with this problem and can’t find a solution. I would be really glad if you could give me any tip.

    Thanks in advance!

Join The Discussion

Your email address will not be published. Required fields are marked *