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.
The following sections are included in this chapter:
- Main components
- Recognizers
- Triggers
- Dialog Actions
- Properties
- Web Chat
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.
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.
Composer | Description | Equivalent in Teneo |
---|---|---|
Waterfall Dialog | A 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 Dialog | Component 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 Dialog | An 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 Dialog | A 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 Dialog | A 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 Dialog | Ask 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,
Composer | Description | Equivalent in Teneo |
---|---|---|
Attachment prompt | Asks 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 prompt | Asks 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 prompt | Asks 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 prompt | Asks 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 prompt | Asks for a number (a numeric value). | Nominal, cardinal, and ordinal formats of inputs are fully supported and included in the Lexical Resources library. |
Text prompt | Asks 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.
Which allows the user to have the following conversation:
Prompt Options
Composer | Description | Equivalent in Teneo |
---|---|---|
Prompt | The initial activity to send the user, to ask for their input. | An Output node together with a Match requirement. |
Retry prompt | The 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. |
Choices | A 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. |
Validations | Additional parameters to use with a custom validator. | Match requirements. |
Style | Defines 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:
Composer | Description | Equivalent in Teneo |
---|---|---|
Context | The 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. |
Recognized | A 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. |
Options | Contains 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. |
Succeeded | Indicates 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. |
Value | Defines 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. |
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.
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.
Composer | Description | Equivalent in Teneo |
---|---|---|
Trigger | A conversation | Flow |
Trigger Name | The trigger name, which can be changed in the properties panel | Flow name |
Actions | The set of instructions that the bot will execute | Nodes and flow panels |
Condition | The condition to trigger the conversation | Match 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:
Composer | Teneo |
---|---|
Intent recognized | Flow raised |
Unknown intent | Safetynet fallback flow |
Duplicated intents recognized | Disambiguation flow |
Activities triggers
Activities can be seen in Advanced Tryout window, and are also logged in your Log Data Manager.
Composer | Teneo |
---|---|
Activities | Events |
Greeting | Greeting flow |
Conversation Ended | End dialog, and On drop script |
Event received | Event properties |
Conversation invoked | Pause flow, and raise Sub Flow |
Recognizer event triggers
Composer | Teneo |
---|---|
Choose Intent | Intent trigger ordering |
Intent recognized | Class Match |
Unknown intent recognized | Safetynet fallback flow |
Dialog event triggers
There are four Dialog event triggers in Composer:
Composer | Teneo |
---|---|
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:
Dialog Actions
The following table lists dialog actions used in Composer and states the equivalent functionality in Teneo.
Composer | Equivalent in Teneo |
---|---|
Send a response | Output |
Ask a question | Output together with an input |
Create a condition | Transition |
Looping | Return to desired node by drawing an arrow from one node to the other |
Dialog management | Flows and Sub-Flows |
Manage properties | Variables |
Access external resources | Integrations |
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: state | Teneo |
---|---|
If/else | A 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. |
Dialog management
Composer | Equivalent in Teneo |
---|---|
Begin a new dialog | Call a Sub-Flow |
End this dialog | Drop flow |
End this turn | Skip condition |
Repeat this dialog | Return to desired node by drawing an arrow from one node to the other |
Replace this dialog | Call 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.
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.