One big factor in choosing an RPA product is cost, so here is an overview of all of the Open Source RPA software that I can find on Google.

Summary of Findings

I’m putting the summary up top in case you don’t want to read further. As of now, I wouldn’t recommend any of the Open Source RPA solutions to clients. I need to dig deeper into Automagica and Taskt first, as they look the most promising.

A list of sources for these open source projects include

https://github.com/topics/robotic-process-automation

https://github.com/topics/rpa

OpenRPA (1)

OpenRPA (2)

Actively developed as of May 2020. Has an odd installer that requires downloading a lot of packages straight from the web. I personally have security concerns over this. It also requires user registration in order to be used and cannot be used offline.

I tried disconnecting my Internet, and running the software, but it just closes the software immediately. So it isn’t a stable solution for people with spotty Internet connections, or start up founders who need to work on the road, or in different shared offices etc.

Generally, I dislike having to phone home and connect to the author’s servers, and the installer just downloading random packages off of the Internet. I’d love to explore this further but unfortunately the hard requirement of having an Internet connection limits its usefulness to me as a consultant as I frequently visit customer sites without Internet.

OpenRPA (3)

Python 3.7 based, last updated August 2019. The installer is a zip of the source code, and the documentation is quite bare bones. This is not for anyone but programmers at the moment – thank god I was one for 10+ years or I’d have no idea how to get started with this.

Opening the “Studio” (a batch file) opens up a local webserver and browser page. The GUI is … not quite user friendly, but it makes sense since I have both programming and RPA knowledge. This isn’t something you’d want to use if you aren’t at least at an intermediate level of knowledge of RPA and programming.

Overall, I’ll keep my eye on this one. It is very rough graphically, but with time could become a useful RPA software.

Robot Framework RPA

This really seems to be a testing suite for software development, and has limited uses for business automation. I read through all of the documentation and couldn’t even find out how to build a workflow with if else statements. Everything seems like straight through processing.

Automagica

This is a promising looking Python based solution, but it is again very programmer (coding) heavy. Actively developed as of May 2020. It seems to be a 2 man company trying to build a competitive product to the big RPA vendors, as the pricing is possibly even more than what the big vendors have.

They have a hosted SAAS model with a “free” usage that is limited to 1 robot and 50 automation runs per month. I believe that if you use their pure code solution that you can get around those limits, but I haven’t tried so myself yet.

TagUI

This is another command line based automation framework that requires you to learn their proprietary language. From their documentation, desktop applications can only be automated using Images which is troublesome. Imagine trying to automate Excel 2016 vs 2012 vs office 365, which all have different user interfaces and icons. This would work if you only intend to use RPA on a single PC, and never update the applications.

Sensitivity (Recall) and Specificity

False positives more acceptable in your business case? E.g. marking non fraud case is OK as long as we can catch all fraud = Highsensitivity. Or medical, making a false positive is OK, as we can follow up to check.

High specificity, classify video content so that we don’t allow child to watch adult content. False positives are unacceptable. We prefer false negatives, i.e. video is suitable but we don’t allow it

Sensitivity = cast a net, I want to catch ALL THE FISH in the lake. I don’t care if I catch frogs, bugs etc as long as I get all of the fish

Specificity = cast a net, I ONLY want to catch fish, I don’t want my net to have other things in it, but I’m ok with only catching some, and not all of the fish in the lake

Blue Prism is well known as an enterprise grade, unattended Digital Workforce Platform. Given Blue Prism’s strength in unattended RPA, there’s a misconception that Blue Prism cannot do attended RPA as well.

In fact, Blue Prism is perfectly capable of supporting Human in the Loop automation. It just requires Solution Designers to consciously design user interaction into their Blue Prism processes. In this article, we will explore some Blue Prism Process design considerations and describe some high level approaches on how to add human-robot interaction to your Business Processes.

Design Considerations

When
designing for Human in the Loop, think about the characteristics of your Business
Process and Blue Prism environment.

Input Time Sensitivity

There are three
main ways in which input could be time sensitive:

The
input data is time sensitive. For
example, the input could be an SMS or a security token that expires after 60 seconds

The
automated application is time sensitive.
For example, the application must receive input within 60 seconds, or it
will time out

The
Business Process is time sensitive (Service Level Agreements). For example, if work must be completed within
30 minutes of starting, then waiting for the User’s input can become a
bottleneck for the SLA if inputs to the process are not sent in a timely manner

When inputs
are time sensitive, it’s important to notify users that input is needed in real-time.
Providing a user-friendly way to enter data through developing custom forms or
interfaces will speed up input times as well.

