Working with LUIS^Teneo

The concept of LUIS^Teneo is to handle language understanding in Microsoft LUIS and the conversation in Teneo. This page will describe in depth on how LUIS^Teneo works and how to think using this approach.

Workflow

The overall workflow when working with LUIS^Teneo is to work on the language understanding - meaning Intents and Entities - in LUIS and then consuming them in a Teneo solution set up to let LUIS do language understanding.

Intents

While working with intents we need to:

  • Modify the Intents in your LUIS application.
  • Train and Publish the LUIS application to the staging slot.
  • Make sure an intent provided by LUIS triggers the appropriate flow in Teneo. This is done by setting the name of the intent as written in LUIS in the field in a class trigger in Teneo.

Intent names should be all upper-case with words underscores instead of spaces. For example, Hello world should be named HELLO_WORLD. Any intents with other names will automatically be renamed by the LuisPredict groovy script.

Entities

We can easily consume entities from LUIS in Teneo. Entities are annotated in inputs and can be picked up using either listeners or through attached scripts. You can read more about how to do this in the here or if you wish to do this with LUIS entities.

The 'LuisPredict' groovy script will annotate LUIS entities like this: LUIS_ENTITY_NAME.ENTITY (for example, the prebuilt LUIS entity 'geographyv2' will be annotated as LUIS_GEOGRAPHYV2.ENTITY.)

The LUIS entities also coexist with the extensive entity support in Teneo where the user has to opportunity to get the best of two worlds.

Publishing

Any changes made in the LUIS application needs to be trained and published before used in Teneo. The 'LuisPredict' groovy script will automatically decide between the staging and production slot in LUIS. Only production publishing targets in Teneo will use the production slot in LUIS and all others will call the staging slot.

The LuisPredict groovy script

The LuisPredict.groovy is responsible for:

  • Taking the users input.
  • Sending it to LUIS.
  • Parsing the results.
  • Adding annotations in Teneo for Intents and Entities.

The call to LUIS is set up to always log utterances in LUIS which is useful for development. For production use-cases we may want to apply other reasoning and only log when the LUIS^Teneo solution is deployed in production.

A detailed guide on how to use the LuisPredict script in your solution is available in Your first LUIS^Teneo solution.

Where to go next?

Here is a gentle introduction to getting started with LUIS^Teneo.

Was this page helpful?