Cloudkibo / ChatBot

AI Chat Bot
0 stars 1 forks source link

Urgent: Review ChatBot requirements documents and create a high-level design #1

Open jekram opened 7 years ago

jekram commented 7 years ago

Review ChatBot requirements documents and create a high-level design CHATBOT.docx

jekram commented 7 years ago

Please review this. This is quite sophisticated but will give a good reference model.

http://kasisto.com/kai-banking/on-messaging/ http://kasisto.com/kai-banking/on-mobile/

sojharo commented 7 years ago

Yes Sir.

sojharo commented 7 years ago

I have reviewed Kasisto. This is very sophisticated and complex but it is little bit similar to the chat bot requirement that customer has given. Customer wants bot on specific pages and specific places on their website. The Kasisto wants to have a complete bot interface to customers instead of buttons and menus on website or app. Bot will let the user ask what he wants and give the information back. User will not have to travel the mobile app or website in order to find specific information. According to kasisto, the user will just ask bot to do the banking transactions and user will not need to go to the page and fill forms to do the transaction.

In our requirement document, user has asked for basically three types of bots i.e. three widgets which will be on the customer's website. Then the customer has asked for a separate dashboard (portal, which they are referring to as 'back office'). In that dashboard, the agents will feed the questions and responses to each bot. The robot should be intelligent enough to understand a different variant of a same question. Agents might give more than one answer to the question and then will give the priority to answers.

From my understanding, we can enhance the kiboengage dashboard and create few more widgets there. On other hand, we can also treat it as a separate project. The main thing to learn would be how to use MS bot framework to make robot learn on the data provided by agents on dashboard. Next, I am going to study the framework as Zarmeen requested in the email. After reading and understanding that, we would be able to create design document. This is the initial analysis.

sojharo commented 7 years ago

I have looked into Azure MS bot framework. Zarmeen has found one open source solution for natural language processing which can be used as alternative to MS bots. Wit solution, that zarmeen has found, is very much suitable to our customer needs. Zarmeen will discuss more on this here. Tomorrow, we would discuss and create a design document.

zarmeen92 commented 7 years ago

Task update: Reviewed MS Chat Bot framework. In the customer requirement document, it was written that at the Back office, User will create expected question and bot responses. The AI part needs to handle variation in user queries

For handling query variations, we can use Microsoft LUIS service (paid) or another opensource platform Wit.AI https://wit.ai/docs.

I studied Wit AI. But Wit AI requires to create expected questions and bot responses in its own dashboard. It does not offer API service which can enable us to create user questions and answers in our own dashboard. Someone has also opened issue regarding this on their github https://github.com/wit-ai/wit/issues/208

zarmeen92 commented 7 years ago

I found another AI based API for Language understanding https://api.ai/ I need to explore it more in detail. Initial investigation reveals that they provide endpoints through which we can pass User submitted queries to API.AI for training.

jekram commented 7 years ago

Zarmeen & Sojharo

Very good initial analysis. Let me review some of the links that you have provided.

AI is a large emerging Technology so it would be fun and chellenging.

In this case we cannot get ahead without leveraging big players like Google or Microsoft.

API.ai is a very good platform and it has been aquired by Google I think.

Once we understand their requirements and the solutions available we can propose things in phases.

Kaistio is quite sofistigated. It give us a reference model on how to think about it in the long run.

I am not sure if we need to integrated with KiboEngage in phase 1. Let me think about it more. It will be nice to handoff to a live agent when chat it cannot resolve the issue. We should think about it as a separate product with an API integration to Kibochat.

zarmeen92 commented 7 years ago

Sir I would suggest building Chat Bot as a separate product in initial phase keeping same technology stack i.e React + Node. Merging it with KiboEngage in a later stage will be easier. But initially, I would suggest to keep it as an independent product.

jekram commented 7 years ago

@zarmeen92

agree 110% "Sir I would suggest building Chat Bot as a separate product in initial phase keeping same technology stack i.e React + Node. Merging it with KiboEngage in a later stage will be easier. But initially, I would suggest to keep it as an independent product."

jekram commented 7 years ago

Few questions:

API.AI

  1. It gives me the option of hosting on their platform and on my server. Correct?

  2. It looks like they do not support Arabic? Is their a work around? If this is available in 6 months then it may be acceptable other wise it may create an issue. I will check with them on what is their acceptable timing for Arabic.

  3. Who retrains the Chatbot on the API.AI? I am assuming it would be us. So we deploy and keep retraining until it gets to x%? Can the customer also retrain it?

  4. If we are running API.AI can we private label it so it does not show Google or API.AI?