Time
sensitive input processes lend themselves better to a “polling” style of design. If input is not time sensitive, then either a
“polling” or “multi-process” design can be considered.

User Access to Blue Prism
and the Environment

This
affects process design by allowing for different options to get user input into
Blue Prism.

Do
users have access to the Interactive Client or Runtime Resource machine? If so, startup parameters and the CLI can be
considered

Do
users have access to the Blue Prism network, or devices that are connected to
the network, such as FTP, email, database or network storage? If so, then these connected data sources can be
used to store input for Blue Prism to read

Can
users store their input online, and can the Blue Prism environment download
information from the Internet? If so, consider using online forms or API calls
connected to Web Services

License Usage

Another factor that will affect the design choices that are available to you are the number of Blue Prism licenses available in your environment. The affect of certain designs on the license usage will be discussed further in the sections below.

High Level Design
Approaches

Multiple Process Design and Startup Parameters

Startup parameters can only be input into Blue
Prism before a Process is run. Specifying
startup parameters is typically done by a Process Controller. However, this can be done by other users outside
of the Interactive Client as well, allowing other people to control what is
passed in before a process is started.

If data needs to be input at multiple points inside a Business Process, see if the Business Process can be designed as multiple Blue Prism Processes. Then, user inputs can be converted into startup parameters for use in the next portion of the Business Process.

For example, if you need to have user input
twice during the middle of Process execution, think about designing this as
three Blue Prism Processes:

The end of the previous Blue Prism Process should notify the necessary people that they need to provide input for the next Blue Prism Process that should be started. Once the input has been received, we can either start the next Blue Prism Process if it isn’t running yet, or add it as a new Work Queue Item if it is running already.

A multiple process design makes sense when inputs are not time sensitive. Instead of waiting for input, this design allows for other Work Queue Items to be processed.

Input time sensitivity for this design can be improved through more frequent scheduling of the subsequent Processes and executing them on more Runtime Resources. In doing so, the time gap between when input is sent from the User, to when it is picked up in Blue Prism can be reduced.

It is important to consider the impact on your license usage and SLAs in this kind of design, unless you never intend to run multiple sessions of the Blue Prism Processes at the same time.

A downside of using multiple Blue Prism Processes is that gaining a view of the overall progress of the work for reporting becomes more complex.

A Blue Prism Process can be started, with startup parameters specified as input using:

The Interactive Client, from either the Control Room or Scheduler

The Command Line Interface (CLI). You can start and schedule Processes from the CLI. The in-product help, provides an example on how to start a Process with startup parameters:

Web services. See page 21 of the Web Services Guide, which is available on the Blue Prism Portal. The use of web services also has implications towards the number of licenses used. A detailed discussion on this can also be found in the Web Services Guide

Many customers opt to custom build graphical
interfaces to simplify user input into Blue Prism Processes. These
are typically GUI programs that will feed input parameters to the CLI, or web
forms (such as Microsoft Forms) that will pass input into Blue Prism using web
services.

Single Process Design and Polling

If the Business Process should be designed as single Blue Prism Process (for instance, if input time is sensitive), then user input cannot be taken in using startup parameters. There should be a polling loop to wait at each point that needs user input.

The polling loop will check for the presence of input data and either sleep or continue with the process, depending on whether the input is received. Remember that your polling loop should have a maximum waiting time. This is to prevent an infinite loop from occurring in your process. Inside your polling loop, input data can be read from a variety of sources:

Network or FTP files, such as plain text or Excel

API call responses

Chatbots messages

Email subject and body

Database queries

SMS

A downside to this type of design is that it ties up your Runtime Resource while waiting for user input. What you get in return is a fast continuation of the process after the input has been received.

Once again, some customers choose to build custom UIs to facilitate the input of data back into Blue Prism.

In a polling design, your Business Process waits for input while executing the process. The number of licenses used is simple in this case. It’s the number of simultaneous polling processes that you have running at the same time.

If the Business Process doesn’t have an urgent SLA, or if you do not expect the user to be able to provide input quickly, you can consider a Single Process design without polling. Instead, think about deferring the Business Queue Item if the user’s input is not received and use Work Queue Item Statuses to skip process steps until the “waiting for input” step. This will allow other Work Queue Items to be worked on while waiting for the input data.

Third Party Services

There are several third party services that can be used to facilitate human-robot collaboration. One such example is TrustPortal.

These platforms (typically web based) allow RPA teams to:

Perform
user management

Set
access control, i.e. allow access to only the processes that a user should have
access to

Define
and create forms used to input data for a specific process

Notify
to users that input is needed

Present
forms to users to take in input

Translate
the user input back into a format that can be consumed by Blue Prism

