[译]随时在客户服务中使用人工智能聊天机器人提供客户支持
By robot-v1.0
本文链接 https://www.kyfws.com/ai/anytime-customer-support-using-artificial-intellig-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 9 分钟阅读 - 4369 个词 阅读量 0随时在客户服务中使用人工智能聊天机器人提供客户支持(译文)
原文地址:https://www.codeproject.com/Articles/5274317/Anytime-Customer-Support-using-Artificial-Intellig
原文作者:Habibur Rony
译文由本站 robot-v1.0 翻译
前言
Basics of the rule-based chatbot, machine-learning chatbot and AI chatbot.
基于规则的聊天机器人,机器学习聊天机器人和AI聊天机器人的基础知识.
This post focuses on the basic knowledge of how rule-based, machine-learning and AI chatbots work, why we need chatbots in customer service, and how they process customer queries. I’ve explained the work processing flow and architectural design of the chatbot. I’ve designed the pipe-and-filter pattern for the ML chatbot and explained the implementation of the framework using .NET into the provided link.
这篇文章重点介绍了基于规则的,机器学习和AI聊天机器人如何工作,我们为什么需要在客户服务中使用聊天机器人以及它们如何处理客户查询的基本知识.我已经解释了聊天机器人的工作流程和体系结构设计.我已经为ML chatbot设计了管道过滤器模式,并在提供的链接中介绍了使用.NET的框架实现.
介绍(Introduction)
在某个时候,很少有人会通过代表找到没有客户服务经验的人.有时,他们没有立即的答案,而是将客户转移到另一个人.这就是他们为多个客户提供服务的方式,这很公平,需要很长时间才能解决客户服务单.但这可能会使客户失望.因此,除了让他们失望之外,我们还可以通过添加聊天机器人来应对这些挑战.结果,24/7全天候客户支持可以提高客户满意度.(At some point, it’s rare to find a person who doesn’t have the experience with customer service through a representative. Sometimes, they don’t have the immediate answers and they transfer the customer to another person. That’s how they serve multiple customers and this is fair enough to take long resolution time to resolve the customer service tickets. But it could disappoint customers. So, instead of disappointing them, we could handle these challenges adding chatbot. As a result, 24/7 customer support could enhance customer satisfaction.)
主题(Topics)
- 聊天机器人的类型及其好处(Chatbot types and their benefits)
- 聊天机器人的流程和基本组件(Process flow and basic components of chatbots)
- 基于规则,基于检索和生成式聊天机器人的基本思想(Basic idea about rule-based, retrieval-based and generative chatbot)
- 解决NLP问题的文本分类方法(Text classification approaches for solving NLP problem)
- ML Chatbot实现的管道和过滤器架构模式(Pipe-and-Filter architecture pattern for ML chatbot implementation)
- 使用.NET Framework进行初学者的聊天机器人开发的先决条件指南(Prerequisite guides to chatbot development for starters using .NET Framework)
聊天机器人(Chatbot)
聊天机器人是一种对话软件应用程序,可通过Internet与客户进行交互.(A chatbot is a conversational software application which interacts with customers over the internet.)
聊天机器人的好处(Benefits of Chatbot)
- 增强客户参与度(Enhance customer engagement)
- 24/7客户支持可用性(24/7 customer support availability)
- 快速解决客户问题(Quickly resolve customer issues)
- 降低客户支持成本(Reduce customer support cost)
聊天机器人的类型(Types of Chatbots)
基于规则的聊天机器人(Rule-Based Chatbot)
聊天机器人根据预定义的规则回答客户查询.基于规则的聊天机器人实现非常简单且便宜.(The chatbot answers the customer queries based on the predefined rules. The rule-based chatbot implementation is very straightforward and cheap.)
Chatbot流程和基本组件(Chatbot Process Flow and Basic Components)
例如,如果我们考虑基于流的设计,那么很容易将意图和实体识别为一组预定义的意图.让我们在下面看到给定的聊天机器人:(For example, if we consider a flow-based design, then it’s easy to identify the intent and entities to a set of the predefined intents. Let’s see the given chatbot below:)
- 如果用户选择"是,我想创建一个帐户",那么聊天机器人会识别出"创建帐户"的意图.现在,聊天机器人可以回答:“好的,您想创建一个帐户.您的电子邮件是什么?"(If a user chooses “Yes, I’d like to create an account”, then chatbot identifies the intent which is “create an account”. Now chatbot can respond, “Okay, you want to create an account. What is your email?")
- 现在,如果用户回答"您为什么需要我的电子邮件?",那么聊天机器人可以回答:“对不起,我不明白.您的电子邮件是什么?"(Now if a user responses, “Why do you need my email?”, then chatbot can respond, “Sorry, I didn’t understand that. What’s your email?")
- 如果用户回复"我的电子邮件地址是hr.rony@gmail.com”,那么chatbot会识别该实体的值并回复"请注意!感谢您提供我们的电子邮件地址.请稍等,让我拉你的资料."(If a user replies, “My email address is hr.rony@gmail.com”, then chatbot identifies the value of the entity and responses, “Got it! Thanks for giving us your email address. Hold on a second, let me pull your information.") 基于规则的聊天机器人使用正则表达式来匹配文本模式.如果输入文本与现有模式匹配,则它可以正确响应用户.(The rule-based chatbot uses regular expression in order to match the pattern of the text. If the input text matches the existing pattern, then it can respond to the user correctly.)
自学聊天机器人(Self-Learning Chatbot)
自学型聊天机器人使用机器学习(ML)方法.它使用深度学习进行自我训练.它比基于规则的聊天机器人更好.(Self-learning chatbot uses machine learning (ML) approach. It uses deep-learning to train itself. It is better than the rule-based chatbot.)
基于检索的模型(Retrieval-Based Model)
可以使用机器学习(ML)算法构建基于检索的聊天机器人,该算法使用诸如自然语言处理(NLP)之类的数据处理技术来处理用户输入.因此,响应精度取决于现有的训练数据和数据处理算法.它只能处理预定义的意图和实体.它无法处理未知的意图和实体.它也被称为基于ML的聊天机器人.(Retrieval-based chatbot can be built with the machine learning (ML) algorithm which uses data processing technique such as natural language processing (NLP) to process the user input. So, the response accuracy depends on the existing training data and data processing algorithm. It can handle only predefined intents and entities. It can’t handle unknown intents and entities. It is also known as ML-based chatbot.)
ML Chatbot的处理流程和基本组件(Process Flow and Basic Components of ML Chatbot)
-
自然语言处理(NLP)将人工输入的文本转换为结构化的数据,以便机器可以理解它.因此,NLP执行以下任务,例如语音识别,标记化,解析和信息提取等.(Natural language processing (NLP) converts human input text into structured data so that the machine can understand it. So, NLP performs the following tasks such as, speech recognition, tokenization, parsing and information extraction, etc.)
-
自然语言理解(NLU)使用算法对意图(动词)进行分类并识别实体(名词或动作内容).(Natural language understanding (NLU) uses algorithm to classify the intent (verb) and recognize the entity (noun or action content).)
-
自然语言生成(NLG)将机器的结构化数据转换为文本,以便人类可以理解.(Natural language generation (NLG) converts structured data of the machine into text so that humans can understand it.)
例如,如果用户键入自由输入文本,则漫游器可以将意图和实体标识为一组预定义的意图.让我们在下面看到给定的聊天机器人:(For example, if a user types free input text, then bot can identify the intent and entities to a set of the predefined intents. Let’s see the given chatbot below:)
-
如果用户键入"嗨,我的电子邮件是hr.rony@gmail.com,并且我想开设一个帐户.",那么聊天机器人会识别出"打招呼"和"创建帐户"的意图.现在,聊天机器人可以回答:“好的,您想创建一个帐户,您的电子邮件是hr.rony@gmail.com.对吗?"(If a user types “Hi, my email is hr.rony@gmail.com and I want to open an account.”, then chatbot identifies the intents that are “greetings” and “create an account”. Now chatbot can response, “Okay, you want to create an account and your email is hr.rony@gmail.com. Right?")
-
如果用户回答"是”,那么聊天机器人会识别该实体的值并回答:“知道了!稍等片刻,让我提取您的信息”.(If a user replies, “Yes”, then chatbot identifies the value of the entity and responses, “Got it! Hold on a second, let me pull your information.")
解决NLP问题的文本分类方法(Text Classification Approaches for Solving NLP Problem)
有三种文本分类方法可以对文本进行分类,例如:(There are three text classification approaches to classify text such as:)
- 模式匹配器(Pattern Matcher)
- 算法(Algorithm)
- 神经网络(Neural Network)
使用不良贷款算法的文本分类(Text Classification using Algorithm for NPL Problem)
您可以使用多项朴素贝叶斯算法对文本进行分类.(You can use multinomial naive Bayes algorithm to classify text.)
使用管道和过滤器架构模式进行检索聊天机器人的ML服务设计(ML Service Design using Pipe-and-Filter Architecture Pattern for Retrieval Chatbot)
使用管道和过滤器架构模式的框架实现(Framework Implementation using Pipe-and-Filter Architecture Pattern)
如果您需要有关管道过滤器体系结构模式的更多详细信息,并且希望使用.NET C#实现框架,那么我将为您提供有关使用.NET Framework源代码的文章.你可以看一下(If you need more details about the pipe-and-filter architecture pattern as well as want to implement a framework using .NET C#, then I’ve an article with source code using .NET Framework; you can take a look,) 使用管道和过滤器体系结构的框架实现(A Framework Implementation using Pipe and Filter Architecture) .(.)
生成模型聊天机器人(Generative Model Chatbot)
它类似于可以使用机器学习(ML)算法构建的基于检索的聊天机器人.但是它不仅可以处理预定义的意图和实体,而且还可以处理未知的意图和实体.它也被称为基于AI的聊天机器人.因为,它是人脑的模仿物.您可以将递归神经网络(RNN)和注意力机制用于NLP问题. RNN是人工神经网络的一种.注意机制是神经网络的输入处理技术之一.(It is similar to the retrieval-based chatbot that can be built with the machine learning (ML) algorithm. But it can’t only handle predefined intents and entities, but it can also handle unknown intents and entities. It is also known as AI-based chatbot. Because, it is the mimic of human brain. You can use recurrent neural network (RNN) and attention mechanisms for the NLP problem. RNN is one of the type of the artificial neural network. Attention mechanism is one of the input processing techniques for neural networks.)
求解NLP问题的人工神经网络的类型(Types of Artificial Neural Networks for Solving NLP Problem)
- 递归神经网络(Recurrent Neural Network)
- 递归神经网络(Recursive Neural Network)
- 序列到序列模型(Sequence-to-Sequence Model)
- 多层感知器(Multilayer Perceptron)
- 浅层神经网络(Shallow Neural Network)
- 长短期记忆(Long Short-Term Memory)
- 卷积神经网络(Convolutional Neural Network)
使用.NET Framework进行初学者的Chatbot开发的先决条件指南(Prerequisite Guides to Chatbot Development for Starters using .NET Framework)
我猜想,您已经安装了Visual Studio2019.如果您需要机器学习图形界面来生成模型,请打开Visual Studio安装文件,然后选择”(I’m guessing, you’ve already installed Visual Studio 2019. If you need machine learning graphical interface to generate the model, then open the Visual Studio setup file and select “)ML.NET模型生成器(ML.NET Model Builder)组件,如下图所示:(” component as shown in the image below:)
现在,您需要从Visual Studio扩展中安装以下扩展:(Now you need to install the following extensions from the Visual Studio extension:)
- DotNET Core 3.1(DotNET Core 3.1)
- Bot Framework SDK v4模板(Bot Framework SDK v4 Template)
- Bot框架模拟器(Bot Framework Emulator)
使用Bot Framework创建Web应用程序项目(Web Application Project Creation using Bot Framework)
在Visual Studio中,点击”(In Visual Studio, click on the “)创建一个新项目(Create a new project)".如果您想查看漫游器模板,请选择”(”. If you want to see the bot templates, then choose “)AI机器人(AI Bots)” 来自 “(” from the “)项目类型(Project types)",然后选择所需的模板,如下图所示:(” and select your required template as in the below image:)
将ML.NET与Bot项目集成(Integrate ML.NET with Bot Project)
从解决方案资源管理器中选择项目>单击鼠标右键>添加>机器学习,如下图所示:(Select the project from the Solution Explorer> click on the right button of the mouse> Add> Machine Learning as in the below image:)
喝咖啡休息一下,很快就会回来使用.NET技术实现基于规则/基于ML的聊天机器人.(Taking a coffee break, will come back soon with the implementation of the rule-based/ML-based chatbot using .NET Technology.)
历史(History)
- 23(23)rd(rd)2020年7月:初始版本(July, 2020: Initial version)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
C# .NET-Core .NET Dev Architect artificial-intelligence bot machine-learning 新闻 翻译