msbuild构建步骤
by Paul Pinard
保罗·皮纳德(Paul Pinard)
如何按照以下步骤构建最终的AI聊天机器人 (How to build the ultimate AI chatbot by following these steps)
快速指南,可帮助您避免常见的陷阱 (A quick guide that helps you avoid common pitfalls)
Building a bot is a rewarding experience: creating your own artificial intelligence is amazing!
构建机器人是一种有益的体验:创建自己的人工智能真是太神奇了!
However, it can be a challenge, and there are mistakes to avoid. In this piece, we’re going to walk you through the most common or damaging mistakes new bot builders make in each phase of bot building: conception, training, building, connection, user experience and maintenance. Let’s roll!
但是,这可能是一个挑战,并且需要避免错误。 在本文中,我们将带您逐步了解新机器人构建者在机器人构建的每个阶段中犯下的最常见或最具破坏性的错误:概念,培训,构建,连接,用户体验和维护。 来吧!
概念 (Conception)
Building a bot doesn’t start at the first line of code. It starts much earlier, during the conception.
构建机器人并不是从代码的第一行开始。 它在受孕期间开始得更早。
During that first step, it’s important to define the use case of your chatbot. What is the problem you want it to solve? What are your business needs?
在第一步中,定义聊天机器人的用例很重要。 您要解决的问题是什么? 您的业务需求是什么?
We often see people saying “I want a bot that does this”, but when we dig deeper, we realize a different bot would actually fix the issue much more efficiently. If you want to build a chatbot that manages customers’ questions on return policies, but later realize that these queries are less than 2% of your global volume, you might want to switch to another topic. So, start from the business problem and build from there.
我们经常看到人们说“ 我想要一个能够做到这一点的机器人 ”,但是当我们深入研究时,我们意识到另一个机器人实际上可以更有效地解决问题。 如果您想构建一个聊天机器人来管理客户关于退货政策的问题,但后来意识到这些查询不到您的全球交易量的2%,则可能需要切换到另一个主题。 因此,从业务问题开始并从那里开始构建。
Now that you’ve established the real-life business need, how should the bot conversation flow go to solve it? What we usually do is take out a drawing board and draw all the conversation flows, from start to finish. Modeling all possibilities allows you to make sure every topic is covered and gives the developer a good overview of what needs to be done. It is also the first step of creating your user experience, which we’ll talk about later. For now, simply keep in mind that each conversation should be about 3 or 4 exchanges, no more.
既然您已经建立了真实的业务需求,那么机器人对话流程应该如何解决呢? 我们通常要做的是拿出一个绘图板,从头到尾绘制所有对话流程。 通过对所有可能性进行建模,您可以确保涵盖所有主题,并为开发人员提供了有关需要完成的工作的良好概述。 这也是创建用户体验的第一步,我们将在后面讨论。 现在,只需记住,每次对话应该进行大约3或4次交流,而不再进行。
During this step, remember your audience: who are the end-users that will be talking to your bot? You have to make something that works for them.
在此步骤中,请记住您的听众:谁将与您的漫游器对话的最终用户? 您必须做出一些对他们有用的东西。
Do not forget to include small talk in your conception. All chatbots are expected to understand and reply to a number of topics unrelated to their mission: jokes, weather questions, “how are you doing”, and even remarks like “will you marry me” or other off-topic stuff. Be sure to plan for those if you want the user to be satisfied with the experience. But no worries, we provide pre-trained small-talk Skills on SAP Conversational AI.
不要忘记在您的概念中包括闲聊。 所有聊天机器人都应理解并回答与其任务无关的许多主题:笑话,天气问题,“你好吗”,甚至是诸如“你愿意嫁给我”之类的言论或其他话题。 如果您希望用户对体验感到满意,请务必为这些计划。 但不用担心,我们在SAP对话式AI上提供了预先训练的小会话技巧。
What not to do when building a bot:
构建机器人时不该做什么:
1. Disregard it as a non-important step
1.忽略它是不重要的步骤
2. Start from what you want and not from what you need
2.从所需的内容开始,而不是从所需的内容开始
3. Incorrectly understand who the final users of the bot will be and design an experience they won’t appreciate
3.错误地了解机器人的最终用户是谁,并设计他们不会欣赏的体验
4. Not include small talk and other commonly asked questions
4.不包括闲聊和其他常见问题
训练 (Training)
Training the bot is the most important factor in determining its performance. Bad training will inevitably lead to a poor performing chatbot and frustrated users.
训练机器人是决定其性能的最重要因素。 糟糕的培训将不可避免地导致性能差的聊天机器人和沮丧的用户。
Based on the flow you’ve created during conception, training consists of creating intents and filling them with expressions. If you’re not comfortable with the concept of intents and expressions, this article should help you. But here are some things that make for good training.
根据您在受孕期间创建的流程,培训包括创建意图并用表达式填充它们。 如果您对意图和表达式的概念不满意,则本文将为您提供帮助。 但是这里有一些东西可以使您接受良好的培训。
The number of expressions in each intent is crucial. Five doesn’t cut it, you should go for 50+. SAP Conversational AI works very well on small datasets, but we still need a bit of information. These sentences should be varied and should come from end users. Never train your bot only with the development and project team: they know the technical slang too well to accurately represent the people that will actually use the bot.
每个意图中表达的数量至关重要。 五不减,你应该去50 +。 SAP Conversational AI在小型数据集上效果很好,但是我们仍然需要一些信息。 这些句子应该有所不同,并且应该来自最终用户。 永远不要只与开发和项目团队一起训练您的机器人:他们非常了解技术语,无法准确地代表将实际使用机器人的人员。
Tagging entities has a few rules as well. Entities are keywords that you need to detect in a sentence to extract information (the key point here being “to extract information”). You don’t need to tag every noun, adjective or word per sentence just because you can! The point of entities is to extract relevant information that you can use in your code. Only tag those.
标记实体也有一些规则。 实体是您需要在句子中检测以提取信息的关键字(此处的关键点是“提取信息”)。 您不需要仅仅因为可以就为每个句子标记每个名词,形容词或单词! 实体的重点是提取可在代码中使用的相关信息。 只标记那些。
However, avoid having sentences that are only made of one word that is an entity (e.g. “Paris” as a complete sentence). This entity can be detected by any intent, which can lead to detection issues.
但是,请避免使用仅由一个词作为实体的句子(例如,“巴黎”作为完整句子)。 可以通过任何意图检测此实体,这可能会导致检测问题。
A common best practice for big bots is to use intents and entities hand in hand. It is better to create a global intent and use entities to specify the user request, than to create very specific intents that the classifier will confuse as they overlap.
大型机器人的常见最佳做法是携手使用意图和实体。 创建全局意图并使用实体指定用户请求比创建分类器在重叠时会混淆的非常具体的意图要好。
What not to do when building a bot:
构建机器人时不该做什么:
5. Have less than 50 expressions per intent
5.每个意图少于50个表达
6. Train your bot by people who are not the end-user
6.由不是最终用户的人来训练您的机器人
7. Tag every word in a sentence as an entity
7.将句子中的每个单词标记为一个实体
8. Tag words as entities when you don’t use the extracted information
8.当您不使用提取的信息时,将单词标记为实体
9. Have expressions that are only entities (i.e “Paris”)
9.具有仅作为实体的表达式(即“巴黎”)
10. Create very specific intents instead of using entities to understand the topic
10.创建非常具体的意图,而不是使用实体来理解主题
建造 (Building)
Building a bot is often assumed to involve just building the conversation flow. It is the fun part! It’s when everything comes to life. However, it can be a scary process.
通常认为构建机器人只涉及构建对话流程。 这是有趣的部分! 一切变为现实。 但是,这可能是一个令人恐惧的过程。
The first thing to understand is that it’s ok to use multiple skills to complete one task. One skill doesn’t have to equal one full process. It can be a good solution to create one “mega-skill” whose job is to dispatch the user input to the correct skill.
首先要了解的是,可以使用多种技能来完成一项任务。 一种技能不必等于一个完整的过程。 创建一个“超级技能”可能是一个很好的解决方案,其职责是将用户输入分配给正确的技能。
That is also a solution if you have skills with triggers that overlap each other. And if something doesn’t work, be sure to use the logs in the debug console to understand where the problem is coming from.
如果您具有触发器相互重叠的技能,那也是一种解决方案。 并且,如果某些操作不起作用,请确保使用调试控制台中的日志来了解问题的根源。
What not to do when building a bot:
构建机器人时不该做什么:
11. Insist on the “one skill = one task” philosophy
11.坚持“一项技能=一项任务”的理念
12. Not leverage the debugging tools of the platform
12.不利用平台的调试工具
连接和用户体验 (Connecting and User Experience)
When connecting your bot, you have to decide where it is going to be available to your users, and therefore work on a user experience. There are a few things to know to provide an enjoyable UX, the first one being: your bot has to look pretty. An attractive bot with plenty of buttons, graphic elements, HD pictures, colors, and a good personality makes all the difference.
在连接机器人时,您必须决定用户可以在哪里使用它,因此可以提供用户体验。 提供令人愉悦的UX有几件事情要知道,第一件事是:您的机器人必须外观漂亮。 一个具有大量按钮,图形元素,高清图片,颜色和良好个性的诱人漫游器,将使一切大为不同。
But how do you get that?
但是你怎么得到的呢?
First, think of your audience when you choose your channel. If you’re targeting the 50 to 65 age demographics, you’re probably not going to put your bot on Kik! Don’t try to attract your audience to a channel they don’t use, even if it’s better. Instead, integrate the bot where your users already are.
首先,选择频道时要想想观众。 如果您要定位50至65岁年龄段的人口统计信息,则可能不会将机器人放到Kik上! 即使效果更好,也不要试图吸引观众使用他们不使用的频道。 而是将bot集成到您的用户所在的位置。
Then, keep in mind a chatbot is a conversational interface. Conversations are interactive exchanges; therefore, your bot should never reply with long-winded blocks of texts (more than 60 characters is getting long).
然后,请记住,聊天机器人是一个对话界面。 对话是互动交流; 因此,您的漫游器绝对不要回复冗长的文本块(超过60个字符的字符越来越长)。
Separate replies into different messages, use images, buttons, lists and other UX components based on the channel you use to make it lively. It’s also important to create a rewarding conversation: your bot isn’t an FBI agent. Nobody wants to be asked 20 questions before getting an answer. Instead, create your flow and UX to provide an answer every 3 or 4 exchanges to keep the user engaged.
根据您用来使之生动活泼的渠道,分别回复不同的消息,使用图像,按钮,列表和其他UX组件。 建立有意义的对话也很重要:您的漫游器不是FBI代理。 在回答之前,没人想问20个问题。 而是创建您的流程和UX,每3或4次交换提供一个答案,以保持用户的参与度。
Since we provide a powerful natural language processing API with our bot building tool, our users tend to want to do everything through language. While that’s admirable, we still advise to diversify: offer cards, buttons and other graphic elements for interactivity and ease of use, but still make sure the entire flow can be done using natural language. That’s when users know your bot is the real deal.
由于我们在Bot构建工具中提供了强大的自然语言处理API,因此我们的用户倾向于通过语言来完成所有工作。 尽管这很令人钦佩,但我们仍然建议多样化:提供卡片,按钮和其他图形元素,以提高交互性和易用性,但仍要确保可以使用自然语言完成整个流程。 那时候用户知道您的机器人才是真正的交易。
Giving a personality to your chatbot is essential, however you have to find the right balance. We always advise to let your users know they’re talking to a bot. It’s simply expectation management!
赋予聊天机器人个性是必不可少的,但是您必须找到适当的平衡。 我们始终建议您让用户知道他们正在与机器人聊天。 这仅仅是期望管理!
A human talking to another human is going to expect the highest level of interaction, whereas a human talking to a bot is going to know that they can’t ask about anything and everything. However, don’t make it too robotic: give it a name, an image, and use smileys and tone of voice to make it memorable.
一个与另一个人聊天的人将期望最高水平的交互,而一个与机器人聊天的人将知道他们无法询问任何事情。 但是,不要过于机器人化:给它起一个名字,一个图像,并使用笑脸和语气使之令人难忘。
What not to do when building a bot:
构建机器人时不该做什么:
13. Mis-identify the channel your audience is using
13.错误标识您的受众所使用的频道
14. Create conversations where the user has to answer 4+ questions to get a first answer
14.创建对话,用户必须回答4个以上的问题才能获得第一个答案
15. Send blocks of texts as replies (more than 60 characters is too much)
15.发送文本块作为答复(超过60个字符太多)
16. Discard all UX elements (buttons, cards, lists, etc) just to focus on text
16.丢弃所有UX元素(按钮,卡片,列表等),仅专注于文本
17. Pass your bot as a human person
17.通过机器人成为人类
18. Not giving your bot a personality that attracts your audience
18.不要给机器人一种吸引观众的个性
保养 (Maintenance)
Once your bot is in production, your job is not done! Maintaining your bot is an essential part of its long-lasting success. That mainly consists of fine-tuning your training and monitoring what your users are saying to adapt your flow or create new use cases.
一旦您的机器人投入生产,您的工作就不会完成! 维护您的机器人程序是其持久成功的重要组成部分。 这主要包括微调您的培训和监视用户在说什么,以适应您的流程或创建新的用例。
When training, proceed with caution. While it is important to add new user sentences via the log feed, you do not want to unbalance the training you’ve created that already works. Don’t swamp your intents by adding all the new expressions, only add what’s necessary. Keep in mind that all intents have to be trained the same amount! If one intent has 100 expressions and the other has 10, that’s no good. Therefore, check regularly when assigning new expressions. Our training analytics are your best friend when it comes to improving your training data!
培训时,请谨慎操作。 通过日志供稿添加新的用户句子很重要,但是您不希望失去已经创建的,已经有效的培训的平衡。 不要通过添加所有新表达式来表达意图,仅添加必要的内容。 请记住,必须对所有意图进行相同数量的培训! 如果一个意图有100个表达式,而另一个意图有10个表达式,那就不好了。 因此,分配新表达式时请定期检查。 在改善培训数据方面,我们的培训分析是您最好的朋友!
Finally, your log feed is the place where you can see what users are talking about. Do you see a topic that your users are raising frequently that your bot doesn’t yet manage? Why not integrate it into your flow? That’s the best way to show your community that the bot they’re using is always striving to provide a great experience.
最后,您可以在日志供稿中查看用户在说什么。 您是否看到您的用户经常提出的主题,而您的漫游器尚未管理该主题? 为什么不将其集成到您的流程中? 这是向您的社区展示他们正在使用的机器人一直在努力提供出色体验的最好方法。
What not to do when building a bot:
构建机器人时不该做什么:
19. Thinking that once the bot is in production, your job is done
19.认为一旦机器人开始生产,您的工作就完成了
20. Overflow intents with new user expression and mess up your existing training
20.新用户表达的意图溢出,使现有培训混乱
21. Create inequalities in your intent size
21.意图大小造成不平等
22. Not pay attention to how people are using your bot
22.不注意人们如何使用您的机器人
With all this in mind, you are fully on-board to build a first kick-ass bot! If you’re ready to go further, this step-by-step tutorial can guide you through the actual process to build an awesome joke-telling chatbot!
考虑到所有这些,您就可以全面构建第一个踢屁股机器人! 如果您准备好进一步,此循序渐进的教程可以指导您完成实际过程,以构建一个很棒的讲笑话聊天机器人!
Happy building!
建设愉快!
Originally published on SAP Conversational AI Blog.
最初发布在SAP Conversational AI Blog上 。
msbuild构建步骤