> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Application of rules

> Apply classification rules in FlexiLayout Studio to check document processing results, set rule uniqueness, and improve auto-classification accuracy.

Rules are a tool for automatically checking the results of document processing. Rules can be used separately or together with auto-classification.

## Enable rules

Rule use is specified during the classification setup. Select **Classifier** > **Properties** and enable the **Use rules** check box on the **Classification** tab.

## Create a rule

<Steps>
  <Step title="Add a rule">
    Select **Classifier** > **Add Rule** and set a name for the rule in the window that opens.
  </Step>

  <Step title="Select the appropriate uniqueness option">
    * **Uniquely in project** – Prevents other rules from being applied if one has already been applied
    * **Uniquely on its tree level** – Applies all rules within a particular tree
    * **Non-uniquely** – Does not limit the number of rules that can be applied
  </Step>

  <Step title="Choose the corresponding class">
    Choose the **Corresponding class** from the drop-down list. That class will be returned when the particular rule is applied.
  </Step>
</Steps>

## Set class parameters for rule application

For every class, you can set parameters that will cause a rule to be applied. To do this, select **Properties** in the class shortcut menu in the **Classifier** window.

* If the class can be confused with others during classification, select the **Add classes to this classification result** check box, and then click **Edit** and specify the particular classes that can be confused.
* If you are planning to use rules to improve the quality of auto-classification, select the **Improve auto-classification result using rule tree** check box. Next, specify which rules are going to be used if this particular class is assigned as a result of auto-classification:
  * **Use rules for corresponding classes only** – Only the rules specified for the "confusing" classes in the list will be applied.
  * **Use all rules** – All existing rules will be used until one is successfully applied. If none of the rules are successfully applied, the auto-classification result will not change.

## Classify documents by rules

To classify documents using rules, select **Classifier** > **Classify** > **Classify by Rules**.