jekram commented 7 years ago

Similar question on Microsoft

Microsoft Bot Frame Work

https://dev.botframework.com/

  1. It gives me the option of hosting on their platform and on my server. Correct?

  2. Dose Microsoft Luis and ChatBot supports Arabic? I could not find it. Is there a work around? https://www.luis.ai/home/index

  3. Who retrains the Chatbot? I am assuming it would be us. So we deploy and keep retraining until it gets to x%? Can the customer also retrain it?

  4. If we are running can we private label it so it does not show Microsoft?

zarmeen92 commented 7 years ago

Regarding your questions on API.AI: API.AI

It gives me the option of hosting on their platform and on my server. Correct? Yes sir. We can access the APIs provided using web hook configured on our own server

It looks like they do not support Arabic? Is their a work around? If this is available in 6 months then it may be acceptable other wise it may create an issue. I will check with them on what is their acceptable timing for Arabic. Yes sir Arabic is not yet supported. These languages are currently supported https://docs.api.ai/docs/languages

We can use any other Translator API (provided by Google, Microsoft). Before making call to API.AI we can use any translator API to translate input text from any other language to English language. Then before sending BOT's reposnse to customer, we can call translator API to translate from English to input language. In this way, we need to train our model in English language only. However, this requires evaluation of accuracy provided by translator API. I checked their pricings https://cloud.google.com/translate/pricing https://azure.microsoft.com/en-us/pricing/details/cognitive-services/translator-text-api/

Who retrains the Chatbot on the API.AI? I am assuming it would be us. So we deploy and keep retraining until it gets to x%? Can the customer also retrain it? Yes sir we will retrain the Chat BOT, considering the requirements the BOT will learn from the intents and contexts and expected questions that the customer will create through our Dashboard.

If we are running API.AI can we private label it so it does not show Google or API.AI? Yes sir there is a Public/Private option in API.AI The BOTs (called as Concept Agents) if set to Private will not be visible to any other API.AI user. https://docs.api.ai/docs/concept-agents

zarmeen92 commented 7 years ago

It gives me the option of hosting on their platform and on my server. Correct? Yes sir. The Chat bot will reside on Azure. But the web application server can be hosted anywhere. The Chatbot will be connected to web app through Direct Channel (REST API)

Dose Microsoft Luis and ChatBot supports Arabic? I could not find it. Is there a work around? https://www.luis.ai/home/index

Yes sir. Microsoft Translator API which is a part of Cortana Intelligence Suite (by microsoft), supports Arabic https://www.microsoft.com/en-us/translator/languages.aspx LUIS does not directly understand ARABIC as mentioned in supported Languages https://www.microsoft.com/cognitive-services/en-us/luis-api/documentation/home#supported-languages But we can call Translator API to translate text to English before passing it to LUIS

Who retrains the Chatbot? I am assuming it would be us. So we deploy and keep retraining until it gets to x%? Can the customer also retrain it? Yes sir our customer will provide us data (expected questions and responses) through our Dashboard. We can then pass this to LUIS through API to build model.

If we are running can we private label it so it does not show Microsoft? Sir does this question means to hide chat bot from the list of chatbots available in BOT Directory of Microsoft? As mentioned here https://docs.botframework.com/en-us/faq/#do-i-have-to-publish-my-bot-to-the-bot-directory-in-order-for-my-bot-to-be-available-to-users we dont need to publish our bot on BOT Directory.

jekram commented 7 years ago

How do we meed this requirement?
Can we call the API for API.AI and Microsoft Bot or we have to expose them to API.AI and Microsoft Bot. They may want to maintain the ongoing Bot them self.

Back Office: The back office is the most important aspect of the Chatbot. • A quick and simple interface • User should be able to feed the specific process steps and responses e.g. steps and process for Savings Account Application. • User should be able to feed responses for the expected query • The AI should be able to understand the variance in the query and understand the query for a proper response • User should be able to teach the variances in queries and the bot should remember those. • User should be able to view all queries and their corresponding responses • User should be able to feed, delete and link the best possible response to the query • There could be two or more responses to a query. In the back office the user should be able to define the priority of the relevant responses. • Users should be able to pull reports on demand and upon defined intervals. • Access controls managed through back office – Maker – Checker for changes.

zarmeen92 commented 7 years ago

