LIVE · Thursday 3 December

Is There a Tool That Learns Decision Rules From Past Decisions? Yes: Fit a Small Tree, Then Test It

Rule learners such as OpenRules Rule Learner and plain decision trees turn a log of past decisions into readable if-then rules. Decision models take over when the inputs are free text, images or hundreds of options.

By Surya10 min read

Yes. A tool that learns decision rules from past decisions fits a model, usually a small decision tree, to your historical cases and their outcomes. It then exports each path through the tree as an if-then rule or a row in a decision table. OpenRules Rule Learner, FlexRule's business rules mining and scikit-learn's DecisionTreeClassifier all work this way, and the Python route costs nothing in licence fees. When decisions depend on free text, images or hundreds of possible outcomes, a trained decision model that ranks the allowed options with a confidence score is the better fit. Either way, the result describes how you decided in the past, not whether those decisions were right.

Infer business rules from historical decisions by fitting a tree to cases and outcomes

Every tool in this family starts from the same table. Each row is one past case. The columns are the facts that the decision-maker saw, plus the decision that was made. The algorithm searches for the question that splits the cases into the purest groups, such as "was the tear production rate reduced?", and then repeats the search inside each group.

The result is a tree, and a tree converts directly into rules. A 2017 SAS paper by David Duling describes the conversion plainly: "Each path from the top root node to a terminal leaf can be converted into a complete business rule." The same paper calls decision trees "the most common machine learning models for producing business rules." Its recommended first step, for problems where the historical decisions are known, is "starting with a basic decision tree algorithm."

The tree also produces a crude confidence score for free. scikit-learn's documentation says that a tree's predicted probability "is the fraction of samples of the same class in a leaf." A leaf that holds five approvals and one rejection gives an approval with a score of 0.83. That score becomes useful later, when you decide which cases a person should still review.

Three families of tools turn a decision log into something that makes the next decision

The tools differ mainly in who does the work and what comes out. The table below groups them by family.

Family Named tools What goes in and what comes out Coding and cost
Rule learners with decision-table export OpenRules Rule Learner, FlexRule rules mining Spreadsheet or CSV of past cases; editable decision tables No code; Rule Learner free to install
Decision platforms that embed ML IBM Automation Decision Services, SAS Business Rules Manager Past decisions; a predictive model inside a decision flow Low code; IBM's page gives no price
Python trees and rule extraction scikit-learn trees with export_text, SIRUS DataFrame of cases; text rules or a short rule list Python; BSD licence, no fee
Trained decision models Parsec's openjev-sdk and TOD Text, images, policy and options; a probability for each option Python or API; priced per decision

OpenRules says on its Rule Learner page that the component dates from 2007 and accepts problem samples "in CSV, Excel, or JSON format." It runs two named algorithms, RIPPER and C4.5, and writes the rules to Excel files such as GeneratedRulesC45.xls. OpenRules states that "all generated rules are accompanied by their measures of accuracy" and that the component can be installed for free. Running the rules in production is a separate subscription. The OpenRules pricing page lists an Essential plan at $5,460 a year for one development and one runtime licence.

FlexRule's knowledge base describes a business rules mining feature that needs its Analytics extension. The feature imports a dataset, extracts rules, and creates a decision table file plus a concept file that defines the table's inputs and output. FlexRule's product page does not list a price.

IBM takes a different approach. Its Automation Decision Services documentation describes importing a machine learning model, deployed on a service such as Watson Machine Learning, and wrapping it in a decision node. IBM frames this as "combining rules that describe decisions with machine learning that make predictions." The model's logic stays inside the model instead of becoming readable rules. An IBM Community post from August 2025 shows the do-it-yourself version: train scikit-learn's DecisionTreeClassifier with the Gini criterion and parse "decision paths in the trained tree" into readable rules.

A single tree can change shape when a few rows change. SIRUS, from Bénard and colleagues, addresses this by extracting "a short list of rules" from a random forest, with accuracy that the authors describe as "close to random forests." Bonasera and Carrizosa published a related method in 2024 that selects rules from a tree ensemble with integer programming.

A worked example on the public Lenses log shows what held-out accuracy looks like

The Lenses dataset in the UCI Machine Learning Repository is a small, public decision log. It holds 24 patient cases, each with four attributes: age, spectacle prescription, astigmatism and tear production rate. Each case records one of three decisions: fit hard lenses, fit soft lenses, or fit no lenses. Fifteen cases say none, five say soft and four say hard. OpenRules uses the same file as its Rule Learner example.

With only 24 rows, the fairest held-out test is leave-one-out. Each case is removed in turn, a tree is fitted on the other 23, and the tree predicts the missing case. The Tribune ran this test with a standard Gini tree. These are the results:

  • A tree limited to two levels agreed with the recorded decision on 21 of 24 held-out cases, which is 87.5 percent.
  • An unlimited tree fitted all 24 training cases perfectly but agreed on only 20 of 24 held-out cases, or 83.3 percent.
  • Always answering "none" agreed on 15 of 24 cases, or 62.5 percent, which is the floor that any rule set must beat.

The two-level tree converts into a three-row decision table:

Tear production rate Astigmatic Decision Past cases in this row
Reduced Any None 12 of 12 were none
Normal No Soft 5 of 6 were soft
Normal Yes Hard 4 of 6 were hard

