Friday, May 3, 2019

Your chatbot with Watson Discovery News

Some months back I introduced you to a barebone news chatbot. Today, with the updated tutorial to build a database-driven chatbot in place, I want to show you how to easily combine Watson Assistant with Watson Discovery. Watson Assistant already provides steps to deploy an integrated search skill which is based on Watson Discovery. My approach is similar to the database integration: Deploy a cloud function and invoke it from the dialog.


Add-on to tutorial

The tutorial on how to build a Db2-based chatbot leverages dialog actions to reach out to a database system and return the result in a bot response. The code for the news integration is a Python action deployed as IBM Cloud Functions. You bind the action to an existing Discovery service. That way, the code has access to the credentials and connect to the News collection.

With the code in place, you need to extend the skill from the tutorial and create an intent, an entity and two dialog nodes. Details are in the linked GitHub repository.

Once everything is in place, you can use the preview to test the news integration. Here is a screenshot of the rough output after a search for "bodensee".



If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.