UNIT-4.ppt
Document Details
Uploaded by Deleted User
Full Transcript
UNIT-4 BOT Technologies and Virtual Assistants Chatbot It is a type of software used to interact with humans in different languages through different mobile apps, websites, messages, etc. The standard form of the bot is “Build- Operate-Transfer”. Chabot’s are not goo...
UNIT-4 BOT Technologies and Virtual Assistants Chatbot It is a type of software used to interact with humans in different languages through different mobile apps, websites, messages, etc. The standard form of the bot is “Build- Operate-Transfer”. Chabot’s are not good for all-purpose chatting, because we have both advantages and disadvantages of using these. There are different names for that they are Smart bot, Conversational bot, Chatterbot, Interactive agent, Conversational AI, and Conversational interface. Most of these are kind of a message interface, instead of human answering bots will give reply to the customer queries. Some factors which motivate the people to use Chatbots are productivity, entertainment, social and relational factors, and curiosity. Some of the good bot’s are Crawler’s, Transactional bots, Informational bots, Entertainment bots, art bots, game bots, etc and bad bots are hackers, spammers, scrapers, impersonators, etc. What is a Chatbot? Chatbots are computer programs that interact with humans through textual or auditory means. Chatbots are developed using Natural Language Processing (NLP) algorithms that provide a framework for programming computers in order to process and analyze large amounts of natural language data. Chatbots are mainly deployed in customer service, HR, IT and marketing functions. Chatbots today are enabled by conversational AI, NLP, and machine learning, making them sophisticated enough to understand the ‘intent’ behind user queries and successfully simulate human-like conversation. Chatbots can, therefore, be used to handle simple and to an extent, complex tasks such as providing information, answering FAQ, sending instant acknowledgments, collecting user information, etc. What is a Virtual Assistant? Software programs that simulate the tasks of a personal assistant such as managing schedules, handling travel needs, booking appointments, sending reminders about events and so forth, are known as Virtual Assistants. Virtual Assistants are implemented with a strong focus on the end-user and are programmed to take inputs and perform tasks through verbal commands. Virtual Assistants have the ability to understand human speech and are supported by artificial neural networks that enable them to predict the intent of the user no matter how random the query. Virtual Assistants are AI-powered and are hence capable of learning the user’s preferences and habits over time, constantly evolving and getting smarter. They can understand natural language, recognize faces, identify objects, and communicate with other smart devices and software. Virtual Assistants are generally present in handheld devices such as a mobile phone (think iPhone’s Siri) and can be used to control the device and handle simple tasks like sending emails, make to-do lists etc. All these tasks can be executed by giving an appropriate verbal command to the Virtual Assistant. IBM Watson, Google Assistant, Cortana, Alexa and Siri are some of the well-known Virtual Assistants in the market. Difference Between Chatbots and Virtual Assistants 1. Intelligence Chatbots Virtual Assistants Virtual Assistants are more advanced in their capacity to They can answer only those interact. They are adopt in queries that they have been processing language and can programmed for and can fail if also understand the semantics the query is other than the of the commands. They can also ones they have learnt. Chatbots perceive the mood and cannot hold lengthy and emotions of the user. Unlike coherent interaction. They lose Chatbots, VAs can have a long the context of a conversation if conversation even after the interaction breaks. Chatbots breaking the flow. Complicated are not very proficient in tasks like finding navigation to processing languages due to places and making the limited bandwidth in their appointments at restaurants programming. 2. Design Chatbots Virtual Assistants Chatbots are built based Virtual Assistants are on models that provide powered by artificial an architecture on neural networks (ANNs) how to generate to continually learn responses. There are from historic inputs. several models that ANNs are used to govern the design of recognize, classify, Chatbots and predict and analyze the depending on the inputs of the user that purpose for which enable them to arrive at they’re used, relevant accurate results for the models are selected to user’s queries. build them. 3. Usage Chatbots Virtual Assistants Chatbot has limited scope in its use and is Virtual Assistants have a not suitable for wide range of scope in complex processes. It their usage and have serves as a great tool to the ability to carry out acquire information complex tasks like from customers. While interacting with people most Chatbots cannot on their own. Unlike continually learn, Chatbots, Virtual advancement in Assistants gain accuracy artificially learning is in their performance with gradually enabling use. 4. Programming Chatbots Virtual Assistants Chatbots do not possess Virtual Assistants lay emphasis proficient language on both Natural Language processing skills. Chatbots Processing (NLP) and have a structured dialogue Natural Language and are programmed with Understanding (NLU). Virtual specific replies to specific Assistants can also understand questions. Chatbots cannot slang used in colloquial respond to questions that are conversations. NLP gives Virtual complex and questions that are Assistants a human-like trait outside the purview of their with enhanced conversational program. ability than Chatbots. Types of chatbots Chatbots can be divided into 3 types based on the response-generation method: – Rule-based chatbots: Rule-based chatbots rely on if/then logic to generate responses based on predefined conditions and responses. These chatbots have limited customization capabilities but are reliable and are less likely to go off the rails. – AI-based chatbots: AI-enabled chatbots rely on NLP to scan users’ queries and recognize keywords to determine the right way to respond. Additionally, some AI-based chatbots self-improve by using users’ data as new training data in order to expand the knowledge database and improve their responses. – Hybrid chatbots: Hybrid chatbots rely both on rules and NLP to understand users and generate responses. These chatbots’ databases are easier to tweak but have limited conversational capabilities compared to AI- based chatbots. Chatbot Design Process The first step to designing the Chatbot is to know the scope and requirements like why chatbot, platform to launch chatbots and its limitations. The second step is to identify the inputs from users in the form of queries through text, voice or images, from devices, and intelligence systems. The third step is to understand the User Interface (UI) elements, that we can see in our applications. UI elements are of five types they are: Command Line(CL), Graphical User Interface(GUI), Menu-Driven Interface (MDI), Form-Based Interface (FBI) and Natural Language Interface (NLI). After understanding user interface elements, the next step is to craft the first interaction and build a conversation. The final step of the Chatbot design process is testing, which is done on mobile and websites to know how it’s working. Chatbot Architecture Intent: An intent in the above figure is defined as a user’s intention, example the intent of the word “Good Bye” is to end the conversation similarly, the intent of the word “What are some good Chinese restaurants” the intent would be to find a restaurant. Entity: An entity in the Chatbot is used to modifies an intent and there are three types of entities they are system entity, developer entity and session entity. Candidate Response Generator: The candidate response generator in the Chatbot do the calculations using different algorithms to process the user request. Then the result of these calculations is the candidate’s response. Response Selector: The response selector in the Chatbot used to select the word or text according to the user queries to give a response to the users which should work better. Best Practices of chatbot development Best practices of the chatbot development process are: – Identifying target audience and understanding their needs – Setting realistic goals about chatbot implementation – Understanding which business area will benefit most from the chatbot – Selecting the right user platform – Improving usability and reachability of chatbot Natural Language Processing Natural language processing (NLP) is concerned with giving computers, the ability to understand text and spoken words in much the same way human beings can. It enables chatbots to convert users’ text and speech into structured data to be understood by a machine. NLP Steps Tokenization: also called lexical analysis, is the process of splitting the string of words forming a sentence into smaller parts “tokens” based on its meaning and its relationship to the whole sentence. Normalization: also called syntactic analysis, is the process of checking words for types and changing them into the standard form. For example, the word “tmrw” will be normalized into “tomorrow”, Entity recognition: the process of looking for keywords to identify the topic of the conversation. Semantic analysis: the process of inferring the meaning of a sentence by understanding the meaning of each word and its relation to the overall structure. NLP Cloud NLP Cloud API enables developers interact with NLP models they create or are pre- made. These include models for Named Entity Recognition, Classification, Summarization, Question answering, Sentiment analysis, and Part of Speech tagging. Pre-made models include spaCY.io models in 15 languages, Facebook's Bart Large MNLI model, Facebook's Bart Large CNN model, Deepset's Roberta Base Squad 2 model and others. NLP Cloud is a new AI startup focused on lowering the barriers for developers trying to create apps for sorting support tickets, extracting leads, analyzing social networks, and developing tools for economic intelligence. Examples are Google’s BERT(Bi- directinal encoder representation from Transformer) model and FaceBook’s RoBERTa. NL Interface NLI essentially provides an abstract layer between users and computers by enabling computers to understand human language instead of the other way around. It allows the user to enter natural language search queries in written or spoken text. Natural language understanding (NLU) It is subfield of NLP which focuses on understanding the meaning of human speech by recognizing patterns in unstructured speech input. NLU solutions have 3 components: – Dictionary to determine the meaning of a word – Parser to determines if the syntax of the text conforms to the rules of the language – Grammar rules to break down the input based on sentence structure and punctuation NLU tasks Natural language generation Natural language generation (NLG) is the process of transforming machine-produced structured data into human-readable text. – Content determination: Filtering existing data in the knowledge base to choose what to include in the response. – Data interpretation: Understanding the patterns and answers available in the knowledge base. – Document planning: Structuring the answer in a narrative manner. – Sentence aggregation: Compiling the expressions and words for each sentence in the response. – Grammaticalization: Applying grammar rules such as punctuations and spell check. – Language implementations: Inputting the data into language templates to ensure a natural representation of the response. Why do Chatbots Need Natural Language Processing (NLP)? Natural Language Processing is what allows chatbots to understand your messages and respond appropriately. Natural Language Processing (NLP) helps provide context and meaning to text-based user inputs so that AI can come up with the best response.