You use Ascribe™ Rule Sets to modify the output of the text analytics engine, introduce your own findings to the text analytics results, and to modify comments as they are loaded into Ascribe.  You can also use Rule Sets with the Ascribe Coder API to modify responses as they are loaded to Ascribe.

Rule Set Workflow

The diagram below shows the execution workflow for a Rule Set:

When you load data into CX Inspector the entire workflow is executed.  When you apply a Rule Set after data are loaded into an Inspection execution begins with the stored responses and findings, and the Modify Response on Load rules are not executed.  When you use a Rule Set with the Ascribe Coder API only the Modify Response on Load rules are executed.

Rules Operating on Responses

Modify Response on Load rules and Add Finding from Response rules operate on responses.  They are not passed any of the output from linguistic analysis.

Modify Response on Load Rules

Ascribe executes Modify Response on Load rules only when you load data.  You can modify the responses as they are loaded, and the modified responses will be stored in Ascribe.  You can also veto responses, causing them to be ignored and not loaded in Ascribe.

Ascribe executes these rules in the order they are defined in the Rule Set.  The output of each rule is passed to the next, and the output of the last rule is stored in Ascribe.  If any rule vetoes a response the response is discarded, and any remaining rules are not executed for that response.

Add Finding from Response Rules

Ascribe executes Add Finding from Response rules both when you load data, and when you apply a Rule Set to an Inspection after loading data.

These rules contribute findings to the analysis, just like the linguistic processing engine does.  You use these rules to supplement the analysis with findings you create in your rules.  Ascribe sends all the responses for the variables you have selected for analysis through these rules.   Therefore, you can add findings to the analysis even for responses that produced no findings from linguistic analysis.  Contrast this with Add Finding from Finding rules, which operate on the findings from the linguistic analysis.

When you add findings to an analysis with these rules, those added findings are not passed through the rules operating on findings.

Rules Operating on Findings

Modify Finding, Veto Finding, and Add Findings from Finding rules operate on findings from linguistic analysis.  They work as a pipeline, where each finding is passed through all the enabled rules for each of these Rule types:

Modify Finding ⇒ Veto Finding ⇒ Add Finding from Finding

CX Inspector stores the findings emitted from this pipeline, plus the findings contributed by Add Finding from Response rules, as the processed findings.  CX Inspector displays the processed findings in its user interface.

Modify Finding Rules

Ascribe executes Modify Finding rules in the order they are defined in the Rule Set.  Each rule can modify the finding or pass it along unchanged.  The output of each rule passes to the next, and the output of the last rule passes to the Veto Finding rules.

Veto Finding Rules

Veto Finding rules cannot modify the finding.  The rule can veto the finding or allow it to continue through the pipeline.  If the finding is vetoed the finding is discarded and the remaining rules in the pipeline are short circuited for that finding.

Add Finding from Finding

You can add new findings to the analysis based on the results of linguistic processing with Add Finding from Finding rules.  These rules cannot modify the finding they are given, but they can add one or more new findings.  Because these rules have access to the finding from linguistic analysis they can make decisions using these results.

Although the rule has access to the response text, it should not add findings based on inspection of response alone.  First, the rule will not receive responses unless the linguistic engine produced a finding for the response.  Second, the rule will likely receive findings for the same response multiple times, because many responses generate multiple findings during linguistic analysis.

Next Steps

You can best harness the power of Rule Sets by understanding their execution workflow.  See Authoring Ascribe Rule Sets for information about how to create rules, and Rule Set Examples for sample code.