Training & Chat Logs
Overview
Your bot's conversation logs can be accessed from the 'Training & Chat Logs' menu in its Admin Console. The Training & Chat Logs page lets you review your bot's conversations, responses, words, and phrases.
The training and chat logs page allows you to add new responses, greetings, and default responses. You can view the conversations your bot has had, and correct the responses. You can view and edit responses, greetings, default responses, phrases and flagged responses.
You can correct a bot's response in a conversation, or add or edit existing responses. You can associate keywords, required words, previous responses, and topics to your bot's response to improve its response matching and conversation context. You can label responses to reuse them in other questions by referencing the #label.
You review your bot's words and phrases. You can define sentiment, emotions, actions, poses, keywords, and synonyms.
You can also import response lists, chat logs, or AIML files from the shared script library, or upload the files from your computer. You can export and download your bot's conversations or responses as a response list, chat log, or AIML file.
Toolbar
Icon | Property Name | Description |
---|---|---|
Menu | Choose from the list of options. | |
Home | Returns to the training and chat logs start page. | |
Enter | Enter a new default response. | |
Edit | Enter a correct response for the selected phrases. | |
Inspect | Browse the selected responses or phrases. | |
Select | Select all conversations, responses, or phrases. | |
Wrong | Mark the selected responses as invalid responses, or decrease their correctness %. | |
Check | Mark the selected responses as valid responses, or increase their correctness %. | |
Flag | Flag the selected phrases as offensive. | |
Unflag | Unflag the selected phrases as not offensive. | |
Delete | Delete the selected responses, greeting, default response, or conversations. | |
Export/Download | Export and download the currently displayed logs as a chat log file, response list, or AIML script. | |
Upload | Upload and import a chat log, response list, or AIML script. | |
Import | Import a chat log, response list, or AIML script from the script library. |
Search Properties
Properties | Description |
---|---|
Search | Search all conversions, responses, greetings, default responses, phrases, words, or flagged responses. |
Duration | Filter the results by day, week, month, or all. |
Filter | Filter the results to only include phrases containing the filter text. |
Type | Filter by chat or social media message type. |
Restrict | Filter the responses or conversations. |
All | Show the responses details. |
Topic | Show the topic of the responses. |
Label | Show the label of the responses. |
Keywords | Show the question keywords to match the responses. |
Required | Show the question required words to match the responses. |
Emotions | Show the emotions of the responses. |
Sentiment | Show the sentiment of the responses. |
Confidence | Show the confidence of the responses. |
Actions | Show the actions of the responses. |
Poses | Show the poses of the responses. |
Next | Show the next questions to the responses. |
Previous | Show the previous questions to the responses. |
Repeat | Show the response repeat options. |
Condition | Show the response condition code. |
Think | Show the response think code. |
Command | Show the response JSON client command. |
Conversations
You can review your bot's conversations, and correct the bot's response if it did not know the answer, or gave an incorrect response.
Browse Conversations
Correct Response
Responses
You can add new responses, or edit existing responses. A response includes the question, the response, and various meta data about the response.
To see all of your bot's trained responses, search for responses for the all duration. This will list all of your bots responses, ordered by when they were added. A response will not only be used for the exact question it was learned for, but also any similar questions. When your bot encounters a question it does not know a response to, it will find the best matching question that it knows a response to, and use that response. If the bot does not know any similar questions, then it will use its default response.
The response browser lets you enter a new response, or edit, delete, invalidate, validate, or flag any existing responses.
The response editor lets you enter the question and response and optional response properties and metadata. You can choose to edit your response using a rich 'WYSIWYG' (what you see is what you get) editor, or a plain text editor. Responses are in HTML, and can contains most HTML tags such as <b> for bold, <a> for links, <img> for images, and <button> for buttons.
Response Properties
Name | Description |
---|---|
Question | Edit the question, if desired, you can use * wildcard to make a pattern. |
Sentiment | You can associate an emotion with the phrase. |
New Response | Enter a new response for the phrase. |
Condition | Optionally you can give a condition in self code that must evaluate to true for the response to be use. |
Think | Optionally you can give a 'think' code in self that is evaluated when the response is used. |
Command | Optionally you can give a JSON command (Self code) that is evaluated and returned to the client to support games and virtual assistance. |
Topic | Optionally you can give a topic to categorize the response under. |
Intent Label | Optionally you can give a label to reuse the response as. |
Keywords | Optionally you can give keywords from the question that will influence a response match. |
Required | Optionally you can give required words from the question that will be required for a response match. |
Emotions | You can associate an emotion with the response. |
Actions | You can associate an action with the response. |
Poses | You can associate a pose with the response. |
On Repeat | Optionally you can give a response to used if the current response has already been used in this conversation. |
No Repeat | Require that the response or phrase only be used once. |
Next | Optionally you can give a next response to give a response a context. |
Previous | Optionally you can give a previous response to give a response a context. |
Require Previous | Require that the response only be used if the previous response matches one of the previous responses. |
Save | Save the corrections to the phrases. |
Question
The response question can be a phrase that will be automatically matched with similar questions, or can be a Pattern. Patterns are matched literally in the order of the words in the pattern, and can have wildcard characters such as * and can also include Regular Expressions. Normally it is best to use a phrase, and let the bot decide if a question should match, you can also add keywords and required words to improve when a question is matched. To enter a pattern just use a wildcard such as * in the question, or enter your pattern like the following.
Pattern("What is *")
Response
The response can be a phrase, can contain HTML or rich content including images, video, and buttons, or a response can be a Template. A template is a response that can include some Self code. Any code inside {} in a template will be executed, and the result printed into the response. To enter a template just include {} in your response, or enter your template like the following (do not use the WYSIWYG editor for tempates).
Template("Today is {Date.date()}.")
Keywords
Keywords are important words in the question that should influence when the response is used.
// Keywords are used to allow this response to be used for any questions on hockey or spinach. question: do you like hockey response: Hockey is my favorite sport. keywords: hockey question: what do you love response: I love hockey! keywords: love luv like adore question: do you like field hockey response: I only play ice hockey. keywords: "field hockey" question: i love spinach response: Spinach is is my favorite food. keywords: spinach
A keyword will be used by the bot to select the best response. Keywords let some words count for more than other words. In the example, the bot knows two responses, how will it respond to the phrase "I love hockey"? Without the keywords the bot would probably match this question with "I love spinach", but since hockey is a keyword, it will instead match it with "Do you like hockey?".
If the response has no defined required words, then the keywords will also be required for the response match. So "I love hockey" would not be matched with "I love spinach." because it is missing the keyword.
If you keywords has many similar words. You can list them all as keywords to match any of the words. You could also define these words a synonyms, which may be a better option.
You can also use compound words are keywords. A compound keyword must have all the words in the order to be used. For a compound keyword just wrap the words in "quotes".
Be careful using too many keywords. If every word is a keyword, then their value is diminished. Never make common words like "the", "a", "he", "what" keywords, if you require one of these words for a match use a required word instead.
You can also review all of your bot's keywords by searching for 'words' and restrict to 'keywords'. This lets you remove a word from being a keyword if you added it by mistake.
Required
A required word is a word that is required to be in the question for a specific response.
// This example requires the words 'like' and 'hockey'. question: do you like hockey response: Yes, I like hockey. required: like hockey // This example requires the compound word 'ice hockey'. question: do you like ice hockey response: Yes, I like ice hockey. required: "ice hockey" // This example requires one of the words 'like' or 'love', and 'hockey'. question: do you like ice hockey response: Yes, I like ice hockey. required: (like love) hockey // This example requires a pattern. question: are you okay response: Yes, I am okay. required: Pattern("^ are you (ok okay)")
A required word can be used to ensure the bot does not choose a response if the required word is missing from the question. For example the question "Do you play hockey?" would normally be matched to this response, but because it is missing the required word "like", it will not be considered as a match.
All of the required words must be contained in the question in order for the response to be used. Required words also supports lists, compound words, and patterns. To require one of a set of words a list can be used using brackets i.e. (like love). To require a compound word quotes are used i.e. "hello world". To require a pattern enter the pattern i.e. Pattern("what is *").
Previous
A previous responses is the bot's preceding response. Previous responses can be used to give a response a context.
// This example uses previous to give different answers to 'yes' depending on the context. question: yes response: Great, wanna go out sometime? require previous: Are you single? question: yes response: I am please to hear that. require previous: Are you happy?
The question "Yes" has multiple responses. The bot can use the previous response to choose the best response. You can also invalidate a previous response to ensure the bot does not use a response if the previous response was preceding.
A previous response can either be 'required' or optional. If required, the response will never be used unless one of the previous response matches. If optional (default) the response is given precedence if the previous response matches, but can still be used if the previous does not match.
Topic
A topic is the general topic category for the response. For example a response on a hockey related question would belong to the "hockey" topic. You can use topics to categories your responses and give the bot additional context. If the bot has multiple responses to a question, it will use the one that matches the current topic.
Topics can be either optional or required. The response topic is optional by default, it you click on 'Require Topic', then the response will only be used if that topic is active in the conversation. If optional the topic will be set as active for the conversation, until a new topic is set.
Topics can also be defined as exclusive. An exclusive topic defines an isolated conversational space. For a normal topic that is not exclusive the bot can still use responses that do not have the same topic, but responses with the active topic will be given precedence over responses without a topic. For exclusive topics only response that have the same topic as the active topic will be used. No other responses will be used (other than possibly the default response if there is no topic default).
Topics can also be set on greetings to start the conversation with a topic. Topics can be set on default responses to provide a different response when that topic is active.
// Categorizes the product response. question: what are your products response: Our products include ACME CRM and ACME ERP. topic: products // Use an exclusive topic to define a joke conversational dialog. question: joke response: Knock knock. exclusive topic: joke question who is there response: Boo. require topic: joke question: boo who response: Don't cry. lol require topic: joke think: conversation.topic = null; default: Say 'Who is there?' require topic: joke default: Say 'Boo who?' require topic: joke previous: boo
Intent Labels
A response can be given an intent label to let you reuse the same response in other questions. You can also use labels in a response's previous.
// Use a label to reuse the common products response. question: products response: Our products include ACME CRM and ACME ERP. label: #products question: what are your products response: #products question: what software do you sell response: #products question: are they good response: Our products are the best in the world. previous: #products
On Repeats
If the user asks the same question, or similar questions multiple times, you may want your bot to give a different response the second time. On repeat lets you set one or many responses to use the second time that response is triggered in the same conversation. You can also set 'No Repeat' to never repeat the response in the same conversation.
// Offer to escalate the issue if the user repeatedly asks for help. question: help response: How can I help you? on repeat: What is the issue that you are having? on repeat: Would you like me to have a support staff contact you? question: goodbye response: Before you go, would you like to take a survey? no repeat: question: goodbye response: Goodbye.
Conditions
Conditions let you enter Self code that must evaluate to true for the response to be used. This is an advanced properties as it requires you understand Self (a dialect of JavaScript), but can be used to do very powerful things.
// Response to goodbye differently based on the time of day. question: goodbye response: Goodnight. condition: Date.get(#hour, Date.time()) > 18 question: goodbye response: Goodbye.
Think
Think let you enter Self code that is executed when the response is used. This is an advanced properties as it requires you understand Self (a dialect of JavaScript), but can be used to do very powerful things.
// Track the user's name. pattern: my name is * template: Pleased to meet you {star}. think: speaker.name = star; question: what is my name template: Your name is {speaker.name}. question: can we change the subject response: Sure, what would you like to talk about? think: conversation.topic = null;
Confidence
You can enter multiple responses for the same question. The bot will use the response that it is the most confident in for the current conversational context. By default a response is given a confidence level of 90%, but you can customize the value. Note that in a group discussion such as when the bot is added to a chatroom, or on Twitter, the bot will only use responses that have >=90% confidence.
Sentiment
You can associate a user question or phrase, or individual words with sentiment (good vs bad). Sentiment can be used to track how the user is feeling about the current conversation. The sentiment statistic is tracked by your bot daily and can be graphed from its Analytics page.
question: thank you response: You are most welcome. keywords: thank sentiment: good question: you suck response: Sorry, I am doing my best. Would you like me have someone contact you via email? keywords: suck sentiment: bad word: suck sentiment: bad word: great sentiment: great
Next and Conversation Flows
Next questions in a response can be used to handle follow-up questions and conversation flows. To start a conversation flow, click on the parent response gear menu and click on the green plus to add a nested response. You can repeat this several times to define your complete conversation.
A respone's next question defines an isolated conversation space. The bot will only choose its next response from the provided responses. To define a default response use the #default as the question. If the bot cannot match the user's question with a next question, it will search the responses parent, otherwise use the bot's default response.
Next is similar to previous, but unlike previous is isolated to the response. In the context of a next response, the bot will never use any of its responses outside the context of the next response. This makes is easy to define isolated and nested conversations.
Greetings
A greeting is the bot's first response in a new conversation. You can add new greeting, or edit existing greeting. A greeting includes various meta data about the greeting.
Greeting Properties
Name | Description |
---|---|
Greeting | Edit the greeting. |
Condition | Optionally you can give a condition in self code that must evaluate to true for the response to be use. |
Think | Optionally you can give a 'think' code in self that is evaluated when the response is used. |
Command | Optionally you can give a JSON command (Self code) that is evaluated and returned to the client to support games and virtual assistance. |
Topic | Optionally you can give a topic to categorize the response under. |
Exclusive Topic | Optionally you can set an exclusive topic to a conversation so that only responses that have this topic will be used. |
Intent Label | Optionally you can give a intent label to reuse the response as. |
Emotions | You can associate an emotion with the greeting. |
Actions | You can associate an action with the greeting. |
Poses | You can associate a pose with the greeting. |
Next | Optionally you can give a next greeting to give a response a context. |
Save | Save the corrections to the phrases. |
Default Responses
If the bot does not find any good matching question to a user's input, it uses its default response. You can add new default response, or edit existing defalult response. Default response includes various meta data about the response.
Default Response Properties
Name | Description |
---|---|
Default Response | Edit the default response. |
Emotions | You can associate an emotion with the default response. |
Actions | You can associate an action with the default response. |
Poses | You can associate a pose with the default response. |
Condition | Optionally you can give a condition in self code that must evaluate to true for the response to be use. |
Think | Optionally you can give a 'think' code in self that is evaluated when the response is used. |
Command | Optionally you can give a JSON command (Self code) that is evaluated and returned to the client to support games and virtual assistance. |
Topic | Optionally you can give a topic to categorize the response under. |
Label | Optionally you can give a label to reuse the response as. |
On Repeat | Optionally you can give a response to used if the current response has already been used in this conversation. |
No Repeat | Require that the response or phrase only be used once. |
Previous | Optionally you can give a previous response to give a response a context. |
Require Previous | Require that the response only be used if the previous response matches one of the previous responses. |
Save | Save the corrections to the phrases. |
Phrases
You can add new phrase, or edit existing phrase. A phrase is just a sentence, it may or may not have a response. The phrase editor allows you to associate sentiment, emotions, action, poses, or a response to a phrase.
Phrase Properties
Name | Description |
---|---|
Question | Edit the question, if desired, you can use * wildcard to make a pattern. |
Sentiment | You can associate a sentiment with the phrase. |
Emotions | You can associate an emotion with the phrase. |
Actions | You can associate an action with the phrase. |
Poses | You can associate a pose with the phrase. |
New Response | Enter a new response for the phrase. |
Condition | Optionally you can give a condition in self code that must evaluate to true for the response to be use. |
Think | Optionally you can give a 'think' code in self that is evaluated when the response is used. |
Command | Optionally you can give a JSON command (Self code) that is evaluated and returned to the client to support games and virtual assistance. |
Topic | Optionally you can give a topic to categorize the response under. |
Intent Label | Optionally you can give a label to reuse the response as. |
Keywords | Optionally you can give keywords from the question that will influence a response match. |
Required | Optionally you can give required words from the question that will be required for a response match. |
Emotions | You can associate an emotion with the response. |
Actions | You can associate an action with the response. |
Poses | You can associate a pose with the response. |
On Repeat | Optionally you can give a response to used if the current response has already been used in this conversation. |
No Repeat | Require that the response or phrase only be used once. |
Next | Optionally you can give a next response to give a response a context. |
Previous | Optionally you can give a previous response to give a response a context. |
Require Previous | Require that the response only be used if the previous response matches one of the previous responses. |
Save | Save the corrections to the phrases. |
Words
You can add new words, or edit existing words. A word can include sentiment, emotions, and synonyms. A word can also be a keyword, a topic, or an exclusive topic.
Word Properties
Name | Description |
---|---|
Word | Edit the word. |
Sentiment | Optionally you can associate a sentiment with the word. |
Emotions | Optionally you can associate an emotion with the word. |
Keyword | Define the word to be a keyword. |
Synonyms | Optionally you can give a list of synonyms to the word, so that similar words in a question to trigger the same response. |
Topic | Define the word to be a topic. |
Exclusive Topic | Define the word to be an exclusive topic. |
Save | Save the corrections to the word. |
See Also
- How to train your customer service bot by monitoring its chat logs, using keywords and topics.
- What are the supported response and chat log formats for importing and exporting?
- What are topics?
- What are labels, and how to reuse responses?
- What are previous responses?
- What are required words?
- What are keywords?