Rule Scenario Design Tips

The following tips can be helpful when working with rule patterns:

  • Limit the rows retrieved in the datasets that a pattern uses. Specifically, if certain records cannot satisfy the pattern criteria, it is best to apply logic to filter them out beforehand. If certain detection conditions can be checked in the dataset, it is generally more efficient to enable the database to filter them out rather than applying this logic in the pattern. You should also determine the appropriate lookback period range that is necessary to identify the behaviors of interest, to prevent the patterns from looking through a larger volume of historical data than is really necessary.
  • Apply the most restrictive pattern conditions in the primary rule. Rule patterns access data incrementally, retrieving records only for the entities that satisfy the conditions of the primary rule. Applying the most limiting conditions beforehand helps to reduce the total number of records that are retrieved and evaluated in the detection process.
  • Use periodic checkpoints to terminate the search at the point when the conditions for a match can no longer be satisfied. Rule patterns include explicit checkpoints that must be satisfied in order for the detection process to move forward. If the conditions in a checkpoint are not met for a particular entity, the detection process does not continue to retrieve data for that entity. Developers should apply checkpoints in patterns wherever they can substantially reduce the population of records being considered for a match.

Refer to Scenario Design Guidelines, for more information about design tips and guidelines.