Showing posts with label chatbot. Show all posts
Showing posts with label chatbot. Show all posts

Friday, September 3, 2021

Serverless Twitter Bot using IBM Cloud

A Twitterbot at work
Some months ago, I discussed cron-like scheduling on IBM Cloud. One of my personal use cases is to send out tweets. In this post, I am going to look into details, into how I implemented a Twitter bot, deployed it to IBM Cloud Code Engine, and how it is managed.

Friday, February 19, 2021

Great chatbots in no time

Chatbots take over customer service
Last week, I was coach again at a chatbot hackathon. Chatbots have been around for a long time and I have blogged about tips & tricks for developing chatbots and resources many times. With Covid-19 transforming the world towards more digitalization and self-service, chatbot deployments grew significantly. In this post, I want to look back at the hackathon and share some wisdom for building great chatbots.

Wednesday, June 10, 2020

Hands-on security: Share resources on IBM Cloud

Architecture: Database-driven Slackbot
Architecture: Database-driven Slackbot
One of my favorite IBM Cloud solution tutorials is about
building a database-driven Slackbot. It is a great example for integrating enterprise resources with an AI-backed user interface and for utilizing serverless technology for the glue. Once you have created the chatbot, the next step is to share this project with co-workers. But how do you proceed? In this blog, I am going to discuss how to set up privileges for team members, so that they can access the project resources in different roles. Learn about IBM Cloud IAM, Access Groups and Policies. Get ready for some hands-on experience with IBM Cloud security.

Thursday, December 12, 2019

asd765 cloud 87ohhlj db2 askh security xbas chatbot

If you came here and wondered about the blog title, then read on. I plan to write about a couple of mixed, seemingly random topics. Why not express that in today's blog title...? :) It is almost end of the year and here is some news I wanted to share with you before the holidays.

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.

Wednesday, April 24, 2019

Updated tutorial: Database-driven chatbot

If you want to build a chatbot that gets its content from a database, there is a good news. The existing tutorial “Build a database-driven Slackbot” was just updated to adapt to latest features of IBM Watson Assistant. First, define a skill that reaches out to a database service like Db2. Thereafter, use the built-in integrations to easily tie in the assistant with Slack, Facebook Messenger, embed the chatbot into your own application or use the WordPress plugin.

Architecture of database-driven chatbot

Tuesday, November 20, 2018

IBM Cloud: The 5 minute barebone news chatbot

News chatbot with Watson Assistant
Do you have 5 minutes and want to build a really simple news chatbot? I tried this yesterday with IBM Cloud and the Watson Assistant and Discovery services. The result is on GitHub in my repository watson-chatbot-discovery-news. It utilizes my Watson Conversation Tool as user interface and for testing. Here are the details.

Wednesday, October 31, 2018

IBM Watson Assistant: Chatbot tool now supports testing client actions

Test your chatbot
Are you (already) using the Watson Conversation Tool I wrote? There is good news because I added support for testing client side actions. As you might know, IBM Watson Assistant features both client and server side actions to enhance responses with data from external services. In a blog post from this Summer, I wrote that I added support for testing server side actions. They are implemented using IBM Cloud Functions. Client actions are, well, executed on the application side. Read on to learn how to test them.

Friday, September 21, 2018

More tricks for building chatbots with IBM Watson Assistant

Have you heard? New tips and tricks!
If you are building chatbots with IBM Watson Assistant (Conversation), then you might have already stumbled over my collection of tips and tricks or my command line tool for testing chatbots. Earlier today I updated the tips and tricks and added section on collection projection. If you know SQL and relational algebra, then you know the concept of projection. The same can be applied to JSON data and used within Watson Assistant dialogs.

Wednesday, July 18, 2018

Now on GitHub: Understand and build chatbots the easy way

