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上 。
翻譯自: https://www.freecodecamp.org/news/how-to-build-the-ultimate-ai-chatbot-by-following-these-steps-e0abe77a2b20/
msbuild構建步驟