Bot Child: How RPA becomes IPA

Cesar M. González
9 min readDec 28, 2020

The concept is simple, Bot Child; build a bot capable of learning over time, solve complex task and get better performance as it grows and matures.

Bot Child

The RPA behavior is based on fixed rules and validations build for simulate human actions if the sequence steps are defined, when we include AI tools the automated process can be potentiated for solve more complex problems. In this join, RPA acts like the control body, AI acts like the brain.

Before continuing it is important to highlight how, when and where we should use RPA to solve a problem, as mentioned in this post “Four bad ways to use RPA”, is necesary evaluate the problem, the context, the ROI and the options, RPA not always the best solution, the same idea applies to IPA and as mentioned in this another “Why You Should Think Twice About Robot Process Automation”, IPA does not solve RPA’s problems. With this in mind, we can continue.

Our Bot can’t learn, only obey: Limitations of RPA

“RPA robots will do exactly what you tell them, that is their greatest strength, but also their greatest weakness (Mohanty and Vyas, 2018).”

Imagine our Bot Child trying to ride a bike, in the current scenario it is necessary configure the Bot indicating how, when and where the obstacles will appear, each hole, car, traffic light and pedestrian, of course if we want the Bot to survive. That is RPA.

The real world is chaotic, have a lot of variables. The number of validations required for save our Bot could be non-viable (complex tasks, unexpected events, predictions). Result, our conventional Bot will die.

Bot Child: The concept

Now, imagine our Bot with the capability of identify the obstacles, when an obstacle appear the Bot take a decision; speed up, stop, turn or even jump (someday with a 360-trick included 🤷🏻‍♂️). Over time the Bot Child will lead it to be faster and agile and could predict the future events. The power of IPA.

Eventually could crash, but this is the base idea. The Bot Child can learn.

Trying to survive

How can a Bot learn?

The next archiques describe the potential of use IPA for companies, the challenges, the benefits, economic and labor changes, the IT efforts required. Intelligent Process Automation and Hyperautomatización. Here a proposal of how to do it is developed.

Using Machine Learning techniques coupled with RPA configuration is the journey we will go through. We focus on three pillars to build our Bot child. Data collection: data required for analytics and training. Machine Learning; pre-configured tools, AI services consumption, algorithms, models, mathematics, statistics, etc. Bot Structure (FSM); The way we could combine both technologies RPA and AI.

Data collection

The next image gives us an alert about why important recover is all the relevant and high-quality data of our processes.

The Economist MAY 6TH -12TH 2017

And this is the Chema Alonso opinion (Telefonica CDCO) about data in companies.

“The companies than does not take decisions based on data are death, but don’t know it yet . Chema Alonso”

The point is clear, given the importance, data collection is a priority. The good news is that our conventional bots can do it today, when a bot is executed, can fetch data from each step and store it, extracting relevant data about the process and bots executions itself.

Machine Learning

There are different ways to consume IA tools, depends on the task to be solved, availability, resources, time or the budget. Grouped into three categories: Native RPA-AI tools, consumption AI tools and Built-in House AI tools.

Native RPA-AI Tools: Some RPA platforms include native AI tools, usually for transversal task apply; Automation Anywhere contains the IQ Bots module for extract text from files and images, Power Automate have the AI Builder module able for build different AI tasks. Depending on the chosen tool, the scope is defined. The AI tools are pre-configured and low code, the downside is the limited scope and additional cost it could have.

Consumption AI Tools: Useful when the companies don’t have the resources, the knowledge or time to develop AI tools. There are consumption web services (APIs, web services, front) dedicated to AI tasks. Generally, these services have a more personalized scope to specific types of processes; Face Recognition, Healthcare, ChatBots, Salesforce (analytics, classification), etc. The advantage is the reduction of the effort required to implement it, the disadvantage is the reduced scope (Cannot add a new face recognition feature) and the cost (pay per use, depends if consuming is more leasable than build it).

Built-in House AI Tools: They have more scope given their level of customization, using programs, programming languages ​​and libraries directly (low code AI, Python, TensorFlow, etc.). Build a specific functionality for solve complex problems in as much detail as possible is the greatest advantage. The downside is cost involved, resources, knowledge, and time required.

Bot structure: Finite State Machine

Finite State Machine is a model commonly used to emulate simple logic sequences, this model is currently used in RPA developments and works for Bot Child’s proposal. For this basic model we propose (3) three base states.

