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.
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.
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:
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:
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.
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.