Configuration file setup
Before start working with the bot’s script, create a chatbot.yaml
configuration file and set the following parameters:
# Project name
name: guessNumber
# Main file
entryPoint:
- main.sc
# NLU parameters:
botEngine: v2 # Bot engine version
language: en # Bot language
nlp:
intentNoMatchThresholds:
phrases: 0.2
patterns: 0.2
# Slot filling interruption
injector:
slotfilling:
maxSlotRetries: 2
stopOnAnyIntent: false
stopOnAnyIntentThreshold: 0.2
In this tutorial, we’ll be using slot filling — process of requesting additional data. We’ll take a look at how this process works in the Script development section. Before we move to this section, we need to configure the parameters of slot filling interruption:
-
maxSlotRetries
— the number of retries for a single slot. If the client has answered the specified number of times and the slot hasn’t been filled slot filling will be interrupted. The last phrase of the client will be handled in the bot script.2
is the exact number of phrases we’ll be using in the Questions field while setting up slot filling. -
stopOnAnyIntent
— defines the interruption of slot filling by intent. IfstopOnAnyIntent: true
, then, in case the client tries to process another intent, slot filling will be interrupted. In our script, we won’t need to interrupt slot filling by another intent, so we’ll setstopOnAnyIntent
tofalse
. -
stopOnAnyIntentThreshold
is a matching parameter that specifies the minimum required similarity of the phrase to a certain class. IfstopOnAnyIntent: true
and an intent whichconfidence
parameter is greater thanstopOnAnyIntentThreshold
matches the client’s request, then slot filling will be interrupted by intent. While developing the JAICP NLU core, we’ve found the optimal value for this parameter to be0.2
.
Next, move on to working with the script.