Yes sir we dropped the idea of using Wit.AI (though being popular among opensource community) does not support API call yet. API.AI and Microsoft BOT both can be called using API. So our customer actually wants to create questions and responses of BOT by themselves using our Dashboard. At the backend we will submit the queries and bot responses to API.AI or bot framework using their REST API endpoint

jekram commented 7 years ago

Q: People develop Bot only in one language and use translations server for other language for input and output? It probably dose not make sense to have Chatbot trained in multiple languages. Correct?

zarmeen92 commented 7 years ago

yes sir.

jekram commented 7 years ago

Q. I am assuming that both API.AI or Microsoft chatbot has capabilities to upload FAQ and other data and parse and use it?

sojharo commented 7 years ago

We analysed and discussed the project from solution point of view and added project structure in the document. Also we defined how the bot will learn. We came up with following questions which we think we should get clarification from customer about:

https://docs.google.com/document/d/1In4DIA31CDGbwemLTBP62ZZNUnLxvb0pdgpPBfM7s0c/edit#

We also discussed what might be limitations for us from API.AI. Here are some points:

jekram commented 7 years ago

Thanks. Let me review and get back

jekram commented 7 years ago

Please see the screen shot below. Does Facebook provides API so we can push a message from the "Messanger" to the customer.

This is pushed to me on an automated basis by CNN bot. So in this case I am not going to the Bot but CNN Bot is using Messanger to ping me.

screen shot 2017-04-02 at 8 47 41 pm
jekram commented 7 years ago

In API.AI we would train the Bot until it archives x% of success. This will be done in an iterative process. Now let's assume the customer also has thousands of Knowledge Bases articles is there any way that API.AI can leverage it?

I have reviewed the document and have put my comments there.

jekram commented 7 years ago

Pricing

API.AI is free https://api.ai/pricing/

jekram commented 7 years ago

We should think about in our regular chat in KiboEngage between agent and customer. The conversation is listened by the BotChat and the BotChat provides the assistance (response) to the agent and then agent can either send it as is or over ride it. This way the agent dose not have to type the mundane answer. The agent should be able to turn or or off the ChatBot help. This is for the future but not in v1. Our design should be such so we can add this later.

jekram commented 7 years ago

This is a follow-up to the question we had today.

  1. Let's visit if we should have our own server or not. I would not do it until there is a compelling case.

  2. Please investigate what data is kept is API.AI on the usage side (ask it on the forum).

sojharo commented 7 years ago

I have responded to comments in the document. I went through the documentations and forum to understand more here.

  1. We would not have our own database and we would rely on the API.AI rest endpoints to get the data, however, we would have a dashboard where agent would be able to give training data and we would send that to API.AI.

  2. Many people have asked this question but there is no reply on forum looks like nobody is sure about this. From the following diagram, it seems that it do stores some data to do action in response to any query:

screen shot 2017-04-07 at 1 38 41 am

https://discuss.api.ai/t/backend-data-stored-in-api-ai/5858

https://discuss.api.ai/t/back-end-data-is-store-where/5018

3. In API.AI we would train the Bot until it archives x% of success. This will be done in an iterative process. Now let's assume the customer also has thousands of Knowledge Bases articles is there any way that API.AI can leverage it?

Yes, it is possible, we can do this if we have webhook. Please see the detailed answer and code here.

https://discuss.api.ai/t/how-do-i-connect-my-database-to-api-ai/3269

zarmeen92 commented 7 years ago

@sojharo in response to your answer to question In API.AI we would train the Bot until it archives x% of success. This will be done in an iterative process. Now let's assume the customer also has thousands of Knowledge Bases articles is there any way that API.AI can leverage it?

Connecting the API to our database containing our knowledge base wont add intelligence to bot i.e the bot wont be able to answer query if there is a variance in query.

jekram commented 7 years ago

@zarmeen92 I thought Microsoft had the technology to import the FAQ into their Bot rules engine? Can you send the link

jekram commented 7 years ago

@zarmeen92
https://qnamaker.ai/ Is this the one?

zarmeen92 commented 7 years ago

yes sir

jekram commented 7 years ago

@zarmeen92

Please watch this video https://qnamaker.ai/Documentation/Quickstart

It gives a good summary on this on how this works. Q: Let's assume we have 100 FAQ's it looks like this tool will create the intent and the response and probably not 100% accurate. On API.AI if have to manually enter the same FAQ what the effort would be ?

Q: They have this play back. Dose the API.AI also has the playback to correct errors?