Teneo Developers

Terminology

As with all Conversational AI tools, Teneo and Bot Framework Composer each have their own names for various components and functions. In this chapter, we will go through the terminology used within the Microsoft Composer framework, and identify the equivalent terminology in Teneo.

teneoxcomposer

The following sections are included in this chapter:

  • Main components
  • Recognizers
  • Triggers
  • Dialog Actions
  • Properties
  • Web Chat

Please note that functionality covered here is not necessarily identical in each of the two products, but behaves similarly and achieves the same end goals.

Main components

In Composer, each project has one Main dialog which can have zero or more Child dialogs. Each dialog has one or more triggers. In Teneo, logic is instead organized into flows. Flows can be thought of as dialogs, but there are no Main or Child flows. Each flow has one or more triggers.

Sub-Flows are types of flows that can be reused in the same way as a dialog in Composer. Just like when a dialog is called in Composer, the conversational flow in Teneo returns to where a Sub-Flow is called once that Sub-Flow is completed.

linking subflow-ny

More on Sub-Flows can be found here, together with an practical example here.

Dialog types

Composer has several different dialog types that can be recreated in Teneo. Below is a list of dialog types in Composer together with its equivalent in Teneo.

ComposerDescriptionEquivalent in Teneo
Waterfall DialogA waterfall dialog allows you to define a sequence of steps within a dialog that stores information given by the user.This type of logic can be achieved in Teneo using flows. Flows can contain sequences of steps and use variables to store relevant information from the user.
Component DialogComponent dialogs are general-purpose reusable dialogs.A Sub-Flow is a type of flow that does not have a trigger and that returns the flow of conversation to the flow it was called from. Just like dialogs, Sub-Flows are reusable throughout the project.
Adaptive DialogAn adaptive dialog allow Composer to dynamically update conversation flow based on context and events. This enables dialogs to be more natural and free-flowing.Flows are adaptive in Teneo and can change the context based on events that are defined in Transitions or Outputs with the help of Context restrictions, Match requirements or Scripts.
Input DialogA input dialog is type of dialog that supports the implementation of input actions.Inputs are able to be captured in Teneo in a lot of different ways, some examples include After Match on a mentioned Entity, or using a Listener to capture certain inputs.
Action DialogA action dialog is a type of dialog that supports the implementation of actions.The developer has the option to use an Integration to write a Script in form of a action, or use a Script node to implement actions within a dialog. This is possible with the Groovy language.
Prompt DialogAsk the user for input and return the result. A prompt will repeat until it gets valid input or it is canceled.In Teneo there a flow type called Prompt Flow which are being triggered when the flow stack is empty. A prompt dialog can be created by creating a simple flow and activating repeatibility in the output until the Match requirement is met.

Prompts

Prompts in Composer are divided into types, options and validations.

Prompt Types

Here is a list of prompt types and their equivalents in Teneo,

ComposerDescriptionEquivalent in Teneo
Attachment promptAsks for one or more attachments, such as a document or image (a collection of attachment objects).Attachments can be added through various Channels and used in Teneo.
Choice promptAsks for a choice from a set of options (a found choice object).Developers are free to set their own choices and branches when building flows, this can be in the form of a simple syntax, or a complex package in the form of a Language Object.
Confirm promptAsks for a confirmation (a Boolean value).Teneo comes together with its own Language Resources that includes language objects for both 'Yes' and 'No'. These Language Objects includes variations of that specific word, such as "Yes", "yup", "yeah", etc. These can be used as a Match requirement when building a flow.
Date-time promptAsks for a date-time (a collection of date-time resolution objects).Date and time handling is fully supported in Teneo, developers has the possibility to define dates with simple inputs in both European and American syntax, but also with inputs like, "tomorrow", and "next week".
Number promptAsks for a number (a numeric value).Nominal, cardinal, and ordinal formats of inputs are fully supported and included in the Lexical Resources library.
Text promptAsks for general text input (a string).Text inputs in any way are fully supported, together with different patterns of letters.

In addition to these, Teneo also allows you to use its own TLML (Teneo Linguistic Modeling Language) to create set of rules for your prompts to trigger. Some examples are acknowledging its Part of Speech (POS), or Named Entity Recognizer (NER) tags.

annotationUsedWord3Resized

Which allows the user to have the following conversation: user-mentions-name2

The conversation above uses Teneo Web Chat. Teneo Web Chat can be embedded in websites and supports rich media such as buttons, cards, quick replies, and much more!

Prompt Options

ComposerDescriptionEquivalent in Teneo
PromptThe initial activity to send the user, to ask for their input.An Output node together with a Match requirement.
Retry promptThe activity to send the user if their first input did not validate.Each output has the option to be revisited together with mentioning the number of times the output should be repeated. This can be activated with a single click, in the output configuration panel.
ChoicesA list of choices for the user to choose from, for use with a choice prompt.Choices can be displayed as buttons in Teneo Web Chat by adding a simple Output parameter. Choices can also be built in Teneo together with branching and conditions.
ValidationsAdditional parameters to use with a custom validator.Match requirements.
StyleDefines how the choices for a choice prompt or confirm prompt will be presented to a user.Prompts can be styled with the help of Output Parameters, which is shown in the Channels the solution is connected to.

Prompt Validations

You can validate a prompt response before returning the value to the next step of the waterfall. A validator function has a prompt validator context parameter and returns a Boolean, indicating whether the input passes validation. The prompt validator context includes the following properties:

