Teneo Conversational Modules
Introduction
The Teneo Conversational Modules are solutions with Flow drafts which can be used when creating a new solution or project; the Conversational Modules with Dialogue Resources are provided directly in Teneo Studio as template solutions.
The Dialogue Resources cover all needed understanding and interaction for keeping a fluent dialogue as well as providing a conversational and humanlike experience to the end-user; and they are more than simply smalltalk or chit-chatting Flows as they are the generic dialogue capabilities that conversational AI applications need to behave human-like, show social skills and personalized behavior, to simulate intelligence and, in this way, engage the end-users such that they trust the capabilities of the application.
Benefits of Teneo Dialogue Resources
- Social conventions: the Teneo Dialogue Resources follow the social protocols and conventions a user expects and enables the conversational AI application to be polite, respond to greetings, react to insults, etc.; this encourages the end-user to interact in a natural way.
- Credibility: it gives the impression that the conversational AI application is intelligent; this can help the end-user to trust the application's answer within the project-specific domain better.
- Personalized behavior: it enables the conversational AI application to remember the user's name or to answer questions about the application itself, among other things.
- Human-like behavior: it gives the conversation AI application human-like behavior by being able to understand common knowledge questions that go beyond project-specific knowledge.
- Gets the user back on track: Flows in a Dialogue Resource can be used to point the dialogue back to the project-specific core questions for which the conversational AI application's knowledge is developed.
- Educational: the structure of the more complex Teneo Dialogue Resources' Flows can be used as inspiration and education for conversational AI developers and clients on how to solve similar dialogue situations within their domain.
- Fewer user-inputs trigger the "Safetynet": by catching non-project specific user-inputs, insults and nonsense before they end up in the Safetynet, irrelevant user-inputs can be filtered out and focus can stay on the core knowledge areas that need to be improved. Without the Dialogue Resources, the AI application is not only perceived as dumb and impersonal, but the Safetynet, non-understanding responses go up.
- React and respond to unhappy customers: the Flows can help to capture when the user is not happy with the responses or the AI application's capacities (negative, insults, etc.).
- Corporate branding: the answers in the Teneo Dialogue Resources and other Conversational Modules can be customized to promote the brand name and to share the company's values.
Working with Conversational Modules
The Conversational Modules are template solutions and as such they are nearly production-ready, but some project time should be dedicated to the adaptation of Flows manually according to the needs of the project; it is entirely up to a project to disable or delete any Flows that are not applicable for the project.
As a template solution, the Teneo Dialogue Resources are used at the start of a project, selecting the wanted Dialogue Resource under Create from Template in the New Solution window of Teneo Studio; click here for more details.
Many of the Flows, as mentioned, need to be customized when used in a project, for example adapting the answer texts so they correspond to the style and tone-of-voice of the AI application; some facts in the answers also need adaptation, such as the company's address, the AI application's interests, etc. Time for this should be considered when Conversational Modules are used.
The necessary adaptations may also include reviewing the solution's Intent Trigger Ordering to ensure that the Intent Triggers of the Dialogue Resource (or other Conversational Modules) are compatible with project-specific Intent Triggers; developers can re-arrange and re-name the folders and change the structure as needed.
Available modules
All the Flows in the Teneo Dialogue Resources are grouped into conversational modules visualized as folders inside Teneo Studio; currently the below listed modules are available.
Conversational Modules | |||
---|---|---|---|
Acknowledgements | Bot and User Names | Bot Functionality | Bot Personality |
Connecting Phrases | Emojis | Feedback | Friends |
GDPR | Greeting Message | Greetings | Horoscope |
Jokes | My Company | Profanity | Safetynet |
Time Check | User Personality | Weather |
Writing answers
Even if a project does not want their conversational AI application to be able to respond to non-project specific user inputs, it can be a good idea to write answers in the Flows of the Conversational Modules that somewhat indicate that the user input is understood.
Example: User asks about the bot's favorites
Good answer: I am strictly here to work. I cannot find the time to focus on {favorite mentioned by the user} and all that. Why don't you ask me about {something project relevant} instead?
Not as good answer: I am not programmed to talk about that subject. Why don't you ask me about {something project relevant} instead?
Global content
Scripted Contexts
The below Scripted Contexts some as part of the Teneo Conversational Modules; they are used by the Flows of the Conversational Modules, but can also be used by project-specific Flows.
Context name | Description |
---|---|
Class Confidence High | Assigning the scripted context restriction to a Trigger with a Class Match prevents it from triggering if the confidence score of the input is lower than 0.80 (which corresponds to 80%) even if the global confidence score of the solution is set lower. |
Class Confidence Medium | Assigning the scripted context restriction to a Trigger with a Class Match prevents it from triggering if the confidence score of the input is lower than 0.60 (which corresponds to 60%) even if the global confidence score of the solution is set lower. |
Disable match | Assigning this scripted context restriction to a Trigger or a Transition disables it without having to disable the entire Flow |
Follow up of Flow | When assigning this scripted context to a Trigger it will only trigger directly after inputs triggering the same Flow. If the previously triggered Flow resides in a "Safetynet" folder, the script instead looks at the input prior in the history. |
Follow up of Folder | When assigning this scripted context to a Trigger it will only trigger directly after inputs triggering another Flow residing in the same folder. If the previously triggered Flow resides in a "Safetynet" folder, the script instead looks at the input prior in the history. |
Input Sentences | When assigning this scripted context to a Trigger or Transition, it will only be fulfilled if the number of sentences in the user input matches selected state(s). |
Input Words | When assigning this scripted context to a Trigger or Transition, it will only be fulfilled if the number of words in the user input matches selected state(s). |
Multi-Word Input | When this context is assigned to a Trigger or Transition, user inputs consisting of only one word are prevented from triggering. |
Read more about Global Scripted Contexts in the User Guide
Global variables
The following Global variables are available in the Conversational Modules.
Variable name | Default value | Description |
---|---|---|
botName | "Botname" | The name of the bot. Used in answer texts. To be configured per project. |
companyName | "Artificial Solutions" | The name of the company. Used in answer texts. To be configured per project. |
userFirstName | "" | The name of the user. Can be captured in the The user is telling his name flow. |
userTimeZone | "CET" | The user’s time zone. To be configured accordingly. Used in the Greeting message flow. |
Note that the German Conversational Modules also contains the companyName
in accusative, dative and genitive cases; read more.
Read more about Global Variables in the User Guide
NLU Ontology and Semantic Networks
The Teneo Conversational Modules all make use of the Teneo NLU Ontology and Semantic Network available for each language; read more here.
Hybrid Dialogue Resources
All languages
The hybrid Teneo Dialogue Resources contain roughly 100 Flows, depending on the language, that cover a wide range of common chitchat and smalltalk inputs, as well as Flows that handle a greeting message, empty user inputs, non-recognized user inputs, more sophisticated dialogue situations including conversations about the AI application's favorites and interests, recognition of the user's name and age, etc.
The scope of the Flows has been defined by analyzing authentic conversation logs and they cover the most frequently occurring non-project specific dialogues.
The 3 top-level Flow categories are:
- Greeting Message
- Safetynet
- Dialogue
Greeting Message
The Greeting Message is always the first text the end-user will see when they encounter the conversational AI application and the first Flow triggered in the conversation. In the answer text of this Flow it is recommendable to introduce the application and describe its area(s) of expertise.
The Intent Trigger of the Flow is coded with the system annotation %$_INIT
and the Flow detects the time of the day to provide an appropriate greeting to the user, i.e. Good morning or Good evening depending on the time.
The Flow also contains a Merry Christmas greeting; this answer is given if the month=12
and the day>>23
. Other greetings to mention, for example, a time limited offer can be created following the same pattern and using the Flow variables day
, month
and year
.
Safetynet
The Safetynet folder contains one Flow that resides at the bottom of the Intent Trigger Ordering and which will collect any user input that is not triggered by any other Flow.
The TLML syntax Match in a Safetynet Flow must be empty, because it should be true for any user input that has made it this far. It is good practice to create several different answers so that the user does not receive the same answer too often.
The analysis of Safetynet inputs is useful to find new knowledge areas and to widen existing Flows.
Dialogue
Acknowledgement
The Flows in this folder handle simple user inputs such as Yes, No, I agree, Interesting, Great, Maybe, etc.
Bot and user names
This folder contains three Flows pertaining to names, both the user's and the bot's.
The user's name is stored in variable userFirstName
as a string and this variable can be re-used later in the answer texts to create more of a personal tone.
The Flow The user is telling his name has an Intent Trigger which uses the follow-up folder Scripted Context to catch answers from follow-up questions after the Flows The user asks for the bot's name and The user asks if the bot remembers her name.
Connecting phrases
Connecting phrases: Empty / Long input / Nonsense
Sometimes the user inputs do not contain words or contain symbols that require special treatment. So, the Flow Intent Triggers are coded in a special way, using scripts and system annotations:
- Empty:
%$_EMPTY
The conversational AI application responds suitably to user inputs which contain no text. - Long input:
{_.getSentenceWordCount()>20} / {_.getSentenceCount()>2}
All the inputs containing more that 20 words or 3 sentences will be triggered (the number of words or sentences can be adjusted). - Nonsense:
%$_NONSENSE / %$_BINARY
This Flow is placed low in the Intent Trigger ordering and is triggered on meaningless user inputs, such as adsf, aaaerrrr, ggg, ;;;;;;;;;;;;; or inputs consisting of only 0s or 1s.
Read more about System and Standard annotations
Connecting phrases: Meta
Here the user will find, for example, the Flow The user asks the bot to please repeat which uses the bot's most recently provided answer as a response.
A script node saves the answer text to the Flow variable previousAnswer
when there is at least one answer available in the history.
Connecting phrases: Negative
The Flows in this folder can detect user's frustrations, disagreement, discontent or problems. Examples of inputs: Is something wrong with this?, Forget it, Never, I give up, I asked you something, etc.
Connecting phrases: Questioning
The Flows in this folder handle short inputs such as Why?, What now?, For what reason?, Don't forget, etc.
Connecting phrases: Support
This folder contains a Flow that is triggered when the user asks for help, support or advice as well as Flows regarding foreign languages.
One of the language related Flows uses the Language Detector input processor to identify inputs in non-solution languages, using the annotation to provide an appropriate response. Please visit the Input Processors section to read more about the Language Detector.
Another Flow identifies questions in the solution language about which languages the bot can speak.
Conversational
Conversational: Bot functionality
This category covers inputs regarding the conversational AI application's technical parameters, as well as the purpose of the bot, such as Can I use you on my smartphone?, How fast are you?, Do you get updated often?, Which technology are you built with?, How many answers do you have?, Do you save history of the logs?, Are we talking in real time?, How much do you cost?, etc.
Conversational: Bot personality
In this category, there are Flows that trigger on inputs such as Are you a man or a woman?, Are you married?, Where are you from?, Do you like music?, Do you have pets?, etc. Adding the answers in this category helps forming the personality of the conversational AI application.
This category also contains a Flow that triggers on questions regarding the conversational AI application's favorites. The Flow has different answer nodes that identify whether a user has named a specific favorite and uses a LIST Language Object followed by a propagation script to provide a tailored response to the user.
Gathering all questions regarding favorites in one Flow makes it easy to add more favorites; it also allows to point the conversation into a more preferred direction. The Flow is implemented so that the output is followed by:
- the question whether the conversational AI application is the first one the user has met, and
- if the user continues asking about favorites, the next answer will lead into a conversation about the user's favorite day of the week.
Obviously, this Flow can be adapted in each project and instead promote a new product, start a survey, or similar.
Conversational: Friends
This folder contain Flows covering inputs where the user mentions friendship or flirts with the conversational AI application.
Conversational: GDPR
The Flows in this folder handle inputs related to GDPR and date protection, for example What information do you collect about me?, GDPR, I want to unsubscribe from all marketing emails, Stop collecting my personal data, What information do you store about me?, etc.
Conversational: Horoscope
In the horoscope Flow, an example of how to use the same-flow follow-up global scripted contexts to handle follow-up questions is presented. The script checks if the Flow is the same as the previous input, allowing the bot to respond to context-dependent follow-up questions when relevant.
Conversational: Jokes
Another way to handle context is exampled in this folder by using the follow-up of folder scripted context.
Here, the scripted context is added to each of the context-dependent Flows in the folder, denoted in the Flow names by Same folder context. These Flows will only trigger directly after inputs triggering the Flow The user wants to hear a joke.
Conversational: Profanity
Flows in this folder cover inputs such as sexual or racist remarks, drugs, violence or similar. Our experience is that recognizing these types of inputs at an early stage can make it easier to lead the end-user away from it.
Conversational: Time check
This folder contains the Flow The user wants to know the time and the reply is giving a time based on the value of the global variable userTimeZone
.
Conversational: Weather
The Flow in this folder handles all sorts of inputs related to the weather.
Emojis
The Flow The user writes an emoticon or emoji reacts on inputs containing some common emoticons.
In Chinese (Mandarin), Dutch, English, French, German, Italian, Japanese, Portuguese, Spanish and Swedish the Flow can also react on a number of common emojis.
Feedback
A conversational AI application will over time receive both positive and negative feedback; by being able to respond to this instantly, the end-user will get a better user experience.
Feedback: Negative
Flows in this folder trigger on inputs such as You are boring, You are so stupid!, Are you completely stupid or what?, You give always the same answer, I hate your company, Don't get smart with me!, This is obviously not what I asked!, etc.
It is useful to have this category as it can serve as a base for improvements and the detection of users' problems.
The folder also contains the Flow The user requests the bot to stop it that contains a script that clears the stack of any active Flows when the Flow is triggered.
Feedback: Positive
The Flows here trigger on inputs where the user gives positive remarks, such as smart/intelligent/pretty, You are really funny, Thank you that's very helpful, I love you, You are the best assistant ever, etc.
Greetings
Flows in this folder trigger on greetings and goodbye's, such as Hello, Goodbye, Nice to meet you, How are you, Merry Christmas, etc.
My company
This category contains Flow drafts for general company related inputs, such as opening hours, contact information, job opportunities, social media, management information, etc.
There is also a Flow draft for Chat Handover that triggers on inputs such as Can I speak with someone real?, Can I talk to someone online, I need to speak to a person, Chat with an operator, Live chat, etc. This Flow should be adapted in each project following the project-specific chat handover strategy.
User personality
Flows in this category trigger when the user is giving an information about himself, such as the city or country where he lives, his gender or his age. Some of these Flows trigger on inputs that express the user's sentiments, feelings or attitudes.
Intent Trigger Ordering
To prevent conflicts between Intent Triggers in the Dialogue Resources, the Intent Triggers are distributed amongst different order groups. Order groups for the Dialogue Resources are prefixed with TDR. It is possible to add additional order groups if desired to create further layers of order.
The order group structure can be seen in the following image.
Russian Dialogue Resource
The Russian Dialogue Resource contains 47 Flows that cover a wide range of common chitchat and smalltalk inputs, as well as Flows that will handle greeting message, empty user inputs, non-recognized user inputs, more sophisticated dialogue situations including conversations about the conversational AI application's favorites and interests, recognition of the user's name and age, etc.
The scope of the Flows is defined with the help of analysis of authentic conversation logs. They cover the most frequently occurring non-project specific dialogues.
Structure
All the Flows in the Russian Dialogue Resource are grouped in categories in a folder structure. The Flows have TLML Syntax Matches defined in the triggers, one or more answers and several positive and negative examples of user intent.
The 3 top-level categories are:
- Dialogue
- Greeting message
- Safetynet
Dialogue
Connecting phrases
Connecting phrases: Acknowledgement / Greetings / Questioning
The Flows in these folders handle simple user-inputs such as Hello, Why?, How are you?, Very interesting, etc.
Connecting phrases: Meta
Here the user will find the Flow The user asks the bot to please repeat, with the variable lastOutput
which stores the last user input as a string.
Connecting phrases: Negative
The Flows in this folder can detect the user's frustrations, disagreement, discontent or problems.
Connecting phrases: Support
This folder contains Flows which are triggered when the user asks for help, support or advice.
Conversational
Conversational: Profanity
Flows in this folder cover inputs such as sexual remarks; our experience is that recognizing these types of inputs at an early stage can make it easier to lead the end-user away from it.
Conversational: VA personality
In this category there are Flows related to the personality of the conversational AI application. Adapting the answers in this category will help to form the personality of the conversational AI application, but can also be adapted to promote the company values.
Feedback
A conversational AI application will receive both positive and negative feedback; by being able to respond to this instantly, the end-user will hopefully get a better experience.
Flows in the Negative folder will handle negative feedback from the user. It is useful to have this category as it serves as a base of improvements and detection of users' problems. And Flows in the Positive folder will, obviously, handle the positive feedback the conversational AI application will receive.
My company
This category contains in the Russian Dialogue Resource a Flow which covers contact information and which is triggered when the user wants to speak to an operator or when she asks where the contact data is, how to contact the company (e.g. by phone or e-mail), etc.
User
User: Sentiment
The sentiment category covers two types of sentiment: Positive and Negative. Flows in these folders trigger when the user expresses sentiments, feelings or attitudes.
Non-conversational
The Flows in the non-conversational category of the Russian Dialogue Resource are just like the Flows in the Connecting phrases: Empty / Long input / Nonsense / Timeout category of the hybrid Dialogue Resources.
Sometimes the user inputs do not contain words or contain symbols that require special treatment. So, the Intent Triggers are coded in a special way, using scripts and system annotations:
- Empty:
%$_EMPTY
The conversational AI application responds suitably to user inputs which contain no text. - Long input:
{_.getSentenceWordCount()>20} / {_.getSentenceCount()>2}
All the inputs containing more than 20 words or 3 sentences will be triggered (the number of words and sentences can be adjusted). - Nonsense:
%$_NONSENSE / %$_BINARY
This Flow is placed low in the Intent Trigger ordering and is triggered on meaningless user inputs, such as “adsf”, “aaaerrrr”, “ggg”, “;;;;;;;;;;;” or on inputs consisting of only 0s or 1s. - Timeout:
%$_TIMEOUT
The current session has timed out and this is the response given when a user returns after the timeout. Although it is not possible to edit the settings of the system annotation, it is possible to set a timeout value through scriptingengineEnvironment.setSessionTimeout(n)
, where the timeout can be set to "n" seconds.
Intent Trigger Ordering
The Russian Teneo Dialogue Resource contains the Intent Trigger Ordering groups visible in the below image.
Related topics
Flow lists per language
Teneo NLU Ontology and Semantic Networks