Zephyrnet Logo

Create a banking chatbot

Date:

This article is part of the Watson Assistant learning path. See the Watson Assistant page for more information on features and getting started.

Summary

Built for developers familiar with JavaScript and Node.js interested in making a web UI chatbot with artificial intelligence abilities, this code pattern uses the IBM Watson Node.js SDK to include conversation interaction, anger detection, natural language understanding, and answer discovery. Answers are discovered from a collection of FAQ documents. Built as a fictional financial institution, this app calls out to simple banking services code as an example of how to include external business data in a conversation response.

Description

In this pattern, you create a chatbot using Node.js and IBM Watson Assistant. The flow is enhanced by using Watson Natural Language Understanding to identify entities and Watson Tone Analyzer to detect customer emotions. For FAQs, a call to the Watson Discovery service uses passage retrieval to pull answers from a collection of documents.

When you complete this pattern, you will understand how to:

  • Create a chatbot that converses through a web UI using Watson Assistant and Node.js
  • Use Watson Discovery with passage retrieval to find answers in FAQ documents
  • Use Watson Tone Analyzer to detect emotion in a conversation
  • Identify entities with Watson Natural Language Understanding

The code pattern lets you choose how to deploy the application, using IBM Cloud or IBM Cloud Pak for Data.

Flow

create banking chatbot flow chart

  1. The FAQ documents are added to the Watson Discovery collection.
  2. The user interacts with a chatbot through the app UI.
  3. User input is processed with Tone Analyzer to detect anger. An anger score is added to the context.
  4. User input is processed with Natural Language Understanding. The context is enriched with detected entities and keywords (for example, a location).
  5. The input and enriched context is sent to Watson Assistant, which recognizes intent, entities, and dialog paths. It responds with a reply, an action, or both.
  6. Optionally, a requested action is performed by the app. This action might include looking up additional information from bank services to append to the reply or using Discovery to reply with an answer from the FAQ documents.

Instructions

Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README.md file.

Conclusion

This code pattern showed how you can use the IBM Watson Node.js SDK to include conversation interaction, anger detection, natural language understanding, and answer discovery in a banking chatbot. The code pattern is part of the Watson Assistant learning path. To continue the learning and learn about more Watson Assistant features, take a look at the next code pattern, Create a web-based chatbot with voice input and output.

Saurav Raiguru

Mark Sturdevant

Source: https://developer.ibm.com/patterns/create-cognitive-banking-chatbot/

spot_img

Latest Intelligence

spot_img

Chat with us

Hi there! How can I help you?