Notify
users on any responses received back from Blue Prism

I wouldn’t be surprised if these
services use similar process designs to the ones I’ve mentioned above. However, if you don’t have the time to create
your own solution, or if you have heavy Human in the Loop requirements, consider
using one of the turnkey solutions that are available in the market.

In DevOps, it’s common to think of your IT infrastructure as either Pets or as Cattle.

RPA Process Selection and Design should be thought of in terms of Pets and Cattle as well.

What are Pet Servers?

Pet servers are often:

Highly specialized and few in number

Indispensable and cannot tolerate downtime

Setup and changed manually by hand

Scaled vertically (by increasing CPU or RAM)

Pet servers are characterized by being heavily cared for by staff and are often single points of failure like relational database servers, firewalls and mail servers. When a Pet server goes down, critical business functions are affected and there’s a panic to nurse the server back to health.

There’s an inherent risk associated with having Pet servers in any enterprise, as they are not easily replaceable, and there’s no automated way to bring them back up after failure.

What are Cattle Servers?

The alternative to having Pet servers, is to have Cattle servers. Cattle servers are:

Treated as a group and large in number

Created using scripted or automated methods

Scaled horizontally (by adding more servers)

Designed with failure in mind

Replaceable (disposable) and stateless

Over time, IT has shifted away from Pets, towards more and more Cattle. In the Cattle way of thinking, individual servers are not important; the group is. If a single server fails, a new server can take its place. In order for this to happen, servers must be stateless, i.e. processing a request must not depend on anything that is unique to that machine.

Analogous to IT infrastructure, for enterprise grade RPA, our processes should be thought of as cattleand not as pets.

This Pet vs. Cattle concept applies to RPA in two ways: Process Selection and Process Design.

Process Selection

One of the biggest questions for a new automation project is: Which processes should I automate?

Note that the advice in this section applies primarily to those just starting their RPA journey

Many companies choose Pet-like processes that are:

Highly specialized and few in number. Processes that only impact one or a few individuals and have low work volume have a hard time demonstrating the ROI of an enterprise RPA platform.

Indispensable and cannot tolerate downtime. While these types of processes may be suitable for those with a mature RPA capability, these characteristics pose too much risk for an immature RPA team. A failure here can sink the entire RPA endeavor

Setup and changed manually by hand. A process that was not consciously designed by the business, is often non-standardized with dependencies on one person’s knowledge, relationships or computer setup. It is significantly more difficult to reproduce the steps in a process that doesn’t have any standardization. The scope of the process can differ wildly depending on who you talk to, as it has undergone multiple undocumented revisions

Scaled vertically. Avoid choosing processes that ‘scale’ by adding more steps to the process as they likely have less potential for returning hours to the business compared to processes that scale horizontally

In the Pet RPA frame of mind, we are delivering something similar to Desktop automation or RDA, helping select individuals automate their ‘Pet’ tasks.

Instead, look to automate Cattle-like process that are:

Treated as a group and large in number. The successful implementation of processes automations that are high in work volume, affecting large numbers of people convincingly demonstrates the ROI and value proposition of enterprise RPA

Created using scripted or automated methods. Processes that have been consciously designed by business have an inherent level of standardization. The process is more easily reproduced in the RPA platform and has a well defined scope

Scaled horizontally. If you choose processes with high volume workloads, work can scale horizontally by running multiple Digital Workers in parallel. This will likely increase the hours returned to business much faster than low volume processes that scale by adding new work steps

With Cattle RPA, we are automating high volume, highly standardized tasks away from many people at once.

Process Design

Note that some of the design terminology used in this section refers to the Blue Prism platform. There are likely equivalent concepts available on other RPA platforms

After we’ve chosen our Cattle processes, we need to start designing them from a Cattle point of view. Recall that Cattle servers are expected to fail. They are disposable and stateless. These same principles should be applied to process design. Processes should be:

Designed with failure in mind

Use the Work Queue Item Status to keep track of what process steps have been completed. If the whole Work Queue Item needs to be retried, check the Status and skip process steps that have already been successfully completed

Have exception handling with retry loops to retry common failures that happen inside your process, such as application and page loading timeouts

Consider splitting the process into multiple processes and queues. For example, it is common for processes to have a “notification” or “reporting” step after completing the required work. Creating the report and emailing the results can be split off into a separate process to prevent email failures from marking the entire process as an exception

Replaceable and stateless. Avoid storing anything on the Digital Worker or assuming the state of the computer system. If state is needed, it should be stored in a central repository that is accessible from all Digital Workers, for example: FTP, network attached drives, or cloud storage. Design your process to work on any computer that has the correct set of applications installed. This will help ensure that many runs of the process can occur simultaneously

