This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Table of Contents

Adaptive models and context definition

Beginning with Pega® Platform 7.3, you must specify all context values in an adaptive model before you run the model. Similarly, when customer responses are handled, you must also specify all context values. If any context values are empty when you run an adaptive model, the run does not stop, but a warning message is written in the log file and a dummy model with the message ContextNotDefinedError is displayed on the Adaptive Models Management landing page. This behavior prevents the accidental creation of a model with one or more empty context values.

By default, the context of an adaptive model instance is defined by the proposition that the model applies to (the combination of pyName, pyIssue, and pyGroup proposition properties), the channel that was used to deliver the proposition (pyChannel), and the interaction direction (pyDirection). You define the context of an Adaptive Model rule that holds the configuration of adaptive model instances on the Adaptive Model tab. For more information, see Adaptive Model rule.

Adaptive model learning prior to Pega 7.3

In the following example context configuration of an Adaptive Model rule, five properties are defined as context.

Property Name
pyIssue Business Issue
pyGroup Group
pyName Proposition
pyDirection Direction
pyChannel Channel

Prior to Pega 7.3, you could create a set of adaptive models that were based on a single Adaptive Model rule, and some of these models were allowed to have one or more empty context values and could continue to be updated with customer responses. For example, you could create such models by running a decisioning strategy with one or more empty context values as input to the adaptive model component, as shown in the following example:

Incomplete context value

Adaptive model with an empty context property value

Adaptive model learning in Pega 7.3

In Pega 7.3, adaptive models cannot have empty context values. For example, if you do not need the Channel context in your model, you must either remove the pyChannel property from the list of Adaptive Model rule context identifiers or create an Adaptive Model rule with a re-defined context.

When a customer response to a proposition is recorded or when an Adaptive Model rule is run, the associated models are created or updated by matching the adaptive model context to the context of the response (outcome). If any of the model (or response) context values are empty, the ContextNotDefinedError message is generated and the response will be ignored. The error message is displayed on the Adaptive Model Management landing page and in Pega Platform logs, as shown in the following example:

Context not defined

An adaptive model that lacks a context value

To eliminate the error, make sure that all context values that are defined in the Adaptive Model rule are populated when that rule is referenced in a decisioning strategy and when responses are handled. If the missing context property is no longer required, you can remove it from the list of model identifiers in the Adaptive Model rule or create an Adaptive Model rule that contains only the required context.

You can use the Test Run panel to test your decisioning strategy and inspect whether your configuration produces the outcome that you want. For example, you can see whether the values of all properties that are configured as adaptive model context are populated. For more information, see Configuring a single case run and Configuring a batch case run.

Adaptive learning and migration

When you update to Pega Platform 7.3 from earlier versions, adaptive model instances that have undefined context values are migrated. However, these models will not continue to record responses and learn. In addition, a new adaptive model is created, which duplicates the migrated model. The duplicate model displays the ContextNotDefinedError message for the context property whose value is missing.

50% found this useful

Related Content

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.