Recently, I posted about a then upcoming Meetup and my talk about chatbots. Here is a quick follow-up. To compile stuff for that presentation and some other upcoming talks, I created a GitHub repository "chatbot-talk2018". I has lots of links to get started and to deepen understanding around chatbot technology. Moreover, it contains a presentation in Markdown for GitPitch for you to use and extend. And finally, I wrote this brief introduction to some chatbot terms or concepts:
  • Intents are what the user aims for, the desired action or result of the interaction. An intent can be to retrieve a weather report.
  • Entities are (real or virtual) subjects or objects. For the example of the weather report, entities can be the city or country, e.g., Friedrichshafen in Germany, or date and time information such as "today afternoon".
  • A dialog, dialog flow or dialog tree is used to structure the interaction. Typically, an interaction lasts longer than the user providing input and the chatbot returning a single answer. A dialog can be highly complex with several levels, subbranches, (directed) links between dialog nodes and more.
    For a weather chatbot, a dialog could be constructed that, after a greeting, asks the user about the location and time for a weather report, then asks if additional information, such as a weather outlook for the next few days, is needed.
  • Slots are supported by several chatbot systems. Slots are used to specify the data items that need to be specified in order to produce the result of an intent. To return a weather report, e.g., at least the location and maybe the date or time is needed.
  • Context is state information that is carried from step to step for a specific user interaction. The context typically stores the information that is already gathered as input (see "slot"), result-related data or metadata, or general chat information, e.g., the user name.
If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.


Monday, July 16, 2018

Extended: Manage and interact with Watson Assistant from the command line

Remember my blog posts about how to manage Watson Assistant from the command line and how to test context for a conversation? Well, that tool did not work well for server actions which I used in this tutorial on building database-driven Slackbot. The good news is that I found time to extend my command line Watson Conversation Tool to support credentials for IBM Cloud Functions.

With the recent update to the tool there are two new features:
  1. Use the option "-outputonly" with the "-dialog" option to only print the output text, not the entire JSON response object. I introduced it to be able to demo dialog flows from the command line. Not everybody needs all the metadata for every dialog turn. Here is how it looks like when in action:
  2. Chatbot dialog on the command line
  3. In order to test dialog server actions, I need to provide the credentials for IBM Cloud Functions (ICF) in a private context variable. I recently blogged about how to enable the Watson botkit middleware for those server actions. For my tool, just provide the ICF key token as part of the configuration file. A sample is part of the GitHub repository.
For feature requests, defects or suggestions, open an issue or a pull request against the repository. If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.

Tuesday, July 3, 2018

Learn about chatbots at upcoming IBM Cloud Meetup

Learn how to chat at the Meetup
Want to quickly and easily build a chatbot, integrate it with Slack, Facebook Messenger or other platforms? Connect the bot with a database? Join me at the IBM Cloud Developers in Stuttgart Meetup on July 17th for an introduction, hands-on session and discussion. And there are drinks, too (I have been promised).

If you followed my blog and the chatbot-related posts, you probably already know what to expect. First, I am going to introduce you to chat / conversation services and the standard terms. Then, we jointly will take a look at the IBM Cloud solution tutorials and the chatbot-related resources. I plan to finish with a demo showing how to build a chatbot from scratch in few minutes and to integrate it into Slack. If you are close to Stuttgart, join me on July 17th for the chatbot session.

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

Tuesday, June 26, 2018

Monday, June 18, 2018

Use BotKit Middleware to create Watson-powered database interface

Chatbot anyone?
Few months back, I introduced you to a tutorial for a database-drive Slackbot. In the tutorial I used the Conversation connector to hook up IBM Watson Assistant to Slack as a chatbot. Did you know that you can reuse the code and utilize BotKit and IBM Watson BotKit Middleware to implement a Db2 interface via Slack, Facebook Messenger, Cisco Webex Teams and others?

Tuesday, February 27, 2018

Security Details: Serverless database access within IBM Watson Conversation service