Adopting the Cattle way of thinking has led to more robustness, fault tolerance and scalability for IT infrastructures. It can do the same for your RPA.

]]>Google Cloud Professional Cloud Architect Certification Renewalhttps://jybman.com/2020/01/30/google-cloud-professional-cloud-architect-certification-renewal/
Thu, 30 Jan 2020 13:42:41 +0000http://jybman.com/?p=290My GCP Certification has one month left for renewal, so I’m going to put my notes here. My primary source of study is Linux Academy, where I have a yearly subscription. The Coursera Course is also free to audit.

Edit: 21 February , 2020 – Passed

GCP Certified for another 2 years…

IAM

Account Types

Cloud Identity Domain – group of all google accounts in an org. Can sync AD

allUsers

allAuthenticatedUsers

Google Group

Service accounts (not a person), used for interactions within GCP resources and applications.

I’ve been doing pro-bono work with HandsOn Hong Kong (HOHK) for a while and I was asked to help them integrate their website to Social Career. Social Career is launching a new volunteer opportunity aggregator, Volunteer Movement https://volunteermovement.hk/ on Jan 31st 2020, to help promote volunteerism to the people of Hong Kong. HOHK, being one of the largest volunteering platforms in HK was asked to join.

In order to connect HOHK to Social Career, I needed to develop an API that could be called by Social Career every night.

The Technology

To complete the integration, I chose to use Azure functions + Python, partly to learn Azure functions and partly because HOHK is entitled to $3,500 USD of sponsored Azure credits that from Microsoft for Nonprofits. I felt that functions would incur the least amount of costs for the API, since it only needs to be called a few hundred time per day within a ~30 minute period. I also chose the relatively new Serverless Database based on this usage pattern. Finally, I also created a Logic App to run a scheduled task to for database cleanup.

Azure Functions, Python and VSCode

Creating the API with VSCode was extremely smooth. Azure functions have great integration with VSCode, and you can deploy changes to the functions directly from the IDE. I’d readily work with this setup in the future if need be.

One downside to using Python is that you can’t edit the code directly inside of Azure. You have to edit it in VSCode and redeploy every time.

The documentation for Functions + Python is OK, enough to get you started.

Serverless Database

I ran into issues using the lowest tier Serverless Database, specifically with the cold start time. When I tested the code, everything was responding quickly, but when it was called after the DB had spun down, the database connection’s 10 second timeout period would fail. I needed to implement a loop to retry the initial database connection and sleep if it failed, to ensure that there was enough time for the database to wake up.

Response times to the API after wakeup are pretty long, anywhere from 5000-6000 ms. After that, response times were between 500-1000 ms.

Cost Breakdown

The costs of this solution are 99% taken up by the Serverless Database VCores. I’m estimating a cost of ~30 USD a month based on current usage.

]]>RPA for Startups?https://jybman.com/2020/01/27/how-rpa-would-have-helped-my-start-up/
Mon, 27 Jan 2020 04:27:50 +0000http://jybman.com/?p=263I’ve now worked at Blue Prism for ~1.5 years, taking part in one of the fastest growing trends in technology and business transformation: Robotic Process Automation (RPA). Thinking back on my career for 2020, I’ve developed a clear idea of how I would have used RPA to automate operations at a startup that I co-founded in 2015, and how other Small to Medium sized Business could as well.

What is RPA?

When someone asks me what I do, I say that I’m a Robotic Process Automation consultant. This leads to the question, “What is RPA?”. As a simple first explanation, I describe RPA as:

Replacing white collar, computer-based work tasks with robots.

Just as factories have replaced repetitive, manual human labor with physical robots or machines, so will office work be replaced with software robots working at our computers. RPA is the technology that enables this to happen.

RPA is a software system that can control a computer exactly how a human would. An RPA “robot” can do things like:

Open your email and download an attachment

Open a browser, type in an address into the address bar and visit a webpage

Login to a webpage, fill in forms and submit the page

Everything that we do at a computer can be done by an RPA robot. We’ve all heard the stories: that robots will eventually take all our jobs with all of the benefits being claimed by the robot owners. It’s probably better to think of robots as taking away specific tasks, as opposed to our jobs. However, the general trend towards automation is underway, it’s just that small business owners and startup founders haven’t caught on yet.

Large companies have already caught on to RPA. Take a look at the statistics:

More than 40% of enterprises will create state-of-the-art digital workers by combining AI with Robotic Process Automation

Can Small Businesses Benefit from RPA?

