Operating in multiple domains

Hi everyone! I’m working on building an assistant with Rasa 2.0.6 and was hoping to get some support on how to configure things to operate the bot in multiple domains.

The bot is a pretty simple appointment scheduler, that proposes dates/times to users and waits for their response. This is working well, but we also need the bot to be able to answer common questions. For example, a user asking how much a service costs.

The problem is that the answer to “how much does this cost?” depends on the vertical the bot is operating in. If we’re setting an appointment with someone for a solar installation appointment, it needs to reply back with how much the solar panels could cost; if we’re setting up an appointment for a life insurance quote, we need to give a different response; and so on.

My first thought is to create multiple bots, each with different story/domain files. However this makes maintenance on the bot’s core functions (i.e. appointment setting) very difficult.

The other thought would be to have one bot and train a few models on different domain files, but I’m not sure if there’s a good way to do this and still take advantage of Rasa X’s tools for CI/CD.

If anyone has any ideas please let me know! :slight_smile:

1 Like

you can define a form (Handling Business Logic, Forms) for every questionnaire you have, they can share questions, but you can handle answers differently

Thank you!

The “questionnaire” is actually the same for every vertical, as it stands – we’re simply asking for a user’s availability and/or proposing some times for them, and handling their response based on our office hours, etc.

The only real difference is the questions a user could ask us during this process, i.e. “how much does it cost.” The answer to this question will depend on which vertical we’re operating in for this specific user.

I was able to implement a system where my stories have intents like “cost_question OR credit_question OR other_question OR etc.”, and having this handled by a custom action that gets the actual intent, checks the vertical, and pulls a response based on these two factors.

Is this a good way to handle it?

Unfortunately, it’s very hard to say whether it is good or bad solution. If you think it works, I’d implement it this way, then share your bot and ask people to talk to it, then you can estimate how scalable your solution is