When it comes to voice-based virtual agents, a user could run into the situation that they did not understand the last output message of the AI. This could be the case when the last message contained a lot of information or simply was too long to understand it.
In order to avoid these situations or better-said issues, one can make use of the Repeat Last Intent Pattern. This small Flow snippet executes the last triggered intent in Cognigy.AI and therefore all related Flow nodes:
In general, this pattern consists of two different parts:
- The actual pattern and
- the rest of the Flow
The pattern, on the left side of the Flow, concentrates on checking if the current intent is Repeat and the last intent exists. So, if there was an intent triggered before, the AI says "Sure, I repeat myself." and uses a Think node to execute the last intents' nodes:
However, the left side of the Flow is only executed when the user triggers the mentioned Repeat intent, which is configured as the following:
Thus, such as displayed in the first figure, the user could write "Can you please repeat this?" to execute this pattern. The right side of the Flow just executes the rest of AI's logic while the only specification is the Add To Context node which stores the current intent as the last intent in the Cognigy context for temporary storage purposes:
Ultimately, one could use this pattern as shown in the example at the top of a Flow to provide repeating messages in the conversation.