GithubHelp home page GithubHelp logo

alexxnica / watson-banking-chatbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm/watson-banking-chatbot

0.0 0.0 0.0 10.09 MB

**WORK IN PROGRESS**: chatbot for banking that uses watson conversation, written in node

License: Apache License 2.0

JavaScript 73.59% CSS 12.68% HTML 13.74%

watson-banking-chatbot's Introduction

Build Status

Multi - Domain Enterprise Digital Assistant

In this developer journey we will create a Watson Conversation, NLU & RnR based chatbot for multiple domains. that provides users with:

  • Answers important FAQs queries from the multiple domains such as across business lines of Loans, Account Opening, Market Place & Digital Banking of Banking industry.
  • Also the chatbot solves transactional queries such as view transactions, balances, pay utility bills etc.

When the reader has completed this journey, they will understand how to:

  • Create a chatbot with dialogs using Watson Conversation on NodeJS platform
  • Learn how to best create Retrieve n Rank collection for long tail questions.
  • Get enhanced natural language capability through NLU API
  • Understand the Banking domain for creating a chatbot & using Conversation and Retrieve n Rank in sync.

Technical Architecture - Enterprise Digital Assistant

Flow

  • The user writes a query about a service to the chatbot
  • The orchestrator accepts query, saves the user context & starts a REST call with the Cognitive APIs.
  • Depending on the nature of the query (long /Short tail), the answer is provided by either Watson Conversation API or Watson Retrieve and Rank
  • Further to answering user queries, the agent can also be connected to Third party APIs such as India Stack(Aadhaar) for authentication required for verifying identify, e-sign, purchases etc. ;language translation APIs for localization.
  • Orchestrator can be further exposed to enterprise systems such as CRM, warehouses, ERP etc. for contextual content.

Features

  • State & Context Management
  • Large Information retrieval
  • Personal Information Protection
  • Recommendation Engine
  • Enhanced Natural Language Understanding
  • Enterprise Integration

Included Components

  • Bluemix Watson Conversation
  • Bluemix Watson Retrieve n Rank
  • Bluemix Watson Tone Analyzer
  • Bluemix Watson Natural Language Understanding
  • Node JS Runtime

Deploy the App

NOTE: Perform steps 1-6 OR click the Deploy to Bluemix button to do it all at once!

Deploy to Bluemix

  1. Log in to your Bluemix account before deploying. If already logged in, then ignore this step.

  2. We can see that the app is ready to be deplyed, and we need to ensure that the App name, region, Organization, Space is valid before 'Deploy'.

  3. In Toolchain, the app is deployed. There are also option to edit code via eclipseIDE, git changes if required. Once deployed, the app can be viewed by clicking 'View app'.

  4. Wait for the deployment to complete, the following actions will be performed:

  • Creates the application.
  • Creates a Conversation and Retrieve & Rank service instance.

It is required to configure the Conversation and R-n-R service that is created. We can follow the next steps

  1. Configure Watson Conversation

Launch the Watson Conversation tool. Use the import icon button on the right

Find the local version of data/WCS/workspace-ConversationalBanking.json and select Import. Find the Workspace ID by clicking on the context menu of the new workspace and select View details.

Save this ID for later.

Optionally, to view the conversation dialog select the workspace and choose the Dialog tab, here's a snippet of the dialog:

  1. Configure Watson Retrieve and Rank

Launch the Watson retrieve-and-rank tool. Create a new data cluster.

Save this CLUSTER_ID for later.

Seed the content by firstly creating New Collection, and add the file documents and questions present under data/Retrieve&Rank/

Save this COLLECTION_NAME for later.

Note: Ensure that you have also created a Watson Document Conversion service as well. Since, Watson RnR uses document conversion at the backend.

  1. Once the watson services are configured, Go to View App -> Runtime -> Environment Variables -> User Defined, add the IDs saved above and save it.

The application and services have been successfully deployed, and you are now ready to use the application.

Steps

  1. Clone the repo
  2. Create Watson services on IBM Bluemix
  3. Configure Watson Conversation
  4. Configure Watson Retrieve and Rank
  5. Run the application

1. Clone the repo

Clone the ConversationalBanking locally. In a terminal, run:

$ git clone https://github.ibm.com/IBMDigital/ConversationalBanking

We’ll be using the file data/WCS/workspace-ConversationalBanking.json and the folder data/WCS/

2. Create Watson services on IBM Bluemix

Create the following services:

Note: Ensure that you have logged into Bluemix and are allowed to use these services.

3. Configure Watson Conversation

Launch the Watson Conversation tool. Use the import icon button on the right

Find the local version of data/WCS/workspace-ConversationalBanking.json and select Import. Find the Workspace ID by clicking on the context menu of the new workspace and select View details. Save this ID for later.

Optionally, to view the conversation dialog select the workspace and choose the Dialog tab, here's a snippet of the dialog:

4. Configure Watson Retrieve and Rank

Launch the Watson retrieve-and-rank tool. Create a new data cluster.

Seed the content by firstly creating New Collection, and add the file documents and questions present under data/Retrieve&Rank/

Note: Ensure that you have also created a Watson Document Conversion service as well. Since, Watson RnR uses document conversion at the backend.

5. Run the application

If you used the Deploy to Bluemix button...

If you used Deploy to Bluemix, most of the setup is automatic to start using the App.

If you want to run it locally...

Otherwise as explained above:

  1. Clone the repo
  2. Instantiate/ Configure the above watson services
  3. Install NodeJS runtime or npm.
  4. Start the app and it can be used at localhost:3000

Note: server host can be changed as required in server.js

Troubleshooting tips

If you are using the IBM Jazz DevOps to deploy the app, you may see the following steps as required to deploy:

  1. Optional: If you are asked to choose an alias, enter a unique alias name and click create.

  2. Optional: If you are asked to choose an alias, verify your alias name and click continue.

  3. Name your app, and then select the Region, Organization and Space where the app will be deployed. Click 'DEPLOY'.

License

This sample code is licensed under Apache 2.0. Full license text is available in LICENSE.

Links

watson-banking-chatbot's People

Contributors

jacob7182 avatar markstur avatar sauravraiguru avatar stevemar avatar stevemart avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.