Manage locales for canonical phrases of intents

The aim of this document is to describe how to manage locales to include canonical phrases in intents

Introduction

Intents must have a canonical phrase to be able to disambiguate among them.

For this purpose, it is required to include canonical phrases for CLU intents in POEditor, within a section named “intent” and upload them to aura-bot deployment.

Two scenarios can arise here, distinguishing between global use cases and local ones.

Global use cases

a. Generate the locales in POEditor:

  • Access the POEditor global project.
  • Look for the specific resource of the global use case intent, that will have the format: intent:[intent_name].
  • Edit the text of the specific resource for the global intent including the canonical phrase for this intent.

b. Upload the locales to aura-bot deployment

  • The “intent” section of the global POEditor project is imported into the bot deployment by the global library:
    telefonica/aura-bot-library-disambiguation

  • If the intent is handled by a global dialog, it must be added in the locale-changes file to be deployed after every local deployment. It must also be notified to the Global Team to add it to the global POEditor, so it can be included in the succeeding aura-bot release.

Local use cases

For local use cases (intents handled by a local dialog), OBs should include resources for the all the intents’ canonical phrases. Aura Global recommends to use local POEditor, although this is not mandatory. The main request for those local resources is to be included in the library in a format compatible with the bot, as explained below.

a. Generate the locales in POEditor:

  • Access the POEditor local project
  • Create the specific resource with the mandatory format: intent:[intent_name].
    For example, intent:intent.billing.check
  • Edit the text of the resource with the canonical phrase for this intent

b. Upload the locales to aura-bot deployment

  • To deploy these resources in the environment, it is required to upload them only from a library. Therefore, the ideal process would be either to use a library that is always deployed in the environment or to create an ad-hoc library to manage common processes and load into this library the section “intent” of the local POEditor project.

PoEditor global