Slackbot Architecture
Last week, I introduced you to a new tutorial for a database-driven Slackbot. Today, I am going to discuss details of how the IBM Watson Conversation service is accessing a Db2 Warehouse service from within a dialog. It uses a serverless setup with IBM Cloud Functions. All the necessary credentials to execute the code and to access the Db2 database are automatically bound. Hence, the function code and the dialog don't need any account-specific changes and are generic.

Monday, February 19, 2018

New tutorial: Db2-driven Slackbot

Ever wanted to build a Slackbot, a chatbot integrated into Slack, on your own? I am going to show you how easy it is to integrate Slack or Facebook Messenger with the IBM Watson Conversation service. As a bonus, the bot is going to access a Db2 database to store and retrieve data. The solution is based on IBM Cloud Functions and entirely serverless
Slackbot Architecture
.

Thursday, February 15, 2018

Easy Database Setup the Serverless Way

Serverless Slackbot with Db2
A tutorial I wrote, featuring a database-backed Slack chatbot, is now live. It uses Db2 as database system to store event data. The client accessing the database is written in Node.js and is implement with IBM Cloud Functions in a serverless way. During the development of that tutorial I faced the question on how to perform the database setup. Should I guide users through the user interface to create a table and insert data? Should they install a Db2 client and execute a script locally? I solved the problem in a serverless fashion. Here are the details.


Tuesday, February 6, 2018

Chatbots: Some tricks with slots in IBM Watson Conversation

As you might remember, I have been using the IBM Watson Conversation service and DB2. My goal was to write a database-driven Slackbot, a Slack app that serves as chat interface to data stored in Db2. I will write more about that entire Slackbot soon, but today I wanted to share some chatbot tricks I learned. How to gather input data, perform checks and clean up the processing environment.

Slots

With my chatbot interface to Db2 I want to both query the database and insert new records. Thus, I need to collect input data of various kind. The Conversation service has a neat feature named input slots that simplifies that process. Within a dialog node (a logical step within the chat flow) I can specify a list of items the Conversation service should check for. I can tell in which variable to save that input and what question to ask if that data was not provided yet. Optional slots, i.e., optional data, can be enabled.

Tuesday, December 12, 2017

News on IBM Cloud and Db2 - December 2017 Edition

Another month and a lot of news
In the middle of November I reported about significant changes to Bluemix and IBM's cloud offerings. A month has passed and I want to give you an update to some news I am excited about.

I try to regularly read over the "What's in IBM Cloud" section in the IBM Cloud documentation. There were two significant announcements.
  • The new Resource Groups allow simpler management of all what is in your account (a.k.a. "resources"). You can now group apps, services, virtual machines, Kubernetes-based container services and more and easily assign access privileges.
  • With the introduction of the Resource Groups also came the IBM Cloud Identity and Access Management. It facilitates fine-grained access control utilizing API keys, service IDs and more.
The two above should keep you busy, but there is more. If you are a Db2 afficionado like I, then you probably have subscribed to the "What's New in IBM Db2 Warehouse on Cloud, IBM Db2 Warehouse, and IBM Db2 on Cloud". Did you know that MySQL and PostgreSQL are now available in the web console as data sources for federation? That makes it easy to access data coming from a LAMP stack.

As you might know, I am using and write about the IBM Watson Conversation service. What I liked from their "Release Notes" is a new beta feature to directly call actions from within a dialog node. IBM Cloud Functions are supported. I put that to a test and wrote a Slack bot backed by Watson Conversation that directly queries a Db2 database. I need to beautify the code and write it down (and submit it to IDUG).

I wrote a tutorial about how to generate, access and analyze application logs on IBM Cloud. You can find it in the Solution Tutorials as part of the IBM Cloud documentation.

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

Thursday, July 13, 2017

Chatbots: Testing Contexts

Watson Conversation Tool in action
Some weeks ago I blogged about a tool I wrote for the IBM Watson Conversation Service (WCS). It allows you to manage your conversation workspaces from the command line and to test dialogs. Yesterday, I added a new feature to it that helps me (and you) to examine and modify the dialog context. Here is how you can test contexts with my watson conversation tool.