The benefits of RPA are real and well-documented for large companies and multinationals. But it’s not just for large companies anymore. There are many reasons why RPA can be beneficial to companies of smaller scale.

You likely do not have an internal IT team that can help automate or optimize internal operations. RPA can absolutely be implemented for you by outsourcing as you may already do with lawyers, or accountants. There’s a lot of education material out there if you want to learn RPA today as well

Lots of SMBs falsely believe that they can only expand or grow by hiring more people. Instead of hiring staff to help you do computer work, use an RPA robot to bring hours back to your business. Focus on developing new areas of your company or choose to simply do less work

Implementing RPA will force you to optimize, rethink and systematize your business. A lot of small companies that I’ve seen are exceptionally weak in having consistent business success, due to a lack of repeatable processes. Embarking on RPA will force you to figure out these areas, turning your business into a series of well defined, automate-able processes

Unlike large companies, SMBs and startups are essentially not thinking about RPA at all. Being among the first batch of RPA adopters at the SMB level will simply give you a two to three year competitive advantage over your peers

RPA is now more accessible. Cloud based RPA offerings are reducing the infrastructure overhead of deploying a robotic workforce. Startups lean towards using lots of cloud services, which have APIs that can be connected to RPA tools

How I would have used RPA at my Startup

From 2015-2017, I was the technical co-founder of a startup named Flexibill. The idea behind the company was to allow any retail shop or store to receive online payments, instead of just cash or credit cards. AKA allowing for flexible billing for retailers who didn’t have the means to sign up and manage multiple payment systems like Apple Pay, Wechat Pay, Samsung Pay etc.

Three years of hard work…

Even though we were a small company, there are definitely occasions where we would have benefited from using RPA:

Each time we signed up a new restaurant or shop to our service, there was a lot of information that needed to be processed, such as business name, address, bank account information, contact person etc. This was collected in a word form and then entered by our admin staff into our ERP system. I would have built an RPA process to do this instead

Each shop needed its own unique machine learning model to process their paper receipts. Every time we on-boarded a new customer, we had a “data collection” period where all payment functions were disabled, and we would collect tgeur receipt data for two days, in order to “learn” their receipt. This data was used to build a model using various pieces of AI software and once ready, we would set a flag in our database to actually allow the customer to receive payments through our system. It was a standardized process, manual, error prone and integral to the operation of our business; a perfect candidate for automation

Every month we would hand employees a printed check with their salary, and a paper invoice for their records. The entire process of printing the checks, creating a word document invoice, saving that invoice into our file-server and printing the invoice could have been automated and set to run on a monthly schedule

Our company was part of a government sponsored incubator, which required us to fill in forms about our financials, head count, customer numbers, etc. It took us, the founders, about a half day per month to log in to all of the bank accounts, pull all the related customer data from the database, etc. to fill in the spreadsheet required by the incubator. This is an prime example of a time consuming, low business value, process required by a regulatory body, that is a common target for automation

Sadly, RPA was a complete unknown to me at the time. But if I had a time machine, I would have definitely used RPA, even at a start-up, as it really only improves your competitiveness in the market.

Now, with the current cloud-based offerings, adoption would be even easier and the cost of learning RPA would not have been prohibitive, considering that we were technology-focused.

What do the most effective RPA development teams look like? As an RPA consultant, I’m exposed to tons of RPA teams and projects and the best teams do have something in common.

The ones that do the best are primarily 70-80% non-technical, with the remaining members having some technical (programming or software development) background. If the development team is primarily outsourced (i.e. external consultants) it’s best to have at least one or two team members from the actual company itself developing alongside the contractors.

Business Focused Teams

This situation happens when RPA is primarily driven by business and not IT.

Most RPA platforms offer a ‘no-code’ or low-code style of development, which is true for about 95% of your automation work. But there will always be those 5% edge cases that are better solved (or can only be solved) by actual programming. Examples of this include dealing with foreign language MS Office documents, or trying to ‘kill’ an unresponsive application.

These kinds of highly technical humps can stall development teams comprised of purely business-focused RPA developers. That’s why I’d encourage these teams to work with IT and bring in one or two software development savvy people to join the RPA centre of excellence.

Technical Focused Teams

If your RPA is IT driven, you may end up in a situation where all of the RPA development team comes from IT.

A highly technical RPA team has a few drawbacks. First of all, they like to rely more on calling external scripts (for example, calling Python through the command line) to complete automation work. Process steps turn into a ‘black boxes’ which are harder to maintain, understand and test by the business team, who will sign off on them. If multiple steps happen inside the script, the ability to audit and debug the steps are reduced. You’ll need to implement a separate logging solution within your code to keep track of which steps succeeded and which steps failed inside the code.