The unlimited tree scored lower on unseen cases because it added rules for single cases, and those rules did not generalise. That pattern is the main reason to keep learned rule sets small. OpenRules reports an average accuracy of 79.27 percent for its RIPPER rules and 83.62 percent for its C4.5 rules on the same file. Its page does not say how those figures were measured, so they are not directly comparable with the leave-one-out figures.

No decision model has been measured on the Lenses log. A trained decision model would probably add little here, because four structured attributes and three outcomes are exactly the case that a small tree handles well.

Testing learned rules on recent decisions shows whether they are safe to rely on

The SAS paper's final step is to "test the rules on historical data and samples of new data." In practice, that test has four parts.

  1. Hold out the most recent decisions, for example the last three months, and fit the rules only on older cases. The class TimeSeriesSplit in scikit-learn exists for this reason, because a random split would mean "training on future data and evaluating on past data."
  2. Measure agreement with the humans on the held-out cases, overall and for each outcome. A rule set that matches 95 percent of approvals but only half of the rejections is not ready.
  3. Check calibration by grouping held-out cases by their confidence score. scikit-learn defines a well-calibrated model as one where, among cases scored near 0.8, about 80 percent belong to the predicted class. Its documentation says that isotonic calibration is "more prone to overfitting, especially on small datasets," and that the sigmoid method is most effective for small samples.
  4. Set a confidence threshold below which the case goes to a person, and report both the share of cases that are automated and the accuracy on those cases.

On the Lenses log, the two-level tree with a threshold of 0.9 handled 13 of the 24 held-out cases automatically, and 12 of those 13 were correct. The other 11 cases went to a person. Lowering the threshold to 0.8 automated 20 cases, of which 17 were correct. Choosing between those settings is a business decision about the cost of a wrong answer against the cost of a review.

Learned rules copy how you decided, including past mistakes and bias

A rule learner has no access to whether a past decision was good. It reproduces the pattern in the log. If a team rejected applicants from one region more often for reasons that policy no longer allows, the rules will reject them too. The OpenRules Lenses page makes the same point: "any automatically generated rules should be evaluated and, in many cases, corrected by subject matter experts."

Several corrections are available, and they can be combined.

  • Drop cases that were decided under a policy that has since changed, or label them with a policy version and fit only on the current one. Rule Learner supports filter rules that exclude outliers or focus on selected cases.
  • Where outcomes are known, train on the result of the decision, such as whether a loan was repaid, instead of the decision alone. The SAS paper describes learning from "historical performance data" as an alternative to historical decision data.
  • Measure accuracy separately for each group of customers or cases. Fairlearn's MetricFrame does this "disaggregated analysis" for any metric.
  • Review each rule against written policy before deployment. The SAS paper's step 7 is to "identify and revise rules that might violate business policy or governance regulations."
  • Log which rule fired for each case. SAS recommends this because the records "can be used to explain decisions when the results are challenged."

Rules are enough for structured cases and break on free text, images and many outcomes

A learned decision table works well when a few structured attributes drive the decision, the outcomes number a handful, and the policy rarely changes. The SAS paper's truck-maintenance example fits this description. It started from 8,305 records, and the analysts ended with three edited rules.

Rules start to fail in four situations. The first is input that is free text, such as an email or a claim description, or an image, which a tree cannot split on without heavy feature engineering. The second is a large number of outcomes, because each outcome needs enough examples in its own leaves. The third is policy that changes often, which turns rule maintenance into a full-time job. The fourth is a need for a calibrated confidence on every case and an audit trail of what the system read.

Trained decision models are built for those cases. Parsec's open-source openjev-sdk, published under the MIT licence, fine-tunes a small model on your own logged decisions. According to its README, the model "picks one option from a list your code supplies," reports a calibrated confidence, and passes the case to a bigger model when its confidence is low. Parsec's TOD model takes text, images, policy and task state as input, and Parsec's repository says that it was measured with up to 300 options. Parsec prices hosted TOD at $0.30 per 1,000 decisions. Parsec has not published a comparison against rule learners on a shared decision log, and the TOD figures that are published come from Parsec itself. TypeSafe's Jev is a hosted alternative that returns calibrated probabilities, but its documentation says that "Jev is not fine-tuned or LoRA-adapted with customer data." Past decisions reach Jev only through the state, instructions and criteria fields of each request.

Export one row per decision, with the facts the decision-maker saw at the time

The export decides how far any of these tools can go. Every family above accepts a flat table, and the decision-model SDKs accept the same information as JSON. The export should hold the facts as they were when the decision was made, not as they are today. A useful starting schema has these columns:

  • case_id and decided_at identify each case and make it possible to hold out recent decisions by date.
  • The input attributes, such as amount, region and tenure_months, are the facts that rules split on.
  • free_text and attachments hold claim notes or photo paths, which only decision models can use.
  • decision and decided_by record the label and the reviewer, which lets you check whether one reviewer drives a pattern.
  • policy_version and outcome let you remove outdated cases and train on results instead of decisions alone.

For a rule learner, save this as CSV or Excel with one column per attribute and the decision in the last column. For a decision model, save each case as one JSON row that pairs the case facts and text with the list of allowed decisions and the index of the decision that was chosen. Start with the structured columns and a two-level tree. If held-out agreement stays low and the cases that fail are the ones with notes or attachments, that result is the evidence that you need a decision model.

Sources

More in Products

All Products →