{"id":13691,"date":"2022-05-04T07:00:49","date_gmt":"2022-05-04T05:00:49","guid":{"rendered":"https:\/\/sii.pl\/blog\/?p=13691"},"modified":"2023-07-05T10:03:12","modified_gmt":"2023-07-05T08:03:12","slug":"rpa-and-intelligent-document-processing","status":"publish","type":"post","link":"https:\/\/sii.pl\/blog\/en\/rpa-and-intelligent-document-processing\/","title":{"rendered":"RPA and intelligent document processing"},"content":{"rendered":"\n<p>Document processing and handling is an everyday challenge faced by both small and large enterprises. Invoices, receipts, order forms, and documents come in large quantities, from various sources, in various quality and formats.<\/p>\n\n\n\n<p> None can be omitted; they are all equally important and must be introduced and processed as part of the company&#8217;s systems and processes.<\/p>\n\n\n\n<p>If this issue is familiar to you, Dear Reader, then you are probably a member of a team that tirelessly cares about the flow and processing of documents in accordance with procedures. Or you may be related to RPA and are looking for innovative solutions to help your co-workers automate this responsible task.<\/p>\n\n\n\n<p>I invite you to read this article, where I will try to explain the issue of intelligent document processing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Intelligent document processing &#8211; what is it?<\/h2>\n\n\n\n<p>Intelligent document processing is designed to optimize the tedious document handling process by engaging machine learning models. There are already many ready-made solutions on the market, and there will certainly be even more of them. For example, <strong>ABBYY Flexi Capture<\/strong> and <strong>AWS Document Understanding Solution (DUS) <\/strong>are worth mentioning.<\/p>\n\n\n\n<p>While these tools can retrieve information from documents, unfortunately, we still need the right tools to use this information. If only because not all applications have an API.<\/p>\n\n\n\n<p>Please note that the information returned may contain errors. Unfortunately, AI still makes a lot of mistakes in this aspect.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter wp-image-13674\"><a href=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc1.jpg\"><img decoding=\"async\" width=\"736\" height=\"688\" src=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc1.jpg\" alt=\"A bit of humor for starters\" class=\"wp-image-13674\" srcset=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc1.jpg 736w, https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc1-300x280.jpg 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><figcaption class=\"wp-element-caption\">Fig. 1 <a href=\"https:\/\/pl.pinterest.com\/pin\/856950635335327559\/\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\" >A bit of humor for starters<\/a><\/figcaption><\/figure>\n\n\n\n<p>UiPath, which has been trying to provide comprehensive solutions for process automation beyond RPA robots, is also trying to solve this problem. One of such solutions is <strong>Document Understanding<\/strong>, the development of which I have been observing with interest since 2020, and I am convinced that it is a solution that deserves attention.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">UiPath and Document Understanding \u2013 solution elements<\/h2>\n\n\n\n<p>Document Understanding is a UiPath framework for processing documents and is not intelligent. At most, it <strong>provides methods<\/strong> (I would call them classic) for <strong>processing structured and repetitive documents with the use of regular expressions.<\/strong><\/p>\n\n\n\n<p>To discover its full potential, you should equip yourself with the AI \u200b\u200bCenter and Action Center.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The AI \u200b\u200bCenter is at the heart of the entire endeavor. It provides access to machine learning models, stores data used for model training and evaluation, and enables the definition and planning of training.<\/li>\n\n\n\n<li>Action Center is the user interface. This is where people&#8217;s ability to make decisions comes into play when there is a suspicion that data has been misunderstood. The user can correct the data or report an exception to the document being processed.<\/li>\n<\/ul>\n\n\n\n<p>Both services are available as separate UiPath products and can be used in both client-side installation and cloud-based service.<\/p>\n\n\n\n<p><strong>Document processing<\/strong><\/p>\n\n\n\n<p>Equipped with these elements, and knowledge about their purpose, we can take a look at the document processing itself:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter wp-image-13675\"><a href=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc2.png\"><img decoding=\"async\" width=\"1213\" height=\"390\" src=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc2.png\" alt=\"Diagram: Document processing\" class=\"wp-image-13675\" srcset=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc2.png 1213w, https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc2-300x96.png 300w, https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc2-1024x329.png 1024w, https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc2-768x247.png 768w\" sizes=\"(max-width: 1213px) 100vw, 1213px\" \/><\/a><figcaption class=\"wp-element-caption\">Fig. 2 <a href=\"https:\/\/docs.uipath.com\/document-understanding\/docs\/introduction\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\" >Document processing steps<\/a><\/figcaption><\/figure>\n\n\n\n<p>From the diagram above, two key elements emerge from the perspective of adjusting the tool to our needs: the stages of classification and extraction.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Classifiers are used to identify and classify processed documents. Is the document an invoice or an order, or is it an unknown document? This is the <strong>stage that determines the use of an appropriate extractor<\/strong>.<\/li>\n\n\n\n<li>Extractors take out information from documents. Information taken out from an invoice can be for example: a number, issue date, payment date, tax rate, individual items, and sum. <strong>The extracted data can be delegated to robots responsible for handling a given document.<\/strong><\/li>\n<\/ul>\n\n\n\n<p>The classification and extraction step are based on the confidence level expressed as a percentage. If the level of assurance regarding the processed document does not meet the specified requirements, such a document is delegated for human verification. <strong>The user<\/strong>, taking advantage of the validation station available in Action Center<strong>, confirms or corrects the data extracted by the robot.<\/strong> Verified data is available later in the process, and human validation data <strong>can be used in the AI \u200b\u200bCenter to train the model to improve model performance.<\/strong><\/p>\n\n\n\n<p>After a few model training sessions, you will notice an improvement in the performance of the model but be aware that the process of training the model itself may require many sample documents. <strong>Sometimes it takes a long time before we achieve a satisfactory effect<\/strong>. These numbers can go into tens or hundreds, if not thousands.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">AI Center \u2013 a point for servicing machine learning models<\/h2>\n\n\n\n<p>As already mentioned, the AI \u200b\u200bCenter is at the heart of the whole endeavor. It provides access to machine learning models, stores data used for model training and evaluation, and enables the definition and planning of training.<\/p>\n\n\n\n<p>It all sounds so great that I would like to say that UiPath has found a solution to all your document processing problems. Unfortunately, there is a catch. Well: whether a document can be subjected to data extraction is determined by the availability of the machine learning model.<\/p>\n\n\n\n<p>UiPath has prepared several models available by default for the most popular documents:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>invoice<\/li>\n\n\n\n<li>receipt<\/li>\n\n\n\n<li>order<\/li>\n<\/ul>\n\n\n\n<p>However, if our document does not fit into the framework of ready-made models, it is possible to create your own specialized models. It requires the <strong>involvement of someone familiar with Data Science, machine learning, and Python.<\/strong><\/p>\n\n\n\n<p>It is worth mentioning that the AI \u200b\u200bCenter, in addition to the models available by default, also includes open-source models for image, language, or emotion analysis in written text. Thus, AI Center extends the use of robots beyond document processing to, for example, email classifiers or product reviews.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">It&#8217;s me, your robot &#8230; You trust me, don&#8217;t you?<\/h2>\n\n\n\n<p>One of the undoubted <strong>advantages of RPA robots<\/strong>, next to the fact that they can work days and nights, is that the chance of making human mistakes, such as a typo or deviation from the process, is negligible. Unfortunately, the situation is different when it comes to intelligent document processing.<\/p>\n\n\n\n<p>Models operate based on data provided by OCR engines, and the results of OCR processing are directly dependent on the quality of the document itself, so when creating a robot, it is necessary to consider the level of OCR engine reliability.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">OCR engine errors<\/h3>\n\n\n\n<p>The following example is a perfect illustration of this situation:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter wp-image-13676\"><a href=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc3.jpg\"><img decoding=\"async\" width=\"1920\" height=\"1032\" src=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc3.jpg\" alt=\"UiPath validation station\" class=\"wp-image-13676\" srcset=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc3.jpg 1920w, https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc3-300x161.jpg 300w, https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc3-1024x550.jpg 1024w, https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc3-768x413.jpg 768w, https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc3-1536x826.jpg 1536w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><figcaption class=\"wp-element-caption\">Fig. 3 UiPath validation station<\/figcaption><\/figure>\n\n\n\n<p>The image above shows the UiPath validation station used to validate or correct the data extracted from the document. As can be seen, although the &#8220;Invoice Number&#8221; field has been recognized correctly, the confidence level of the invoice number is very high and acceptable (99%) but <strong>the value is incorrect.<\/strong><\/p>\n\n\n\n<p>This is a direct fault of the OCR engine. It may be caused by the small font and average quality of the document (jpg image 750&#215;1000). Unfortunately, the UiPath validation station does not currently display confidence levels about OCR processing results. These data are available on the robot code side and based on them, <strong>a document can be delegated for human validation<\/strong>.<\/p>\n\n\n\n<p>Here are the data available from the robot:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full wp-image-13677\"><a href=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc4.png\"><img decoding=\"async\" width=\"416\" height=\"480\" src=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc4.png\" alt=\"Data and confidence levels of the model and OCR engine\" class=\"wp-image-13677\" srcset=\"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc4.png 416w, https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/04\/Ryc4-260x300.png 260w\" sizes=\"(max-width: 416px) 100vw, 416px\" \/><\/a><figcaption class=\"wp-element-caption\">Fig. 4 Data and confidence levels of the model and OCR engine<\/figcaption><\/figure>\n\n\n\n<p>As a curiosity, a correctly recognized DateDue field with a low OCR confidence level should be indicated. OCR Confidence for tabular values is -1, and the value of each row is available in a separate data set.<\/p>\n\n\n\n<p>The natural conclusion is that <strong>skipping the OCR engine reliability check can lead to incorrect data being entered into the system<\/strong>, which is a fundamental problem. Just imagine a situation in which the robot posts an invoice for 180,000 for payment. PLN, instead of one hundred thousand PLN.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A few words of summary<\/h2>\n\n\n\n<p>Does this completely disqualify the tool? In my opinion \u2013 no. You should check the reliability factors of the OCR engine and the model. In the event of any deviation from the adopted levels of certainty, it is necessary to delegate such a document for human validation, even if everything turns out to be correctly recognized.<\/p>\n\n\n\n<p>When processing documents related to finances, I would suggest <strong>setting thresholds for amounts that are subject to absolute human validation<\/strong>. Additional security may be to <strong>use a second OCR engine and compare the results<\/strong>.<\/p>\n\n\n\n<p>Tools for intelligent document processing have been with us for a long time and certainly support the daily work of thousands of office workers in their constant struggle with the processing of hundreds of documents a day. The trust we can place in these tools is still an open issue.<\/p>\n\n\n\n<p>Who knows \u2013 perhaps, the level of their advancement will soon eliminate the trust problem?<\/p>\n\n\n\n<p>***<\/p>\n\n\n\n<p id=\"tw-target-text\"><span class=\"Y2IQFc\" lang=\"en\">If the topic of artificial intelligence is close to you, we encourage you to read the articles on: <a href=\"https:\/\/sii.pl\/blog\/vision-ai-sztuczna-inteligencja-ktora-wnosi-testowanie-na-wyzszy-poziom\/?category=testowanie&amp;tag=ai,sztuczna-inteligencja\" target=\"_blank\" rel=\"noopener\">AI in testing<\/a>, <a href=\"https:\/\/sii.pl\/blog\/en\/ai-powered-search-engine\/?category=soft-development\" target=\"_blank\" rel=\"noopener\">in search engine<\/a>s and <a href=\"https:\/\/sii.pl\/blog\/en\/ai-artificial-intelligence-an-overhyped-novelty-or-real-business-support\/?category=soft-development&amp;tag=ai-en,artificial-intelligence-en,digital-competency-center-en,nlp-en,rpa-en\" target=\"_blank\" rel=\"noopener\">in business support<\/a>.<\/span><\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-left kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;13691&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;3&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;11&quot;,&quot;greet&quot;:&quot;&quot;,&quot;legend&quot;:&quot;5\\\/5 ( votes: 3)&quot;,&quot;size&quot;:&quot;18&quot;,&quot;title&quot;:&quot;RPA and intelligent document processing&quot;,&quot;width&quot;:&quot;139.5&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} ( {votes}: {count})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 11px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 18px; height: 18px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 11px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 18px; height: 18px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 11px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 18px; height: 18px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 11px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 18px; height: 18px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 11px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 18px; height: 18px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 139.5px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 11px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 18px; height: 18px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 11px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 18px; height: 18px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 11px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 18px; height: 18px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 11px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 18px; height: 18px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 11px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 18px; height: 18px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 14.4px;\">\n            5\/5 ( votes: 3)    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Document processing and handling is an everyday challenge faced by both small and large enterprises. Invoices, receipts, order forms, and &hellip; <a class=\"continued-btn\" href=\"https:\/\/sii.pl\/blog\/en\/rpa-and-intelligent-document-processing\/\">Continued<\/a><\/p>\n","protected":false},"author":354,"featured_media":19739,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_editorskit_title_hidden":false,"_editorskit_reading_time":5,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","inline_featured_image":false,"footnotes":""},"categories":[1319],"tags":[1442,1329,1328,1330],"class_list":["post-13691","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-soft-development","tag-ai-en","tag-artificial-intelligence-en","tag-automatisation-en","tag-rpa-en"],"acf":[],"aioseo_notices":[],"republish_history":[],"featured_media_url":"https:\/\/sii.pl\/blog\/wp-content\/uploads\/2022\/08\/RPA-and-intelligent-document-processing-1.jpg","category_names":["Soft development"],"_links":{"self":[{"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/posts\/13691"}],"collection":[{"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/users\/354"}],"replies":[{"embeddable":true,"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/comments?post=13691"}],"version-history":[{"count":2,"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/posts\/13691\/revisions"}],"predecessor-version":[{"id":22649,"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/posts\/13691\/revisions\/22649"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/media\/19739"}],"wp:attachment":[{"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/media?parent=13691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/categories?post=13691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sii.pl\/blog\/en\/wp-json\/wp\/v2\/tags?post=13691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}