A second issue is that technical teams don’t always have delivering businesses value as the number one priority. They may choose to automate processes based on their own criteria, (e.g. simple processes, or processes that cause the least amount of headaches technically), which has low ROI and weakens the value proposition of RPA as a new endeavor to the company.

The Right Mix

The right answer lies somewhere in between. High performing teams tend to focus on having team members coming from the business itself, but with some technical teammates from IT who can help them overcome difficult technical problems.

If you’re wanting to read about the different RPA products and where they stand, you can take a look at various RPA market research reports.

There’s four big marketing research reports that are commonly cited in the industry by RPA vendors for sales and marketing reasons:

Forrester Research

Everest Group

Gartner

Horses for Sources

You’d normally have to pay to see these reports, but ABU (Automation Anywhere, Blue Prism, UiPath) have special agreements to distribute the reports in exchange for your contact information. Basically, if ABU typically rank somewhere in the top 3 places of all of these market reports, and use them as sales tools in exchange for your information.

Intelligent Automation is currently one the hottest topics in Robotic Process Automation’s (RPA), but there’s little to no information on how to implement it in a practical manner.

If you’re a part of an RPA team, you’re likely wondering how you can get started with integrating Artificial Intelligence (AI) and Machine Learning (ML) into your RPA platform. Having worked in ML and RPA fields for over five years, I’ve developed some ideas to help RPA teams structure their thinking around Intelligent Automation delivery.

Note that this article is actively undergoing revision as I get better ideas on how to achieve Intelligent Automation.

Types
of AI in RPA

When discussing the combination of
AI and RPA, there’s really three completely separate topics:

Adding AI to your automated Business Processes

Using RPA to automate the building and tuning of AI models and software

Using AI to improve the RPA system itself

Most don’t make the distinction, but when referring to Intelligent Automation, people typically mean point 1. Point 1 is what I’ll be addressing in this article.

Prerequisites

Before getting started, there’s
criteria that your organization should first meet.

RDA
vs. RPA

I believe that Intelligent
Automation will scale poorly in Robotic Desktop Automation (RDA) scenarios.
Having said this, RDA practitioners can still apply the advice given in this
article on a process by process basis.

Currently, the use of ML/AI needs
planning, knowledge and testing to use correctly inside processes. It’s
possible to teach staff how to use a single RDA design tool so that they can
automate their own processes. They already understand their processes and know
how to use the Applications that are involved. However, it’s unrealistic to
expect these same users to learn how to use a wide variety of ML algorithms
correctly and ethically.

Most Machine Learning models operate
as “black boxes”. There’s no way to understand or to justify the
output that comes out from one of these models. A situation where there are
dozens of different machine learning models being used by “Digital
Assistants” across an RDA platform would be impossible to audit and manage

On the other hand, for a centrally
controlled, enterprise grade RPA platform, we can risk manage and audit which
ML algorithms are being used and subject their use to change control when those
models get updated.

RPA
Maturity Level

I would avoid adding Intelligent
Automation if you are just starting your automation journey. Transforming
your organization to embrace RPA is already a complicated endeavour. More
specifically, there should be a functioning RPA governance structure in place
that will plan, define standards, and control the rollout of AI using RPA to
the organization. “Intelligence” can be added when RPA is stable and
mature.

AI
Governance

A stable foundation for Intelligent
Automation rollout will include the integration of AI concerns into the RPA
governance system. This includes:

Following and integrating the AI strategy of the organization

Planning the development of AI expertise within the RPA team

Developing guidelines on how to test, score and select an appropriate ML solution

Pre-approving AI vendors and algorithms for use

Defining boundaries for the ethical use of AI

Definition of artefacts to produce and standards to follow when incorporating AI into a process

Approving and reviewing the use of AI

Maintaining a ML Register to document all uses of AI inside your processes

If there is no AI/ML expertise on
the current RPA team, there needs to be a plan to borrow expertise from
elsewhere in the organization to help set up AI usage guidelines for the RPA
function. I think that there will
eventually be a small working group or “AI design committee” within the RPA
team. This team can provide expertise to
Business Users when they want guidance on how to add AI into their processes.

My recommendation would be to embark
on your Intelligent Automation journey when you are at least at a medium level
of RPA maturity and have a centrally controlled RPA platform.

Getting Started with Intelligent Automation

Problem
Statement Definition

We’re now in the age of Narrow AI
(as opposed to General AI), meaning that AI can only be used to solve specific,
targeted problems. The first step is to formalize the specific problem that we
intend to solve using AI. This statement includes:

Reinforcement Learning – a goal-oriented algorithm that tries to maximize a reward through rewarding through planning a sequence of steps or actions to take

What inputs can be potentially sent into the AI algorithm:

Numerical

Discrete numbers (Integers)

Continuous numbers (Real numbers)

Categorical

Ordinal

Mix of numerical and categorical, e.g. 5 star ratings

Images

Words or Sentences

Documents

Other

What output(s) you expect for use in the Business Process. This could be one or a combination of many things, including:

Confidence intervals or scores

Text labels (classification)

Binary (yes/no)

Numerical values, and in what range (e.g. 0 to 1)

Text (OCR, or summarizing phrases),

Image coordinates

Others

How the outputs of the AI system will be used

To make a decision?

To perform a calculation?

To generate new data?

Other

The risks of using the outputs of the AI system in the process

Shortlisted ML algorithms or vendor services

Restrictions, such as cost, or inability to connect to the Internet

SLAs or speed related performance requirements

Model performance requirements such as accuracy

How this ties back to the business requirements and process

The inputs and outputs that you have
defined will narrow down the list of possible Machine Learning algorithms that can
be used in your Business Process.

Inside the RPA documentation, we need to list out what alternatives we have if no suitable AI solution can be found or developed. Will the automation be abandoned? Converted into human in the loop? Will we replace AI with rules based processing instead, or do something else?

AI
Risks

Careful thought must be given as to how the use of AI will affect the Business Process. For example, if we are using it AI to perform a medical diagnosis, the severity of AI getting the result right or wrong will depend on what you do with the result after.

If the use of AI could result in undesired medical side effects, death, or cause huge financial burden, AI may not be suitable for use this process.

Narrow
Down AI Solution Choices

Once you have your problem statement, you can start choosing an AI solution. This is a huge topic on its own and a bit outside the scope of this discussion. Microsoft Azure provides a bit of guidance to help you get started on choosing an algorithm:

The list of potential algorithms that you can use will also be affected by guidelines provided by AI governance and the Problem Statement.

Build vs. Buy

There are many commercial off the shelf (OTS) Machine Learning solutions available on the market today. Most require Internet connectivity and are billed by the number of requests, which means that your RPA platform will likely need to able to access the web. If no Internet is available, then you may need to develop your own Machine Learning model.

OTS Pros and Cons

The benefits of OTS AI include:

Fast integration through APIs

No need for training your own model

You can get started with less knowledge of AI

Cons include:

Your problem must be generic enough to have been solved by someone else

You might not be able to improve the model yourself as it is controlled by the vendor

The vendor may update the model without you knowing about it, thus potentially changing your results for the worse

Half the battle is knowing what AI already exists out there. If your use case falls into one of these categories, you may be a good candidate for using OTS AI:

Image and video moderation for adult content

Identifying faces in photos

Facial analysis, for determining age, gender

Identifying celebrities and landmarks in photos

Reading text from images and video

Transcribing text from audio

Translating text from one language to another

Categorizing text and extracting names, locations, and dates

OCR (computer generated text) and ICR (hand written text)

Custom Build Pros and Cons

The pros of custom building a your own ML model include:

You can build a model to solve your task specifically

You can improve the model over time

You control when new versions of the model are rolled out

And the cons:

You need substantial AI know-how to get started

You may need additional infrastructure provisioned to train your models

Evaluate Algorithms

Once you’ve chosen some OTS ML services, or built your own models, you’ll need to evaluate them outside of the RPA environment. We have two goals in testing the shortlisted algorithms outside of the RPA platform. We want to assess:

The speed performance; and

The model performance (accuracy)

Realistic inputs should be used for testing.

There are a number of ways to evaluate ML models, and the appropriate method really depends on the requirements of the Business Process.

Create the Confusion Matrices

Apologies for the math in this section, but it really is needed.

A confusion matrix is a way to visually see the test results of a model.

A Binary Confusion Matrix

Imagine that our problem definition is to classify a person as having good credit or bad credit for a bank loan Business Process.

True Positives (TP) are when the model correctly predicts something to be True, for example, that James has good credit when he actually has good credit.

True Negatives (TN) are when the model correctly predicts that something is not True, for example, that James has bad credit when he actually has bad credit.

False Positives (FP) are when the model incorrectly predicts that something is True when it is actually False. This would be the case if the model predicted that I have good credit, when I actually have bad credit.

False Negatives (FN) are when the model incorrectly predicts that something is False when it is really True. This is when the model predicts that I have bad credit, when i actually have good credit.

Confusion Matrices don’t need to be 2×2 in size. If there are more predictions being made, they can be bigger. For example, if we are trying to predict what object is inside an image, our matrix may look like:

