Merge Rules#

Another important feature of Rulex Factory is that it allows users to merge various rulesets resulting from different computations by using the Merge Rules task.


The Options tab#

The Merge Rules task is made of only one tab, the Options tab.

Within this tab, users can set and configure the following options:

  • Sort rules: if selected, rules will be re-arranged in standard way.

  • Merge also data: if selected, the datasets will be merged along with the ruleset.

  • Merge type: this option allows users to select from a drop-down list the required concatenation type. Available options are:

    • Outer: if selected, the resulting number of rows will be the minimum between the row numbers of the input dataset.

    • Inner: if selected, the resulting number of rows will be the maximum between the row numbers of the input dataset.


Example#

In the following example, it will be analyzed the use of the Merge Rules task by using a LLM Classification task.

  • After having imported the dataset via an Import from Excel file task, connect the task to a Data Manager and add a LLM Classification task. Specify the following constraints:

    • Output attributes: Transport

    • Input attributes:

      • Weather

      • Smartworking

https://cdn.rulex.ai/docs/Factory/merge_rules_example1.webp
  • After having imported the same dataset via another Import from Excel file task, connect the task to a Data Manager. Open the Data Manager and change the Role of Transport attribute to Output.

https://cdn.rulex.ai/docs/Factory/merge_rules_example2.webp
  • Drag two Rule Manager tasks onto the stage and connect them to the LLM Classification task and the second Data Manager you have dragged and dropped onto the stage. Then, drag and drop the Merge Rules task onto the stage and connect it to the two Rule Manager tasks.

  • Double-click the Merge Rules task. Configure the options described in the above-mentioned section. Save and compute the task.

https://cdn.rulex.ai/docs/Factory/merge-rules-ex.webp
  • To visualize the merged rules, drag another Rule Manager task onto the stage and connect it to the Merge Rules task.

https://cdn.rulex.ai/docs/Factory/merge_rules_example3.webp