PubNub BLOCKS: Streaming Data Enhanced with Watson

If you’ve had to deal with managing streaming data, maybe you’ve heard of PubNub. Now it’s easy to add Watson-powered machine intelligence to those streams with BLOCKS, a feature of the PubNub Data Stream Network (DSN) that makes the network programmable. Using BLOCKS, developers can easily deploy functions on the PubNub network to modify messages without the need to manage their own infrastructure.

In a new episode of the Building with Watson webinar series, Josh Marinacci, Head of Developer Relations at PubNub demonstrates how he used the Watson Conversation PubNub BLOCK to build a geology-themed chatbot called Mr. Rockbot.

When you’re building a chatbot, you need to remember that a chatbot involves constant communication between the user and your bot. To tie these elements together, you’ll need a real-time, low-latency and high security infrastructure. The PubNub programmable network is designed for developing real-time applications like chatbots. It’s like a global Content Delivery Network (CDN), but for the streaming web (also known as a Data Stream Network or DSN). While a CDN is designed to serve static content, you can use a DSN like PubNub to conduct real-time communication.

A chatbot may need to interact with other platform proxies and access web services that provide the knowledge the chatbot needs to function successfully. Chatbots also require some level of artificial intelligence that can range from a phone tree, to full natural language processing or a rich neural net for the back-end.

Creating the example chatbot

Mr. Rockbot, the geology-themed chatbot example in the webinar demonstration, uses a serverless infrastructure and a number of third-party services. The client can be a phone or webpage. It then talks to the real-time network provider (PubNub) and computes in the network’s serverless compute system (PubNub BLOCKS). Here’s how the process works with Watson:

The message goes to the network compute block, which uses the IBM Watson Conversation API to add natural language processing insights to the input text.

You train the Conversation API to allow it to identify relevant entities and intents. Intents are possible chatbot actions and entities are targets of an intent, such as questions the user might ask.

After you have entities and intents set up, you can then create dialogs, which are the workflows a user can follow. Using dialogs, you can specify what the bot actually says to the user in different circumstances.

After you teach Watson Conversation, you can call the API from your serverless code using a simple HTTP POST.

Archives

We’ll be announcing a number of changes to the Watson Visual Recognition service at Think 2018, IBM’s flagship conference, on March 19-22. These updates will include new feature capabilities, developer tools and improvements to user experience.

While chatbots continue to grow in popularity, businesses often overlook important issues related to morals and ethics of chatbots and AI. Customers need to know when they are communicating with a machine, and that brands will protect their privacy and data in today’s interconnected world.

We're excited to announce new changes to the Watson Tone Analyzer service that reflect user feedback. Three key changes include removing social tones, combining anger and disgust tones and outputting only dominant tones for text. These changes are active as of September 25. Learn more.