Teneo Engine
Deferred Classification
With the introduction of CLU in the Teneo Platform, the classification of a user input (and the generation of class annotations) has become a task that can require access to an external service, such as a language resource in Azure, which might lead to costs, but since not every user input involves class matches, Teneo 7.3 brings deferred - or lazy - intent classification.
In short, deferred intent classification means delaying or transferring the classification from the input processing till the first occurrence of a class annotation reference (e.g., in a Class Match, a Syntax Match or in solution scripting) is encountered during the matching process and then create the annotations.
Therefore, with deferred classification the input annotations for intents (as generated by the Predict Input Processor) are not created during the input processor invocation between the preprocessing and pre-matching events, but rather on demand when classes/annotations are checked by the Engine during the flow processing, and the deferred classification is triggered in these cases:
- Evaluation of a Class Match in a trigger or transition
- Evaluation of an annotation syntax in a TLML Syntax (trigger, transition, listener, etc.) where the annotation name ends with
.TOP_INTENT
or.INTENT
; for example,%CITY.TOP_INTENT
- Read access to annotations from solution scripting or script condition (embedded in a TLML Syntax) via EngineAccess method
_.getInputAnnotations()
and its sub-methods except for these cases:- Access to a single annotation via methods
_.getInputAnnotations().getByName(...)
can trigger classification only if the given annotation name is a known class plus suffix.TOP_INTENT
or.INTENT
- Invocation of method
toString()
on the object returned by_getInputAnnotations()
will not trigger classification
- Access to a single annotation via methods
The input processor results in the processing path (visible in Tryout) won't contain annotations for intents unless the classification is triggered as described above. Thus, if no deferred classification trigger appears during processing an input, the annotations will not be created.
Note that this change also affects the Log Data as not all inputs will have the class annotation anymore.
Also see the Tryout section of the Release Notes
Teneo Engine Logs
Input Processor Messages
The Input Processors in Teneo 7.3 are extended to enable them to send log messages to the engine log message after which Engine logs these together with the session Id and the transaction Id (when available).
This change is introduced to bring visibility to possible request failures to the CLU runtime model, especially in cases where the Azure/CLU service is down, if a CLU model is removed, the CLU API key changes, etc. In case of failure with CLU at runtime, the Predict Input Processor uses the Learn model instead as a fallback model and this is what is now being monitored and logged to bring users' attention to this.
Therefore, in Teneo Engine logs, in the Messages section of Tryout and under IP Errors in the Status of a Publish Environment, the developer can now see errors which come from the Predict Input Processor and which cover the following scenarios:
- URL can't be reached (Unknown Host)
Unknown CLU host name. The user should check the settings. - 401 because of wrong API key
Access is denied due to invalid subsription key or wrong API endpoint. The use should ensure that a valid key for an active subscription is provided and use a correct, regional API endpoint for the resource - 404 because of wrong project name
The specified deployment cannot be found within the provided subscription. - 404 because of wrong deployment Id
The specified deployment cannot be found within the provided subscription.
The error messages are displayed in the Engine log, in the Messages section of Tryout and a count of errors is displayed in the IP Errors field in the Status of a Publish Environment together with a tool tip when hovering over.