FSM — Basic Bot Child

Process Execution: The Bot executes the steps of the process sequence, here the main difference from conventional RPA is the use of the AI ​​tools mentioned above when required, and data collection.

Data Cleaning: Once some data is collected is possible prepare it for future analysis and build learning models. But before in this state the bot makes a review, outliers, statistics, data standardizing, data filter, data format, in the practice already exist tools dedicated to manager big data amounts, our bot can use it. This data includes if is possible the targets for a supervised learning or the reward for an unsupervised learning, or data for analytics and predicts. Example: At the end of the day the bot recovers all credit fraud cases, this is the target for a fraud detection learning process.

Bot Learning: In this state the bot reinforces the learning models using the new data, the historical data and current model. Here is the core proposal, the bot will review again and again the learning model that itself use in the process and the result of the process (data) is the feedback to get better result in the future.

Be careful, that does not mean that the bot does not need support, on the contrary, the bot will require more attention, especially at the beginning of the execution while the behavior of the bot is stabilized. Setting limits and rules is a good idea to keep the bot in the right place and not have unexpected behaviors. The advantages are an adaptive Bot, able to solve complexes problems repeatedly to do better and change the behavior if required (the results or goal changes). The Bot Child can survive with no handlebars.

Bot Child survivor

Healthcare Cancer Detection: The Demo

Let’s put it into action. Suppose two conventional RPA cases in healthcare field: improving the healthcare cycle and scheduling patient appointments, applied in a cancer treatment center. Note that way of measuring results change, the assertiveness for take decision and the scope to solve complexity tasks is joined with cost reduction and time reduction.

Cancer is a race against time, if people have enough time for fight then the probability to survive increases. The goal is transfor a conventional Healthcare process to one more faster and efficient. Buying more time and being assertive is the priority.

Now, based on Bot Child proposal, these RPA cases will be transformed: Data Collection, Machine Learning and Bot Structure.

Data Collection

Both processes; improving the healthcare cycle and scheduling patient appointments can recover relevant data and storage in a data base, names, ages, genders, family history, last medical check, feeding habits, etc. Further can be collected more relvent data from external sources like regional stadistics cancer deaths (RPA or Web scrapping could be useful). This will be used later.

Machine Learning

Consider the (3) three AI tools cateogories.

  • Read Medical History Forms (Native RPA-AI Tool): Using AI Builder module from Power Platform includes a command named Form Processing solve this obstacle, easy to configure choosing information to extract from uploaded forms like reference and the component will train the model, is possible reduce the weight of the task for read patient’s medical history, in this scenario for cancer reviews.
Patient’s medical history Forms Processing — Power Platform
  • Mammography Cancer Detection (Consumption AI Tools): Suppose that our cancer treatment center does not have the resources for build an artificial intelligent that generate mammography diagnostics or not with the expected quality. This problem is in a middle point, is a particular task of a process (cancer healthcare) but can be solved of a transversal way (exist a standard for this diagnostics). The solution is consume a external tool than guarantee the quality and speed whised. The conection with our Bot is through a web services (APIs), front web page or another chanels (email, share points). This web pages are some examples; CancerCenter, NeuraHealth, Google Healthcare API. The benefit is reduce the diagnostic time and a give to Pathologists a second deep revision.
Mamography cancer detection
  • Smart Scheduling Patient Appointments (Built-in House AI Tools): Finally, when a company require a custom AI tool for a process, built it is the best option, security reazons, tool scope, cutomize funtionality. Supose that the convetional Bot send emails and make a report, based on a list of pattients. Including AI tool the Bot could scheduling appointments identify the Risk or Susceptibility Prediction, based on a model traned and datasets collected by the Bot.
Breast cancer risk prediction — Predicting breast cancer risk using interacting genetic and demographic factors and machine learning, nature article

Bot Sructure

The RPA changes, now the bot can consume AI tools with different scopes and levels of functional customization. The Bot Child can solve more complex problems, be assertive and complement the above functionality. Now the bot structure provides the feedback mechanism, which runs the process, collects data at once, cleans this data, and trains the model again (if possible). Here the example is the collection of data to identify the risk of cancer, this data comes from the cancer treatment center’s own database; New diagnoses of cancer patients, reports of cancer deaths, data sets of cancer patients, etc. With data and goals defined, the robot can train the model over and over and become more assertive over time.

--

--