Entity filling behavior

This topic describes what happens at runtime when an entity that isn’t the entity in focus is recognized at a question and answer node, in use cases such as open dialog or directed dialog, with intent switching enabled or disabled. Depending on when the Mix project was created, and on the type of environment (Nuance-hosted, or self-hosted) where it was created, the runtime behavior may or may not involve the automatic filling of entities that are outside the scope of the active intent.

Common behavior when a question router manages entity collection

For a question and answer node that has a question router reference, when the interpretation results include entities, but not the entity in focus:

  • If any of the captured entities belongs to the set of entities managed by the specified question router node, all captured entities are filled, regardless of whether they are managed by this question router node. This might fill entities that are outside the context of the active intent.
  • If something in the interpretation results indicates that the dialog should switch to another intent, and the question router node is configured to allow intent switching, all captured entities are filled, regardless of whether they are managed by this question router node, and the first intent in the results will apply.
  • If the question router node isn’t configured to allow intent switching, this doesn’t generate a nomatch event. Instead, the dialog flow returns to the question router node, which determines that the same entity still needs to be collected. This might lead to a looping situation which wouldn’t provide any information to the end user. If your design must support a component that can’t allow intent switching, as a workaround, you can add logic between the question router node and each question and answer node under the question router node: for example, increment a counter and either move on to the question and answer node, or throw an event if the maximum number of attempts is exceeded. In the question and answer nodes, you could configure different reentry messages based on the value of the counter.

Default entity filling behavior in case of nomatch

Self-hosted environments: This behavior requires engine pack 2.3 (or later) for Speech Suite deployments; engine pack 3.11 (or later) for self-hosted Mix deployments.

Nuance-hosted environments: This behavior applies to Mix projects created after January 2023.

For a question and answer node that doesn’t have a question router reference, when the interpretation results include entities, but not the entity in focus, this generates a nomatch event without filling any other entities.

For a question and answer node that has a question router reference, when the interpretation results include entities, but not the entity in focus, if none of the captured entities belongs to the set of entities managed by the specified question router node—that is, none of them appears in its routing table)—and nothing else indicates that the dialog should switch to another intent, this generates a nomatch event and doesn’t fill any other entities.

It is possible to migrate existing dialog projects, to take advantage of this change: see Disable the legacy entity filling behavior.

Legacy entity filling behavior in case of nomatch

For a question and answer node that doesn’t have a question router reference, when the interpretation results include entities, but not the entity in focus, this generates a nomatch event but it also fills the captured entities, which could have undesirable effects and require adding logic to the dialog design to prevent interferences.

For a question and answer node that has a question router reference, when the interpretation results include entities, but not the entity in focus, if none of the captured entities belongs to the set of entities managed by the specified question router node, and nothing else indicates that the dialog should switch to another intent, this generates a nomatch event but it also fills the captured entities, which could have undesirable effects and require adding logic to the dialog design to prevent interferences.

Disable the legacy entity filling behavior

This procedure applies to Mix projects that were created before February 2023, and its purpose is to take advantage of the new default entity filling behavior that applies when an entity that isn’t the entity in focus is recognized at a question and answer node. Disabling the legacy behavior prevents the dialog service from filling entities out of context, at runtime.

To migrate a project:

  1. Export the JSON representation of your dialog design.
  2. Open the JSON file in a text editor, and look for the globalSettingOverrides element.
  3. Inside this element, look for the object literal that contains "settingName": "fill-entity-on-no-match".
    For example:
    {
        "id": "999313a7-dc50-42f6-b8c4-11c382072b15",
        "settingName": "fill-entity-on-no-match",
        "settingType": "INTERNAL_SETTINGS",
        "channelId": "",
        "predefinedName": "PREDEFINE_NOT_SET",
        "value": "true",
        "language": "",
        "entityId": ""
    }
    
  4. In this object literal, replace "value": "true" with "value": "false".
  5. Save the JSON file and import it back into the project.
  6. In Mix.dialog, review your dialog design, and remove any logic meant to work around issues associated with the legacy behavior.

After you have disabled the legacy concatenation behavior a project, if you decide to enable it again, proceed in the same fashion, but replace "value": "false" with "value": "true", before importing the JSON file back into your project. If you use the same JSON file as before, this will also restore all earlier workaround logic you might have removed, if any.