[译]Microsoft Bot Framework的演变
By robot-v1.0
本文链接 https://www.kyfws.com/ai/evolution-of-microsoft-bot-framework-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 16 分钟阅读 - 8011 个词 阅读量 0Microsoft Bot Framework的演变(译文)
原文地址:https://www.codeproject.com/Articles/1120056/Evolution-of-Microsoft-Bot-Framework
原文作者:Ganesan Senthilvel
译文由本站 robot-v1.0 翻译
前言
An interesting article on Artificial Intelligence Chat Ro(Bot) Application development
关于人工智能聊天Ro(Bot)应用程序开发的有趣文章
世代(Generations)
聊天机器人是一个可以模拟与人交谈的软件程序. Eliza是第一个也是最著名的聊天机器人(网络之前),该程序伪装成心理治疗师,并回答了其他问题.(Chat Bot is a software program that can simulate talk with a human being. One of the first and most famous chat bot (prior to the Web) was Eliza, a program that pretended to be a psychotherapist and answered questions with other questions.)
Red和Andrette是两个早期程序的名称,可以对其进行自定义,以回答寻求产品服务的用户的问题.此类程序有时称为虚拟代表或虚拟服务代理.(Red and Andrette were names of two early programs that could be customized to answer questions from users seeking service for a product. Such a program is sometimes called a virtual representative or a virtual service agent.)
总览(Overview)
基于Microsoft Bot Framework的发展演变,我个人将其分为3代:(Based on Microsoft Bot Framework development evolutions, I personally categorize into 3 generations as:)
- X世代-核心(代表Bot编码的基础)(Gen X - Core (represents the foundation of Bot Coding))
- Y世代-协作(与外部业务服务的接口)(Gen Y - Collaborate (interfaces with the external business service))
- X世代-认知(将人工智能纳入业务逻辑中)(Gen X - Cognitive (involves the artificial intelligence in the business logic)) 它的图解表示为:(It is diagrammatically represented as:)
用例(Use Case)
为了说明Microsoft Bot框架的增量世代,让我选择(To illustrate the incremental generations of Microsoft Bot framework, let me choose)**聊天机器人(Chat Bot)**用例(use case of)股票出纳员(‘Stock Price Teller’).(.)
股票价格柜员是一个简单的业务用例,最终用户在其中查询给定股票报价的最新价格.例如,如果最终用户想知道IBM的收盘价/最新股价,该应用程序将响应价格值.(Stock Price Teller is a simple business use case, where the end user enquires the latest price of the given stock quote. As an example, if the end user wants to know the closing/latest stock price of IBM, this application will respond the price value as the result.)
GenX(GenX)
GenX涵盖了聊天机器人基金会的发展及其基本的沟通框架.(GenX covers the development of Chat Bot foundation and its fundamental communication framework.)
概念(Concepts)
Microsoft Bot Connector是一项通信服务,可帮助您将Bot与任何一种通信渠道(例如Skype,SMS,电子邮件等)连接.如果您编写对话式Bot或代理,并在Internet上公开与Microsoft Bot Framework兼容的API,则Bot Framework Connector服务会将邮件从Bot转发给用户,并将用户消息发送回Bot.(Microsoft Bot Connector is a communication service that helps you connect your Bot with any one of the communication channels like Skype, SMS, email, and others. If you write a conversational Bot or agent and expose a Microsoft Bot Framework-compatible API on the Internet, the Bot Framework Connector service will forward messages from your Bot to a user, and will send user messages back to your Bot.)
本质上,建议开发人员编写具有Bot Connector功能的自己的Bot App服务.该自定义服务旨在完全利用Microsoft Bot Framework API.(In essence, the developer is advised to write their own Bot App Service with Bot Connector functionality. This custom service is built to completely leverage Microsoft Bot Framework API.)
Bot Framework Emulator是此程序包的组成部分,用于模拟客户端组件.(Bot Framework Emulator is part and parcel of this package to simulate the client side component.)
实作(Implementation)
下面的序列图中草拟了代码级实现.(Code level implementation is drafted in the below sequence diagram.)
实现从Microsoft Service的基础类即System.Web.HttpApplication开始.一旦创建了所有核心ASP.NET对象,便会创建" HttpApplication"对象来处理请求.如果您的系统中有一个" global.asax"(继承自" HttpApplication"),则将创建" global.asax"文件的对象.(Implementation starts from the foundation class of Microsoft Service i.e. System.Web.HttpApplication Once all the core ASP.NET objects are created, ‘HttpApplication’ object is created to serve the request. In case you have a ‘global.asax’ (inherits from ‘HttpApplication’) in your system, then the object of the ‘global.asax’ file will be created.)
第一次将ASP.NET页面附加到应用程序时,将创建" HttpApplication"的新实例.为了使性能最大化,可以将HttpApplication实例重用于多个请求.在生命周期图中进行了描述.(The first time an ASP.NET page is attached to an application, a new instance of ‘HttpApplication’ is created. To maximize performance, HttpApplication instances might be reused for multiple requests. It is depicted in the life cycle diagram.)
HttpConfiguration类位于System.Web.Http库中,该库是用于构建Web API的框架.(HttpConfiguration class is in the System.Web.Http library, which is a framework for building web APIs.)
代码样例(Code Sample)
作为启动点,当请求基于Web的应用程序中的第一个资源时,将调用Application_Start.在应用程序的生命周期中,仅一次调用Application_Start方法.(As the initiation point, Application_Start is called when the first resource in an web based application is requested. The Application_Start method is called only one time during the life cycle of an application.)
此方法用于执行启动任务,例如将数据加载到缓存中并初始化静态值.(This method is used to perform startup tasks such as loading data into the cache and initializing static values.)
/// Itz an optional file that contains code for responding
/// to application-level events raised by ASP.NET or by HttpModules
/// by Ganesan Senthilvel
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
GlobalConfiguration.Configure(WebApiConfig.Register);
}
}
这里的RouteConfig.cs文件与任何MVC项目中的文件相同,并且为MVC框架设置路由. WebApiConfig.cs文件是我们的Web API路由配置所在的位置.(RouteConfig.cs file here is the same as in any MVC project, and sets up routes for the MVC framework. The WebApiConfig.cs file is where our Web API routing configuration happens.)
我们的WebApiConfig静态类看起来像下面的源代码:(Our WebApiConfig static class looks like the below source code:)
/// Itz used for any Web API related configuration, including Web-API
/// specific routes, Web API services, and other Web API settings
/// by Ganesan Senthilvel
public static class WebApiConfig
{
/// This method registers a dependency property with the specified property name, property type,
/// owner type, property metadata, and a value validation callback for the property.
public static void Register(HttpConfiguration config)
{
// Json settings
config.Formatters.JsonFormatter.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
config.Formatters.JsonFormatter.SerializerSettings.Formatting = Formatting.Indented;
JsonConvert.DefaultSettings = () => new JsonSerializerSettings()
{
ContractResolver = new CamelCasePropertyNamesContractResolver(),
Formatting = Newtonsoft.Json.Formatting.Indented,
NullValueHandling = NullValueHandling.Ignore,
};
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
}
如果您注意到了,我们将像上面那样调用Config.Routes.MapHttpRoutes,而不是像MVC RouteConfig类中那样调用Routes.MapRoutes.(If you notice, instead of calling Routes.MapRoutes as in the MVC RouteConfig class, we instead call Config.Routes.MapHttpRoutes as above.)
进入配置部分时,当您的Bot向Microsoft Bot Framework Connector注册时,将生成MicrosoftAppId和MicrosoftAppPassword. MicrosoftAppId和MicrosoftAppPassword用于对会话进行身份验证,并允许开发人员使用希望在其上可见的渠道配置其Bot.您指定的BotId用于目录和开发人员门户中的URL.(On getting into the Configuration part, MicrosoftAppId and MicrosoftAppPassword are generated when your Bot is registered with the Microsoft Bot Framework Connector. MicrosoftAppId and MicrosoftAppPassword are used to authenticate the conversation, and allows the developer to configure their Bot with the Channels they’d like to be visible on. The BotId, which you specify, is used for the URL in the directory and developer portal.)
Bot Framework注册页面上的AppId和AppPassword必须记录在项目的web.config中(AppId and AppPassword from the Bot Framework registration page have to be recorded in the project’s web.config)
进入下一个方法-发布时,Bot模板的核心功能全部在Controllers \ MessagesController.cs中的发布功能中.在这种情况下,代码将为用户获取消息文本,然后使用CreateReplyMessage函数创建回复消息.该方法上的BotAuthentication装饰用于通过HTTPS验证您的Bot连接器凭据.(On coming to the next method - Post, the core functionality of the Bot Template is all in the Post function within Controllers\MessagesController.cs. In this case the code takes the message text for the user, then creates a reply message using the CreateReplyMessage function. The BotAuthentication decoration on the method is used to validate your Bot Connector credentials over HTTPS.)
/// POST: api/Messages
/// Receive a message from a user and reply to it
public async Task<message> Post([FromBody]Message message)
{
if (message.Type == "Message")
{
// calculate something for us to return
int length = (message.Text ?? string.Empty).Length;
// return our reply to the user
return message.CreateReplyMessage("ServBot::You sent the message: " +
message.Text + " with " +
length + " characters at " + DateTime.Now);
}
else
{
return HandleSystemMessage(message);
}
</message>
执行GenX代码库后,结果是(On execution of GenX code base, the result is)
GenY(GenY)
GenY涵盖了连接另一个服务器组件,提交请求以获取相关信息,将响应返回给Bot组件的附加步骤.它是GenX与外部通信的延伸臂.(GenY covers the additional step to connect another server component, submit the request to fetch the relevant info, retrieve the response back to Bot component. It is an extend arm of GenX with external communication.)
概念(Concepts)
作为Bot应用程序开发的下一个阶段,该机械臂已扩展为连接其他服务以执行核心逻辑.继续前面的GenX示例,我们将展示案例GenY概念.(As the next level of Bot Application development, the arm is extended to connect the other services for core logic execution. In continiuation to the previous GenX example, we will show case GenY concepts.)
在自定义MyStockBot MyController对象中,Post方法接收来自最终用户的消息并进行回复.因此,它是构建核心业务逻辑的正确容器.(In the custom MyStockBot MyController object, Post method receives a message from the end user and replies back. So, it is the right container to build the core business logic.)
在这种方法中,实例化了"股票价格查询器"以连接股票价值查询过程.此App Server连接性执行核心业务逻辑,并将匹配结果返回给Post Method.反过来,结果将返回到最终用户层.(In this method, Stock Exchange Price finder is instantiated to interface the stock value query process. This App Server connectivity executes the core business logic and returns the matching result back to Post Method. In turn, the result goes back till end user layer.)
实作(Implementation)
需要构建Microsoft Bot Framework的三个主要SDK组件.(There are three main SDK components of the Microsoft Bot Framework to build.)
- Bot Builder(Bot Builder)-托管在GitHub上的开源SDK,提供了在基于Node.js,.NET或REST API的机器人中构建出色对话框所需的一切(- Open source SDK hosted on GitHub that provides everything you need to build great dialogs within your Node.js-, .NET- or REST API-based bot)
- 开发者门户(Developer Portal)-让机器人将文本/短信无缝连接到Skype,Slack,Facebook Messenger,Kik,Office 365邮件和其他受欢迎的服务(- Lets to connect the bot seamlessly text/sms to Skype, Slack, Facebook Messenger, Kik, Office 365 mail and other popular services)
- 机器人目录(Bot Directory)-用户将能够发现,尝试并将漫游器添加到他们最喜欢的对话体验中(- Users will be able to discover, try, and add bots to their favorite conversation experiences) 编写机器人的开发人员都面临相同的问题:机器人需要基本的I/O;他们必须具有语言和对话能力;它们必须具有高性能,响应能力和可扩展性;并且他们必须与用户建立联系-理想情况下是用户选择的任何对话体验和语言.(Developers writing bots all face the same problems: bots require basic I/O; they must have language and dialog skills; they must be performant, responsive and scalable; and they must connect to users – ideally in any conversation experience and language the user chooses.)
作为Bot App执行的核心逻辑,组件图从Http.ApiController基类开始.该应用程序的对象派生自ApiController,并命名为MessageController.(As the core logic of Bot App execution, Component diagram starts with Http.ApiController base class. The application’s object is derived from ApiController and named as MessageController.)
MessageController类的Post方法接受Message对象,并根据Message的Type成员切换到操作.如果Type是诸如ping,BotAdded,UserAdded等的预定义系统数据的一部分,那么它们将在名为HandleSystemMessage的单独方法中进行处理.自定义消息是单独处理/处理的.(Post method of MessageController class takes Message object and switches to the actions based on Type member of Message. If Type is part of pre-defined System data like ping, BotAdded, UserAdded, etc., then they are handled in a separate method named HandleSystemMessage. The custom message is handled/processed separately.)
在我们的示例中,处理非系统消息以计算字符数并返回给调用者.(In our example, the non-system message is handled to count the number of characters and return to the caller.)
代码样例(Code Sample)
作为GenX Bot编码的扩展,GenY是在外部服务的共同努力下添加的.它主要通过使用ApiController类的扩展即MessageController来实现.(As an extension of GenX Bot Coding, GenY is added with the collaborative effort of the external services. It is primarily achieved using the extension of ApiController class, namely MessageController.)
如前所述,MessageController中有2个关键的异步方法,即(As said earlier, there are 2 key asynchronous methods in MessageController namely)
- 发布(Post)
- HandleSystemMessage(HandleSystemMessage) Post是ApiController对象的主要条目.当从最终用户收到消息/请求时,它将被触发.消息上下文正在方法参数中传递.该方法应该处理传入的请求,并将输出响应发送给最终用户.(Post is the main entry of ApiController object. It is getting triggered when the message/request is received from the end user. The message context is getting passed in the method argument. This method is supposed to process the incoming request and sent the output response to the end user.)
HandleSystemMessage是传入的最终用户请求的非" Message"类型参数的处理程序方法.如上面的序列图所示,Handler节点处理任何类型的系统消息并采取适当的操作,例如BotAdded,UserAdded等.(HandleSystemMessage is the handler method for non “Message” typed parameter of the incoming end user request. As depicted in the above sequence diagram, Handler node processes any sort of system message and take the appropriate actions like BotAdded, UserAdded, etc.)
namespace StockBot
{
/// MessageController class process incoming requests,
/// handle user input and interactions, and execute
/// the appropriate application logic.
/// by Ganesan Senthilvel
[BotAuthentication]
public class MessagesController : ApiController
{
/// Invoking GetStockRateAsync to retrieve stock
/// value for the given StockSymbol
private async Task<string> GetStock(string StockSymbol)
{
try
{
String retStockValue = await YahooBot.GetStockRateAsync(StockSymbol);
if (retStockValue.Trim() == "")
{
return string.Format("This \"{0}\" is not an valid stock symbol", StockSymbol);
}
else
{
return string.Format("Stock symbol : {0} has Name: {1} with Price : {2} as on : {3}",
StockSymbol,
retStockValue.Split(',')[3],
Convert.ToDouble(retStockValue.Split(',')[1]),
retStockValue.Split(',')[2]);
}
}
catch(System.FormatException ex)
{
return string.Format("This \"{0}\" is not an valid stock symbol", StockSymbol);
}
}
/// POST: api/Messages
/// Receive a message from a user and reply to it
public async Task<message> Post([FromBody]Message message)
{
if (message.Type == "Message")
{
// Parse the last word on the sentence
String stockRate = await GetStock(
message.Text.Split(' ').Select(s=>s.Trim()).Last());
return message.CreateReplyMessage(stockRate);
}
else
{
return HandleSystemMessage(message);
}
}
/// Bot's Incoming message is handled in this method
/// based on Message Type
private Message HandleSystemMessage(Message message)
{
if (message.Type == "Ping")
{
Message reply = message.CreateReplyMessage();
reply.Type = "Ping";
return reply;
}
else if (message.Type == "DeleteUserData")
{
// Implement user deletion here
// If we handle user deletion, return a real message
Message reply = message.CreateReplyMessage("ServBot::You opted to delete User Data");
return reply;
}
else if (message.Type == "BotAddedToConversation")
{
Message reply = message.CreateReplyMessage("ServBot::You opted to connect the conversation");
return reply;
}
else if (message.Type == "BotRemovedFromConversation")
{
Message reply = message.CreateReplyMessage("ServBot::You opted to disconnect the conversation");
return reply;
}
else if (message.Type == "UserAddedToConversation")
{
Message reply = message.CreateReplyMessage("ServBot::You opted to add User into conversation");
return reply;
}
else if (message.Type == "UserRemovedFromConversation")
{
Message reply = message.CreateReplyMessage("ServBot::You opted to remove User from conversation");
return reply;
}
else if (message.Type == "EndOfConversation")
{
var hours = DateTime.Now.Hour;
String partDay = (hours > 16) ? "Evening" : (hours > 11) ? "Afternoon" : "Morning";
Message reply = message.CreateReplyMessage("ServBot::Good " + partDay + " User!!" +
Environment.NewLine + "Local Time is: " + DateTime.Now.ToString());
return reply;
}
return null;
}
}
}
</message></string>
在GenY模式下,将添加外部App Service以查找给定股票上市报价的股票价格.在我们的示例中,它是在名为YahooBot的单独类中开发的,以从Yahoo金融服务中检索当前股价.(In GenY mode, external App Service is added to find the stock price of the given equity listed quote. In our example, it is developed in a separate class named YahooBot, to retrieve the current stock price from Yahoo financial service.)
从我们的主条目MessageController类,开发了一个新的异步方法GetStock来调用AppServer YahooBot. GetStock方法获取StockSymbol作为输入参数,并返回合并价格输出作为返回值.(From our main entry MessageController class, a new asynchronous method namely GetStock is developed to invoke AppServer YahooBot. GetStock method gets StockSymbol as the input parameter and returns the consolidated price output as the return value.)
执行GenY代码库后,结果是(On execution of GenY code base, the result is)
GenZ(GenZ)
GenZ是Microsoft Bot App开发的高级阶段,集成了认知服务.通过利用预构建的Azure服务,它具有高智能功能.(GenZ is the advanced stage of Microsoft Bot App development with the integration of Cognitive Services. It has the high intelligence capabilities by leveraging the pre-built Azure services.)
概念(Concepts)
在编程概念方面,在集成GenY AppServer FinStock之前,GenZ具有对最终用户自由文本输入的自然语言理解.最终用户可以以自然的方式提问而不是使用预先定义的库存输入参数来查询Bot App.(In terms of programming concepts, GenZ has the natural language understanding of the end user free text input, before GenY AppServer FinStock integration. It has the end user advantage to query Bot App in the natural way of asking questions, not in pre defined stock input parameter.)
逻辑上,如上面的概念图所示,MyStockBot类中有两个步骤.(Logically, there are 2 step process in MyStockBot class, as depicted in the above conceptual diagram.)
实作(Implementation)
GenZ认知BotApp开发的分步实施在以下流程图中进行了精心编写.编码执行过程大致分为两个部分.(The step by step implementation of GenZ cognitive BotApp development, is carefully written in the below flow chart. The coding execution process is broadly categorized into 2 segments.)
- Microsoft LUIS Azure应用设置(Microsoft LUIS Azure App Setup)
- 我的自定义.NET App设置(My custom .NET App Setup)
基本上,应在Microsoft Azure LUIS门户中进行初始设置后编写自定义.NET代码.(Basically, the custom .NET code should be written after the initial setup in Microsoft Azure LUIS portal.)
据luis.ai称,LUIS是一种语言理解智能服务,它提供了一种快速有效的方法来增加对应用程序的语言理解.借助LUIS,您可以在需要时和需要专门模型时使用Bing和Cortana的现有,世界一流的,预先构建的模型.(According to luis.ai, LUIS is a Language Understanding Intelligent Service, which offers a fast and effective way of adding language understanding to applications. With LUIS, you can use pre-existing, world-class, pre-built models from Bing and Cortana whenever they suit your purposes and when you need specialized models.)
LUIS指导您完成快速构建它们的过程. LUIS是Microsoft认知服务的一部分,位于(LUIS guides you through the process of quickly building them. LUIS is a part of Microsoft Cognitive Service at) https://www.microsoft.com/cognitive-services(https://www.microsoft.com/cognitive-services) .详细信息用MSDN编写,网址为(. Details are written in MSDN at) https://code.msdn.microsoft.com/Chat-Bot-using-Bot-1211d6ce(https://code.msdn.microsoft.com/Chat-Bot-using-Bot-1211d6ce)
代码样例(Code Sample)
就GenZ编码而言,智能调用在源代码行被调用:(In terms of GenZ coding, the intelligence call is getting invoked at the source code line:)
Rootobject StLUIS = await GetEntityFromLUIS(message.Text);
除此之外,GenZ编码是GenY源代码的扩展.在调用FinStock服务之前,将在自定义方法GetEntityFromLUIS中调用认知服务.如果您注意到GenZ源代码中的最后一个方法,它将调用预构建的Azure服务,并在成功状态代码上返回正确的响应.(Other than that, GenZ coding is kind of the extension on GenY source code. The cognitive service is getting invoked in the custom method GetEntityFromLUIS, before calling FinStock service. If you notice the last method in GenZ source code, it makes the call to the pre-built Azure service and returns the proper response on Success Status code.)
此外,根据Azure服务中配置的意图,我们的代码将像附加代码中那样切换多个业务案例.(Also, based on the configured intent in Azure service, our code will switch the multiple business cases as in the attached code.)
[BotAuthentication]
public class MessagesController : ApiController
{
/// POST: api/Messages
/// Receive a message from a user and reply to it
public async Task<message> Post([FromBody]Message message)
{
if (message.Type == "Message")
{
string StockRateString;
Rootobject StLUIS = await GetEntityFromLUIS(message.Text);
if (StLUIS.intents.Count() > 0)
{
switch (StLUIS.intents[0].intent)
{
case "StockPrice":
StockRateString = await GetStock(StLUIS.entities[0].entity);
break;
case "StockPrice2":
StockRateString = await GetStock(StLUIS.entities[0].entity);
break;
default:
StockRateString = "Sorry, I am not getting you...";
break;
}
}
else
{
StockRateString = "Sorry, I am not getting you...";
}
// return our reply to the user
return message.CreateReplyMessage(StockRateString);
}
else
{
return HandleSystemMessage(message);
}
}
private async Task<string> GetStock(string StockSymbol)
{
double? dblStockValue = await FinStockBot.GetStockRateAsync(StockSymbol);
if (dblStockValue == null)
{
return string.Format("This \"{0}\" is not an valid stock symbol", StockSymbol);
}
else
{
return string.Format("Stock Price of {0} is {1}", StockSymbol, dblStockValue);
}
}
private static async Task<rootobject> GetEntityFromLUIS(string Query)
{
Query = Uri.EscapeDataString(Query);
Rootobject Data = new Rootobject();
using (HttpClient client = new HttpClient())
{
string RequestURI = "https://api.projectoxford.ai/luis/v1/application?id=7f626790-38d6-4143-9d46-fe85c56a9016&subscription-key=09f80de609fa4698ab4fe5249321d165&q=" + Query;
HttpResponseMessage msg = await client.GetAsync(RequestURI);
if (msg.IsSuccessStatusCode)
{
var JsonDataResponse = await msg.Content.ReadAsStringAsync();
Data = JsonConvert.DeserializeObject<rootobject>(JsonDataResponse);
}
}
return Data;
}
</rootobject></rootobject></string></message>
如果您注意到LUIS服务的实体过程中我们有一个名为" Rootobject"的通信对象.它是作为Microsoft LUIS识别器创建的,它指向我们的模型并将其添加为Cortana Bot的根对话框.(If you notice we have the communication object named ‘Rootobject’ during the Entity process of LUIS service. It is created as Microsoft LUIS recognizer that points at our model and add it as the root dialog for our Cortana Bot.)
除了新添加的GetEntityFromLUIS方法作为与Microsoft Cognitive Service的接口外,其他处理逻辑与GenY代码库几乎相同.(Other than the newly added GetEntityFromLUIS method as the interface to Microsoft Cognitive Service, the other processing logic is pretty much same like GenY code base.)
执行GenZ代码库后,结果是(On execution of GenZ code base, the result is)
聊天机器人(Chat Bot in Business)
在人工智能中,Chat Bot发挥了关键工具的作用,即通过手头的客户服务代理向用户提供购买反馈,以提供进一步的帮助.(In Artificial Intelligence, Chat Bot plays a key tool by providing feedback to users on purchases with customer service agents on hand to provide further assistance.)
在中国,不仅有将近三分之二的16-24岁的在线消费者使用微信,而且该服务还通过尝试将其自身插入沿途的许多站点,提供了远远超出简单消息传递的功能,从而利用了其庞大的市场份额购买过程.(In China, not only is WeChat used by close to two thirds of 16-24 year-old online consumers, but the service has capitalized on its massive market share by offering functionality well beyond simple messaging by attempting to insert itself into as many stations along the purchase journey as possible.)
作为数字消费者购买旅程和在线生活的重要组成部分,Chat Bot将需要非侵入性,显然对用户有利,并且也许最重要的是,将自己表现为诚实的助手,而不是伪装成广告.(As the major part of digital consumers’ purchase journeys and online lives, Chat Bot will need to be non-intrusive, obviously beneficial to the user and, perhaps most importantly, present themselves as an honest assistant, not an advertisement in disguise.)
作为我的分析的总结,使用聊天机器人的2个主要业务优势:(As the summarization of my analysis, 2 key business benefits of Chat Bot usage:)
- 手动联络中心业务的高度自动化;导致成本降低(High automation in manual contact center business; leads to cost reduction)
- 通过在AI智能聊天机器人中使用机器学习,可以持续改进(使用情况)(Continuous improvement (on usage) is possible with the usage of Machine Learning in AI intelligent Chat Bot) 聊天机器人将购物体验从浏览(网络/零售店)转移到推荐.机器人会像信任的朋友或个人购物者那样了解您.(Chat Bots shift the shopping experience from browsing (web/retail stores) to recommendation. Bots learn about you, much like a trusted friend or personal shopper.)
结论(Conclusion)
目前,最好使用混合方法来深入探讨聊天机器人.让该技术执行最简单的任务,但要进行人工备份以处理更复杂的请求和问题.(For now, a hybrid approach may be best to delve into Chat Bot. Let the technology perform the simplest tasks, but have human backup to handle more complex requests and questions.)
您今天进行的研究最终可能会成为您如何尽快为企业部署成功的Chat Bot应用程序的基础,而不是在解决所有问题之后才部署.(What you research today may eventually underpin how you deploy a successful Chat Bot application for your business sooner rather than later once all the kinks get worked out.)
历史(History)
初始版本(Initial Version)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
HTML C# .NET VS2013 Design Architect machine-learning AI 新闻 翻译