A 10×10 Confusion Matrix

Confusion Matrices are a way to compare the results generated from different Machine Learning models.

Sensitivity vs Specificity

Sensitivity is the True Positive Rate and is calculated using the formula:

Sensitivity = TP/(TP+FN)

A Sensitivity value that is closer to 1 is better, as it indicates that there are less False Negatives.

Specificity is the True Negative Rate and is calculated using the formula:

Specificity = TN/(TN+FP)

Once again a Specificity value that is closer to 1 is better, as there are fewer False Positives.

The question that we want to ask is:

For our Business Process, do we want high sensitivity or high specificity? What is the correct balance between the two?

Are False Positives more acceptable in your business case? For example, in an Anti-money Laundering process, is marking a non fraud case as fraud OK as long as we can catch all fraud? If so, then we should lean towards having highsensitivity. For medical diagnosis, making a False Positive predictions may be OK, as long as there are follow up procedures to confirm the diagnosis.

An example of a high specificity case can be when we need to classify video content so that minors don’t accidentally view adult content. In this case, False Positives are unacceptable. False Negatives, are allowed, i.e. we accept that some videos are incorrectly marked as adult content, when they really aren’t.

Sensitivity = When I cast a net into a lake, I want to catch every single fish. I don’t care if I catch frogs, bugs, plants etc as long as I get all of the fish

Specificity = When I cast a net into a lake, I only want to catch fish. I don’t want my net to have other things in it. I’m however fine with only catching some and not all of the fish in the lake

The sensitivity and specificity of the chosen ML algorithm needs to be based on the requirements of the Business Process, and the risks of making an incorrect prediction.

Models with too High Accuracy

It’s not necessarily good to have a perfectly accurate model. This often means that a model is overfit, with very little predictive ability.

Unsorted Ideas

Define uncertainty cutoff at each point where a ML result is used to make a decision and document it.

Log all ML outputs for audit
purposes. Create an ML specific report with the parameters, inputs (if
possible) and the success/fail result

Define a sample period and sample %
of records to manually verify

Select a sample of Successful Completed (in RPA terms)

Which testing method? n-fold cross validation? Is this too technical?

Dealing
with Uncertainty

This is one of the biggest hurdles
to adopting Machine Learning in your processes. Until now, most RPA processes
have been built with predictable decision paths. If a certain input is given,
we can expect the output to be the same 100% of the time.

However, with AI, we are letting a
“black box” model make decisions for us. The model isn’t something
that we can understand or control. If something goes wrong, we can’t justify
why a decision was made in the process. That’s why they return a confidence
interval, normally between 0 and 1, where 0 is not confident and 1 is fully
confident. The model itself can also be updated.

Ways of dealing with uncertainty
when ML output is used to make a decision

Simple cutoff threshold

Voting with multiple algorithms

Deferring or delay the process, while waiting for human verification

Dealing with uncertainty for success
cases: Sampling. How much should we sample for manual verification of success
cases? Depends on confusion matrix

Defining
your Confidence Interval Cutoff

Build a confusion matrix based on
the decision that was made.

The model was trained on someone
else’s data, so figure out the thresholds that work for you. Maybe your data
works great with their model and you can use 50%. Maybe your data works poorly
with the model and you need 90% confidence. Maybe you need to use a different
vendor or custom build a model instead.

This cutoff is for this particular
model. If the model is updated then recalibrate your cutoff. If there are
multiple models, then this needs to be repeated for each model

Can no longer assume that your
finished work is correctly finished, finished != correct

manual cases = examine model output,
then human override the machine learning model’s result and continue. Use human
variables, a collection to override machine learning using a startup parameter
collection? use statuses to remember work

thresholds as process specific
environment variables that differ PER PROCESS

Add thresholds as log for reporting,

Retrain your model using outputs
from your process.

Sample finished work to verify at the beginning of hypercare

delivery timelines of rpa vs of ml, they need to be separate projects

Your
First Intelligent Automation Process

How should you choose your first AI
enabled process?

The main approaches to this include:

Automating a brand new process

Extending an existing automated process by adding a Machine Learning to either the beginning or the end

Replacing human input to an existing process (for a Human in the Loop process)

Connecting two processes together that were once separate (this is kind of a sub case of points 2 and 3)

My recommendation would be to add ML to the start or middle of a process, since you know what the end result is already, so you can compare.

New process, vs. extending the start
or end of an existing process (baby steps, gives you a testable and repeatable
outcome). extending is a good first approach because you can compare results
from a KNOWN state and tune your thresholds

For a new process, if the ML
algorithm is not good enough, then it is makes no sense to even automate it.