Overview
Knowledge files are mostly Athena Scripts, but the satisfaction engine also handle other type of knowledge.
Those files are using a special directive used by the engine to detect their type
Directives
A directive is a line of text at the top of the knowledge file, like this:
//!type=my_type
content of the file
If no directive is declared, the engine will assume it’s an Athena Knowledge file
settings
The settings knowledge file contains configuration values that will modify some of the engine behaviors.
The settings is based on a json format:
//!type=settings
{
"development":{
},
"production":{
}
}
There is two different sections: development and production. Each one will be used depending on the agent environement.
disamb
The disamb configuration gives you the opportunity to influence the system that triggers the disamb
//!type=settings
{
"development":{
"disamb":{
"minScore": 0.4,
"minDiffWithSecondTopScore" : 0.3
}
},
"production":{
}
}
- minScore : the minimum score an intent must reach to trigger the disamb. Does not influence the standard intent election threshold.
- minDiffWithSecondTopScore : the minimum difference between the top two score in order to trigger the disamb.
In that case, we need to have at least one intention with at least 40% confidence, and a second intention with at least 10% confidence.
nlu
You can configure the minimum threshold to trigger an intention using this configuration
//!type=settings
{
"development":{
"nlu": {
"intentionThreshold": 0.7
}
},
"production":{
}
}
In this case, a scenario defined with an intention will be triggered only if it’s intention score is above 0.7 The default value is 0.5
When using the chatbox from the Satisfaction.AI portal, you can actually see the scores when asking a question to the bot. Remind that the score you see is expressed using percentages, in the settings you needs to use the real value (ie: 90% is 0.9)
Two year digit rule regarding date extraction
There is a default behavior when extracting date from this format: dd/MM/YY
The agent as to assume if YY is part of 20th century, or 21st century.
The agent applies a known rule: set a threashold year that will be used to determine the century.
As an example, 2037 is the threashold year:
- A two digit year that fall before 37, the century will be 21st (14 septembre 26 = 14 septembre 2026)
- A two digit year that fall after 37, the century will be 20th (14 septembre 86 = 14 septembre 1986)
- A two digit year equals to 37, the century will be 21st
The default threashold year is: current date + 20, so 2019 becomes 2039.
You can define this two year date into the settings file:
//!type=settings
{
"development":{
"twoYearDigitRule": 2042
},
"production":{
}
}
timezone
You can define your agent timezone using the settings file. This will be used when extracting dates.
//!type=settings
{
"development":{
"timezone": "America/Los_Angeles"
},
"production":{
}
}
Available timezones are listed in this wikipedia page
Custom handlers
When using Satisfaction communication channels, the client and the agent can exchange custom messages.
For exemple, a chatbox on a website could send to the agent the webpage the user is currently looking at.
You can define in the settings file a custom message handler, that will trigger a specific label
//!type=settings
{
"development":{
"customHandlers":[
{
"customKey": "xbrain.event",
"label": "ON_XBRAIN_EVENT"
}
]
},
"production":{
}
}
Keep in mind that when triggering a label based on custom message, it will override the current scenario and start a new one (ie: the label triggered)
sip
Some configuration is dedicated to voice bots
Handling messages when the bot is speaking
When the text sent to client is synthetized, you can avoid messages from the user with this configuration:
//!type=settings
{
"development":{
"sip":{
"handleMessagesWhenTTS": true
}
},
"production":{
}
}
Call a label when a transfer has failed
When transferring users to another phone number, you can trigger a label if the transfer has failed
//!type=settings
{
"development":{
"sip":{
"transferFailedLabel": "LABEL_TO_CALL"
}
},
"production":{
}
}
Speech hints
You can send speech hints when using the Google ASR to help their model understand the user.
{
"development":{
"sip":{
"speechContext": [
{
"key": "names",
"values":[
"C3PO",
"Luke Skywalker",
"R2D2"
]
}
]
}
},
"production":{
}
}
Message behavior
You can define specific message behaviors in the settings file that are specific to a connector.
- connectorPattern: apply the configuration to a specific connector (regular expression)
- splitMessages: wether to send template continuation in a same message
- splitDelimiter: if messages are grouped, the delimiter used to concatenate messages
- concurrentMessagesBehavior: behavior to apply when concurrent messages arrive, three values allowed
- process: default behavior, message are processed even if a message is currently in process state
- drop: messages are dropped if a message is currently in process state
- queue: messages are queued, they will be processed after the current message is fully processed
//!type=settings
{
"development":{
"messageBehavior":[{
"splitMessages": false,
"splitDelimiter": " . ",
"concurrentMessagesBehavior": "process",
"connectorPattern": "^myConnector.*"
}]
},
"production":{
}
}
? HELLO
- hello
-& world
Using this configuration, you target sessions that are connected to the bot using myConnector. exemple with a session connected with myConnector: User: Hello Bot: hello . world exemple with a session connected with another connector: User: Hello Bot: hello Bot: world
Known connectors:
- ^allomedia.* will target allomedia connectors
Using xBrain sip communication, this setting is not required, messages will be joined using a specific delimiter.
Development knowledge
When a knowledge should not be used in production environment, you can use this directive:
//!type=knowledge_dev
? MY TEST
- test query