This article explains how to test multi-turn logic in chatbot interactions using specific asserters.
To test multi-turn logic, such as booking a flight with multiple inputs (e.g., "I want to book a flight," "Where from?" "Where to?"), the following asserters can be used:
INTENT
- Arguments: Intent name to look out for.
-
Usage: Used in the
#bot
section. - Function: Asserts that the bot responded with the specified intent.
INTENT_CONFIDENCE
- Arguments: Minimum accepted confidence, like “70” for 70%.
-
Usage: Used in the
#bot
section. - Function: Asserts that the bot responded with at least the specified minimal confidence.
INTENT_UNIQUE
- Arguments: None.
-
Usage: Used in the
#bot
section. - Function: Asserts that the recognized intent is unique (not an alternate intent with the same confidence).
ENTITIES
- Arguments: Expected entities like “from|to,” or minimal entities like “from|…”.
-
Usage: Used in the
#bot
section. - Function: Asserts that the bot responded with the specified entities.
ENTITY_VALUES
- Arguments: Expected entity values like “2018|2019,” or minimal entity values like “2018|…”.
-
Usage: Used in the
#bot
section. - Function: Asserts that the bot responded with the specified entity values.
ENTITY_CONTENT
-
Arguments: Entity and expected values like
location|Budapest|Vienna
. -
Usage: Used in the
#bot
section. -
Function: Asserts that the bot responded with the specified entity
content. Each
ENTITY_CONTENT
asserter checks only one entity, so use more asserters to check multiple entities.Note: The response does not fail if it contains more values than specified in the arguments.