In most conversations, any kind of information needs to be collected. There, it does not matter if the user talks to a real human or an artificial intelligence. However, when one listens to a human dialog, it may be noticed that questions are answered in a variety of ways -- for example answers can be changed. In order to provide such a dynamic, open, and human-like dialog structure, Cognigy introduced Slot Fillers.
Questions can be combined with Slot Fillers to create a so-called "Missing Pattern". This mechanism keeps asking the user for the missing information in a very natural way until all questions have been answered.
In the end, the user can choose between two different ways of answering the questions:
Answer questions in one sentence:
Answer questions in multiple sentences:
In order to provide a human-like experience, the user can change any of the asked values at any time:
In general, three Cognigy features are needed to get the Missing Pattern running:
- Question Node
- Slot Filler
- Lexicon (optional)
The question node is used to ask for a specific value, while this could be a date, number, slot, et cetera. The slot filler then checks if the missing value is already filled, thus answered. Finally, a lexicon can be used to use custom domain-specific slots such as cities or product names.
The question node needs to ask the right question and store the result into the context so that the slot filler can check if it is provided already:
The interesting part in this configuration is the Skip if Answer exists in Context toggle. Because of that, the question will not be asked if this number if already stored in the context.
Now, the slot filler needs to check if the number of travelling people is given or not:
- In the Flow, navigate to NLU and then to Slot Fillers
Since asking for general information may not be enough, one can add a lexicon to the agent and expose this database to the missing pattern.
Create a Lexicon
In your agent, navigate to Build -> Lexicon and create a new one. This could look like the following:
All included keyphrases will be possible answers for the user. The slot is required to ask a so-called slot question.
Attach the Lexicon
However, before the lexicon can be used, it needs to be attached to the related Flow -- in this case, the missing pattern one:
Custom Slot Filler
In contrast to the general, built-in, slots such as NUMBER of DATE, one needs create a custom slot filler in order to use the new slots and keyphrases:
The Final Flow
After configuring all necessary slots and lexicons, the final Flow for this example looks like this: