I ask a question/help request regarding how to set-up a mixed-initiative chatbot in RASA
For mixed-initiative conversational bot, I mean a chat-bot thatallows both
User-initiative: The bot simply reply to user requests(I also call this: pull-mode).
Bot-initiative: the bot is "proactive", initiating new unsolicited conversation/topic with the user (I call this: push-mode). The bot "pushes" could be something like a question to user or a user-feedback request getting some information:
- Related to the previous conversational flow (so "dynamic" and dependent from the context of current dialog),
- And/or part of a "scripted" sequence of pre-fixed step-by-step bot-utterances (stimulus/question to user). In that sense I guess that a solution could be a "static" flow-path made by some sort of RASA rules/forms combination (see later).
Gambits: the ChatScript bot-initiative approach
The bot-initiative static steps are one of tools to design a conversation in ChatScript old good chatbot scripting language/engine. These are called gambits. Are the story the chatbot wants to tell on a subject or the conversation the chatbot is trying to steer the user into. See definition/explanation here.
Here below a ChatScript code example where the bot start a conversation about the school topic:
topic: ~school [school university learn]
t: Where do you go to school?
a: (Rochester) That's a great school.
t: I go to Harvard.
t: What is your major?
t: I am studying finance.
At run-time (<
is the bot, >
is the user):
< Where do you go to school?
> At liceo Leonardo Da Vinci in Genova,
< I go to Harvard.
> Wow! Super!
< What is your major?
> Electronic engineering...
< I am studying finance.
How to implement ChatScript gambits in RASA?
how can I realize such a bot-driven conversation in RASA? I'm a bit confused about the how-to. Ok, a RASA rule could trigger the first utterance and afterward I could design the flow with stories examples? Or with a RASA form?
I'd like to realize a mixed-initiative scenario where:
- Every time any user can ask the bot for faqs/news etc. (pull mode)
- the (expert) patient is able to communicate himself his status (pull mode)
- But also the bot need to collect some mentioned info (filling slots like, for example in a patient monitoring healthcare app, the medical-relevant parameters, explicitly asking question to user (push mode).
I'm confused regarding how to implement this in RASA. How to code an info collection dialog without a strict / boring sequence of slots mangling in a RASA form?
Maybe a crontab (external) event, following suggestion here https://rasa.com/docs/rasa/reaching-out-to-user could be used to inject a scheduled intent that trigger the conversational session, using a RASA rule. So far so good.
What is not clear to me is how to manage the "slot-filling"-like data collection in a natural conversation way that possibly allow a mixed initiative where the user spontaneously give to the user some data, or the bot ask data to user, if (some) session data are missing.
I know I can roughly realize all this with a RASA form but I believe this solution is limiting because inside a form the sequence of questions (to collect slots) is fixed. Maybe i'd prefer to have a more natural mixed-initiative turn-taking where the user could interact with the bot asking stuff and with digressions, but the bot would collect data explicitly asking in case.
Any suggestion/help about how to do all this in RASA?
Thanks!
Giorgio