ComposerDescriptionEquivalent in Teneo
ContextThe current turn context for the bot.After Match, for example if you want to recognize the mentioned name, you can use a script to capture used words, but also a language object for %NAMES.LIST.
RecognizedA prompt recognizer result that contains information about the user input, as processed by the recognizer.Using the script _USED_WORDS will allow you to store the input that was recognized.
OptionsContains the prompt options that were provided in the call to start the prompt.Values are stored in variables that can be on both Global and Flow level. These variables can be reused and accessed to both return a value, but also to confirm certain actions.
SucceededIndicates whether the recognizer was able to parse the input.Adding a Match requirement before an After Match will make sure the input was recognized successfully.
ValueDefines how the choices for a choice prompt or confirm prompt will be presented to a user.Values are stored in variables that can be on both Global and Flow level. These variables can be reused and accessed to both return a value, but also to confirm certain actions.

More on After Match could be found here

Recognizers

Recognizers extract intents and entities from user input. There are three types of recognizers in Composer:

  • Default recognizer
  • Regular expression recognizer
  • Custom recognizer

In Teneo, user intent is understood through Intent Triggers. Each flow in Teneo could have one or more triggers. Triggers can be configured with various Match requirements depending on which type of input needs to be recognized. Ordering is also used to help control the order in which triggers are prioritized in a hirearcical way of putting each flow in different groups which later is followed by the intent classifier.

intent-triggers-1png

There are multiple main ways to extract entities from user input. The most popular way is using After Match. After Match can be set at a particular node in a flow to extract information from user input or accomplish a number of other tasks. Some examples include storing the city mentioned by the user, or saving the users name.

One other popular approach is to use Listeners. Listeners can be thought of a fly on the wall which literally 'listens' to the conversation. This will later help your bot pick up relevant pieces of information from user inputs, even when these have not been explicitly prompted for. This valuable information can in later stages be reused in the conversation.

Triggers

Here are some terms around the topic 'Triggers' and what they are named in Teneo.

ComposerDescriptionEquivalent in Teneo
TriggerA conversationFlow
Trigger NameThe trigger name, which can be changed in the properties panelFlow name
ActionsThe set of instructions that the bot will executeNodes and flow panels
ConditionThe condition to trigger the conversationMatch requirement

Types of triggers

Composer comes with various types of triggers. Below is some examples that include:

  • Intent
  • Activities
  • Recognizer event
  • Dialog event

Intent triggers

There are three intent triggers in Composer:

ComposerTeneo
Intent recognizedFlow raised
Unknown intentSafetynet fallback flow
Duplicated intents recognizedDisambiguation flow

Activities triggers

Activities can be seen in Advanced Tryout window, and are also logged in your Log Data Manager.

ComposerTeneo
ActivitiesEvents
GreetingGreeting flow
Conversation EndedEnd dialog, and On drop script
Event receivedEvent properties
Conversation invokedPause flow, and raise Sub Flow

Recognizer event triggers

ComposerTeneo
Choose IntentIntent trigger ordering
Intent recognizedClass Match
Unknown intent recognizedSafetynet fallback flow

Dialog event triggers

There are four Dialog event triggers in Composer:

ComposerTeneo
Dialog started (Begin dialog event)Begin Dialog, and On Top flow script
Dialog cancelled (Cancel dialog event)Drop flow
Error occurred (Error event)Stuck flow
Re-prompt for input (Reprompt dialog event)Resume flow

These events are also shown when you are in the middle of building a flow: Studio-web-flow-w-arrow

Dialog Actions

The following table lists dialog actions used in Composer and states the equivalent functionality in Teneo.

ComposerEquivalent in Teneo
Send a responseOutput
Ask a questionOutput together with an input
Create a conditionTransition
LoopingReturn to desired node by drawing an arrow from one node to the other
Dialog managementFlows and Sub-Flows
Manage propertiesVariables
Access external resourcesIntegrations

Some dialog actions have several different subtypes. The following sections will go over these subtypes.

Ask a question

For the Ask a question dialog action, the following types of questions can be implemented:

  • Text
  • Number
  • Confirmation
  • Multi-choice
  • File or attachment
  • Date or time
  • oAuth login

In Teneo, Match Requirements can be used to make sure user input contains the required information in the required format (text, number, etc.). Additionally, these specific types of information can be extracted from any user input using Entities.

Create a condition

These are the condition types that exist in Composer along with their equivalents in Teneo:

Branch: stateTeneo
If/elseA branch can be added to a flow using the Plus icon followed by Split path.
Switch (multiple options)Split path can be used for multiple options.

3-split-path

Dialog management

ComposerEquivalent in Teneo
Begin a new dialogCall a Sub-Flow
End this dialogDrop flow
End this turnSkip condition
Repeat this dialogReturn to desired node by drawing an arrow from one node to the other
Replace this dialogCall a Sub-Flow

Properties

Properties are used to store data throughout the conversation flow in Composer. In Teneo, data can be stored in Global Variables, Flow Variables and Local Variables.

1-variable

As opposed to Composer, variables in Teneo do not need to be set in their own nodes in flows. Instead, they can be updated in any relevant node in a flow.

Testing with Web Chat or Emulator

Tryout is used to test solutions in Teneo. Tryout does not need setting up before it can be used and when necessary can be restarted or reloaded quickly when necessary. In addition to that, Teneo also support multiple channels which can be found under Resource, where some include Teneo Web Chat and Microsoft Teams, together with its own Engine URL.

1-try-out-first-picture with text