How To Decide Between Machine Learning Versus Rules-Based System?(With Examples)
Last week I was fighting the moral dilemma of modern technology architecture. For a particular business problem/use case, the solution can be a rules based system or a machine learning algorithm. Like every technology decision it would have direct business impacts – especially on costs and ease of use.
Jumping on the bandwagon of ‘look this solution is build on AI/ML‘ looks very attractive in the short term , but very painful in the long term – in my experience !
But first lets start with the basics…
What is the difference between Rules & Machine Learning?
In simple terms, rules-based systems are built upon a set of business logic or criteria that define the output or outcome. While Machine Learning is built upon input & sample output data to determine the best model that gets closer to the outcome. Yes, it is like a living organism !
Rules – Based System | Machine Learning |
---|---|
A set of business criteria or logic can be configured into a transparent box called ‘Rules‘. Transparent since the logic is always visible to the business and can be changed/updated at any time | At the core of Machine Learning are ‘Models‘. Initially ‘training data‘ is used to estimate the logic that transforms input to output data creating these ‘Models’ block. After they are live in production, they constantly learn from the output data to get better. Yes just like a living organism !! |
Example of Rules Based System : | Example of Machine Learning : |
Happy Eats is a food delivery platform that accepts only 50 orders a day and if exceeded they are assigned to the next day | Happy Eats is a food delivery platform that predicts orders based on the weather and assigns resources accordingly. You can find more details of this example here |
Okay so now we know the differences lets look at the business questions to ask to help with the decision making.
Business Question 1 : Do the business outcomes or output data need to be precise?
‘Yes’ | ‘No’ |
---|---|
Rules-Based System is the only solution here as the business criteria or logic or rules need to be defined to ensure precision of the outcomes | Machine Learning systems is the only solution here to predict output data based on the business case |
Example: Customers less than 16 years of age would not be shown any marketing offers | Example: Offers shown to customers would vary based on factors such as purchase behavior, age, location etc. |
Business Question 2 : Is the business criteria known & do not change?
‘Yes’ | ‘No’ |
---|---|
Best to use Rules-Based System as it would be build once by the engineering team and deployed everywhere as applicable. Over a period of time it would be part of the system as a ‘configuration’ than a rule | Keep scrolling there are a few more questions to ask |
Example : Application forms can only be submitted online between 9 am to 5 pm due to availability of resources | Example : Application forms can be submitted at any time and resources would be assigned dynamically based on forecasted demand |
Business Question 3 : Is the business criteria unknown but sample input & output data available?
‘Yes’ | ‘No’ |
---|---|
Best to analyze the data first to understand how the output data changes based on the input data. If the variations are low , best to define a rules-based system that can be changed by a human if there are any exceptions found. If variations are high, you would require machine learning models to learn variations initially and continue learning based on the input data | If there are no known criteria and no sample data its best to revisit the problem that we are trying to solve |
Business Question 4 : Does the business need to approve & make changes to business criteria frequently?
‘Yes’ | ‘No’ |
---|---|
Rules-based Systems is the best solution here as business stakeholders can actively maintain the system, manage existing rules & approve new rules | Machine Learning is the best system here as models would continue learning about changes in input data and activate changes required, without requiring human intervention |
Example : Offers management system that manages existing offers and the associated business rules managed by the Marketing team | Example : Content Intelligence that predicts the right content to be used to personalize the marketing offer |
Hope these business questions help you determine the best solutions towards your business problem. A follow up to this blogpost would be about an hybrid approach of using rules & machine learning to meet business objectives.
What do you think?