{"id":53504,"date":"2019-12-03T00:00:00","date_gmt":"2019-12-02T21:00:00","guid":{"rendered":"https:\/\/prohoster.info\/blog\/blog_prohoster\/bot-nam-pomozhet"},"modified":"2020-02-18T14:01:25","modified_gmt":"2020-02-18T11:01:25","slug":"bot-nam-pomozhet","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/bot-nam-pomozhet","title":{"rendered":"The bot will help us","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"The bot will help us\" src=\"\/wp-content\/uploads\/2019\/12\/394ff27f220e9b0eab689d46db4ba0b0.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nA year ago, our beloved HR department approached us with a request: to write a chatbot that would assist in onboarding newcomers to the company. <\/p>\n<p>Let\u2019s clarify that we do not develop our own products, but we provide clients with a full range of development services. This story will focus on our internal project, for which the client is not an external company, but our own HR. The main challenge, given the limited availability of people, resources, and time, is to complete the project on schedule and release the product. <br \/>\n <noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\nFirst, let us outline the tasks that needed to be addressed. <\/p>\n<p>Developers are mostly introverts and prefer writing their questions in an electronic chat; it\u2019s much easier than figuring out whom to ask, who to call, where to go, and even where to find information, and whether it is up to date. <\/p>\n<p>The second issue is indeed information \u2014 there is a lot of it, it comes from different sources, and it is not always available and needs constant addition and updating.<\/p>\n<p>The company has nearly 500 employees who are located in different offices, time zones, and cities across Russia and even abroad, so there are usually many questions. Therefore, another task is to reduce the load on the HR personnel related to the most frequently asked questions by employees.<\/p>\n<p>It was also necessary to automate processes: the onboarding of newcomers to the company, the sending of messages to managers and mentors of newcomers, and the sending of automatic reminders about courses and tests that a newcomer must complete for successful adaptation.<\/p>\n<p>Based on business requirements, technical specifications were formulated.<\/p>\n<p>The bot must operate on Skype (historically, it has been the tool used within the company), so a service on Azure was chosen.<\/p>\n<p>To restrict access, we began using an authorization mechanism through Skype.<br \/>\nFor text recognition, we used the ParlAI library.<\/p>\n<p>An administrative web portal is also necessary for configuration, training, debugging, setting up notifications, and other tasks.<\/p>\n<p><img decoding=\"async\" alt=\"The bot will help us\" src=\"\/wp-content\/uploads\/2019\/12\/dd7d471ab756309d8fb71bd17153ca73.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nDuring the project, we encountered a whole range of problems and challenges.<\/p>\n<p>For example, there were technical issues with the Azure account. Microsoft was unwilling to activate our subscription due to some internal technical difficulties within their service. For almost two months, we couldn't do anything about it; Microsoft support ultimately threw up their hands and directed us to partners who successfully configured everything and provided us with an account.<\/p>\n<p>The most challenging stage was the project's kickoff, where we needed to decide what to use, what the architecture would be, how and where to store data, and how the system's components and modules would interact with each other.<\/p>\n<p>In our case, the typical challenges of starting any project were further complicated by staffing issues. The nature of our business means that, unlike commercial projects, internal projects often involve developers who lack sufficient knowledge in the necessary areas\u2014they just found themselves waiting on the bench for the next big cool commercial project. Naturally, motivation in such situations was quite difficult. Productivity dropped significantly, there were often lags in the team, and we had to persuade (motivate) or replace team members. When changing developers, training had to be conducted, knowledge handed over, and the project essentially restarted. Each new developer saw the architecture differently and criticized their predecessors for the decisions they made and the foreign code. It often led to a complete rewrite from scratch.<\/p>\n<p>This continued for about six months. We were just treading water, refactoring the code without writing anything new.<\/p>\n<p>Additionally, internal projects typically lack documentation, making it challenging to know what needed to be done at any given moment and what the current priorities were. It was necessary to create a permanent team, establish processes, and conduct planning and assessments for at least three months. But how do you do that when the project isn't commercial, meaning that human hours need to be invested as minimally as possible while still achieving results comparable to those for external customers?<\/p>\n<p>We identified a pool of resources involved in the project development, who are familiar with it and want to work on it. We created a schedule for people's involvement in the projects. We conducted an assessment and alignment of tasks, and integrated these tasks into the \"gaps\" between the main projects. In four months, we obtained a working prototype of the application.<\/p>\n<p>Now, let's discuss in more detail the functionality of the bot, its architecture, and technical solutions.<\/p>\n<p>One of the main requirements from HR was the ability to recognize text written by a user in order to provide an appropriate response to a question. A user can write\u2014 I want to go on vacation, I want leave, or I would like to take leave, and the bot will understand and respond accordingly. Or, if suddenly an employee's chair breaks, and they want to say\u2014 \"the chair is broken\" or \"my chair has cracked\" or \"the backrest of the chair fell off,\" with proper training, the bot will recognize such requests. The quality of text recognition, of course, depends on the training of the bot, which we will discuss later.<\/p>\n<p>The next requirement and part of the functionality is the bot's dialog system. A system was developed where the bot can hold a conversation and understand the context of the current question. It can ask clarifying questions in response to your question and continue the conversation, if we have trained the bot to do so. Skype supports simple menu items to guide users about possible conversation continuations. Also, if we were having a conversation but suddenly decided to ask an off-topic question, the bot will understand that too.<\/p>\n<p>The bot allows sending various artifacts to the user based on their personal data. For example, their location. Suppose a person wants to find a restroom, they will be shown a map of the office leading them to the restroom. The map will be selected depending on which office the employee is located in.<\/p>\n<p>One of the most important tasks is to protect users' personal information. We cannot allow everyone to access the confidential data that our bot operates with. The need for authorization for such a bot is an integral part of its functionality. The bot asks the user to go through authorization before any dialogue can begin. This occurs during the first interaction of an employee with the bot. The authorization redirects the user to the relevant page, where they receive a token that is then inserted into the Skype message. If the authorization is successful, communication with the bot can commence.<\/p>\n<p><img decoding=\"async\" alt=\"The bot will help us\" src=\"\/wp-content\/uploads\/2019\/12\/9253ed378739eab212df9accc4cec917.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nAuthorization is done through Skype \u2014 the authorization service portal, the corporate network, and LDAP. Thus, authorization depends on the current data about the user in the corporate network.<\/p>\n<p>During the development of the bot, we realized that a system integrated into the portal's functionality was needed to help HR quickly debug the bot. We added a page on the portal where HR can see errors reported by users when interacting with the bot and address them through retraining or leave them for developers.<\/p>\n<p>The capability to train the bot directly on the portal was not included from the very beginning. Throughout the development process, we understood that training the bot would be the most frequent task performed by HR when working with it, and sending files with text to developers for additional training of the bot is completely unacceptable. It consumes too much time and generates too many errors and issues.<\/p>\n<p><img decoding=\"async\" alt=\"The bot will help us\" src=\"\/wp-content\/uploads\/2019\/12\/65f97b48b0b7e3b7bb5b93859a578cab.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nWe created a UI on the portal for user-friendly bot training. It allows HR to see the current training of the bot, retrain it, and make adjustments to the current training. The training is presented in a tree structure, where nodes, or branches, are continuations of the dialogue with the bot. Simple question-and-answer pairs can be created, as well as extensive dialogues, depending on HR's needs.<\/p>\n<p>A few words about the architecture of the solution.<\/p>\n<p><img decoding=\"async\" alt=\"The bot will help us\" src=\"\/wp-content\/uploads\/2019\/12\/de39426e211e7bb20b543e27f848cb8e.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nThe architecture of the solution is modular. It includes services responsible for various tasks, namely:<br \/>\n\u2022 Skype Bot Service on Azure \u2014 receives and processes user requests. This is a fairly simple service that first accepts the request and performs its initial processing.<br \/>\n\u2022 Admin Portal \u2014 a service that provides a web interface for configuring the portal and the bot itself. The bot always contacts the portal first, and the portal decides what to do with the request next.<br \/>\n\u2022 Authorization Service \u2014 provides authentication mechanisms for the bot and the admin portal. Authorization occurs via the Oauth2 protocol. Upon successful authorization, the service verifies the user\u2019s credentials within the corporate network, allowing the system to control errors related to data desynchronization.<br \/>\n\u2022 AI Text Recognition Module, written in Python and using the ParlAI framework for text recognition. This is a neural network, at least in its current implementation. We use the tfDiff algorithm to understand questions. The module provides an API for interaction and training.<\/p>\n<p>In conclusion, I want to say that this is our first experience in creating a chatbot, and we tried to make the system as simple as possible while maintaining functionality, with minimal effort spent on it. I think we've created a rather interesting product. With its own training system, error logging, notification dispatches, it can also be integrated with any other messenger.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/478342\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0413\u043e\u0434 \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u0448 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 HR \u043e\u0442\u0434\u0435\u043b \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439: \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0430\u0442 \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041e\u0433\u043e\u0432\u043e\u0440\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432, \u043d\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0435\u043a\u0442\u0440 \u0443\u0441\u043b\u0443\u0433 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u0420\u0430\u0441\u0441\u043a\u0430\u0437 \u043f\u043e\u0439\u0434\u0435\u0442 \u043e \u043d\u0430\u0448\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044f\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f, \u0430 \u043d\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 HR. \u0418 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-53504","post","type-post","status-publish","format-standard","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0413\u043e\u0434 \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u0448 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 HR \u043e\u0442\u0434\u0435\u043b \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439: \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0430\u0442 \u0431\u043e\u0442\u0430.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/bot-nam-pomozhet\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0411\u043e\u0442 \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0413\u043e\u0434 \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u0448 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 HR \u043e\u0442\u0434\u0435\u043b \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439: \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0430\u0442 \u0431\u043e\u0442\u0430.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/bot-nam-pomozhet\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-12-02T21:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-18T11:01:25+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47The bot will help us | ProHoster","description":"A year ago, our beloved HR department approached us with a request: to write a chatbot.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/bot-nam-pomozhet","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0411\u043e\u0442 \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 | ProHoster","og:description":"\u0413\u043e\u0434 \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u0448 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 HR \u043e\u0442\u0434\u0435\u043b \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439: \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0430\u0442 \u0431\u043e\u0442\u0430.","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/bot-nam-pomozhet","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-12-02T21:00:00+00:00","article:modified_time":"2020-02-18T11:01:25+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"53504","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-24 07:39:21","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 20:23:56","updated":"2026-01-24 07:39:21","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/53504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=53504"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/53504\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=53504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=53504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=53504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}