This document introduces chatbots and their rise in popularity. It discusses how chatbots work through voice or text to simulate human conversations. It also outlines common consumer and business uses of chatbots, such as for customer service, ecommerce, and work assistants. The document dives into the typical architecture of chatbots, including how they use natural language understanding and dialog management to determine responses. It provides examples of how different technologies can be applied to key components like intent classification, entity extraction, and dialog flow.
6. A chatbot is a computer program
which conducts a conversation via
auditory or textual methods. Such
programs are often designed to
convincingly simulate how a human
would behave as a conversational
partner
One of the most complicated tasks
O.K. so this lecture is an intro for bots, we will focus on chatbots.
If you have questions you can try to stop me at any time.
So let’s get started.
אז מה זה בוטים? איזה סוגים קיימים? מה הבינה המלאכותית שקיימת מאחורה.
בוטים זה נושא שאני אוהב כי זאת דרך להכנס לעולם של בינה מאלכותית בלי להכנס להכנס לקוד פייתון או לקוד בכלל של דאטא ולהבין עקרונות
Intro about myself
יש פה תיאור רשמי אבל איך אני מגניב צ’טבוט? כמפתח קל להסתכל על צ’טבוט כפרונטאנד.
כמו שאנחנו
למה בכלל שנרצה לדבר עם בוט?
צורת השיחה הטבעית ביותר
אין צורך להוריד אפליקציה חדשה
אפשר לקצר קבלת מידע משמעותית
Everybody are talking about chatbots this days, how did this trend even started?
Opportunity - messaging is the mobile killer app.
Everybody are using it, and it is just getting more popular
כמה חלוקות שיעשו לכם סדר - הראשונה והפשוטה - בוטים בקול ובטקסט. המגמה היא שהם יהיו גם פה וגם פה
Many messaging platforms opened their gates for bot developers
The list here lacks of many more platforms, and we can see a new platform supporting bots every few weeks
I would first divide them to commercial bots and work bots, some bots are both - like travel bots.Webchat integrations, SMS, viber, vk (you might be familiar with it) and more…Changes - google assistant
Apart from normal messaging they also provide some GUI element such as buttons, cards, carousels, quick replies and more
to enhance the user experience
Voice and chat – in the future combined
מה קורה מהתחלה - אנחנו למשל מדברים עם הבוט של פיצה האט ושולחים לו הודעה שאנחנו רוצים להזמין 2 פיצות.
המידע הזה נשלח לשרתים של מסנג’ר ומשם אלינו.
תפקידים -
מידע unstructured-> structured
דיאלוג - מקבל את כל המידע וצריך לקבל החלטה מה עושים
How do we communicate with those messaging platforms?
Webook.
Start a new server, connect it to a webhook. You receive message events with the sender name, id, and the contents.
You will need to send back messages with the required information and the message contents back. Simple.
A WebHook is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST. A web application implementing WebHooks will POST a message to a URL when certain things happen.
How do we communicate with those messaging platforms?
Webook.
Start a new server, connect it to a webhook. You receive message events with the sender name, id, and the contents.
You will need to send back messages with the required information and the message contents back. Simple.
A WebHook is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST. A web application implementing WebHooks will POST a message to a URL when certain things happen.
In this point we can make a bot that get a message, lets say it looks for a specific word in the sentence and reply with a list of resturants to order from.
But this is not enough, because language is not that simple right?
NLU is a subtopic of NLP which is focused on the understanding of human language.
Examples for other NLP solutions - machine translation, questions answering, sentiment analysis
מה קורה מהתחלה - אנחנו למשל מדברים עם הבוט של פיצה האט ושולחים לו הודעה שאנחנו רוצים להזמין 2 פיצות.
המידע הזה נשלח לשרתים של מסנג’ר ומשם אלינו.
תפקידים -
מידע unstructured-> structured
דיאלוג - מקבל את כל המידע וצריך לקבל החלטה מה עושים
A WebHook is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST. A web application implementing WebHooks will POST a message to a URL when certain things happen.
Examples
First of all, we will try understand what the user ment – his intent
We will design a list of intents in our domain, and add also a few general smalltalk intents
We would like to interpret as much information that we can from what the user said
If the user asked something that has to do with time, like “today”, we would like the system to detect it correctly, and pass it to the bot in a nice datetime format
Platforms provide automatic entity detection for date, currency, number of items and more
But we can also add our own entities, for example in a food ordering bot we would like to detect what sort of cuisine the user asking for, so we will add an entity called “cusineType” and train it
We achieve this process by training
We can provide a tagged dataset of tagged sentences of entities and intents
And continuously train the bot while people are using it, correct or confirm his classifications
Let’s talk practical, what are the available services or how am I able to do it
There are few services for nlu that got acquired by big companies like wit.ai – fb, api.ai – google and those who was developed by other big companies such as watson of IBM and LUIS of MICROSOFT
if you don’t want to rely on an external service, there are few opensource solutions like rasa.ai or you can build one of your own with one of the machine learning libraries such as sklearn
Understanding the user's intent and extracting the entities are not enough, we are still missing a big part of the skills of a chatbots and it’s Conversation management
מה קורה מהתחלה - אנחנו למשל מדברים עם הבוט של פיצה האט ושולחים לו הודעה שאנחנו רוצים להזמין 2 פיצות.
המידע הזה נשלח לשרתים של מסנג’ר ומשם אלינו.
תפקידים -
מידע unstructured-> structured
דיאלוג - מקבל את כל המידע וצריך לקבל החלטה מה עושים
Asking help in the main menu, or while you are in the payment part - different context, different results.
Another example, the user ordered a pizza without any topping, and just before he confirms the order he is saying - you know what - add some olives on it. The bot should understand he should take the current order and add it.
We are doing this with waterfalls, keeping information about the last interaction and other ways
Data persistence or memory, is an important feature of bots. People expect the bot to remember facts, preferences and more about them.A good bot should collect information about the user and use it on the conversation - giving personalized results, dialogs and more
Also a bot also get some information about the user, like his gender, locale and more and should keep it and use it whenever he needs to.
מה קורה בכל מצב? איך בהתאם לקונטקסט ולסטייט נקפוץ ממקום משלב כלשהו בדיאלוג
To give a personal and real feeling of a good bot, the bot should generate randomized and personalized responses.
He can use the user’s profile, his preferences to change the response.
Also a good bot should have a well defiened personality that will be reflected in his responses
We are lucky enough to have many botframework for development, some of them are quite advanced and the most of them are open source.They help us with conversation management, integration with NLU, and multi channel support!!!
A chat bot can be deployed basically everywhere, a trending option is to deploy it on a serverless infrastructure because it being invoked only when a message being sent.
There are also some dedicated bot services, on azure and aws, and also on other platforms. But they are still not bringing any special value.