Home / DialogFlow ES / Exporting your Dialogflow agent to RASA NLU
Bot Frameworks | DialogFlow ES

Exporting your Dialogflow agent to RASA NLU

Recently I had a coaching call with a client where I explained to him why RASA was a poor choice for substituting a Dialogflow bot he was trying to build. I had taken a quick look at RASA a few months back, so I had some idea what you could and couldn’t do in it.

After I went and took a closer look, I realized that I was actually overestimating RASA’s capabilities.

As it stands now, you will probably want to avoid migrating your Dialogflow agent to RASA because it will not work as well, especially if you used ideas from my site to create a bunch of conversational turns.

Why, you ask?

Dialogflow has the notion of an explicit context…

Explicit contexts are those you specify and associate with an existing intent (preferably via a UI)

…which guards intents

Unless the input context is active, an intent cannot fire. This leads to a lot of interesting properties.

…and narrows down the list of candidate intents

This means, if most of your intents have input contexts, your list of candidate intents will be quite narrow, which in turn will improve intent mapping

…and has a lifespan

With a lifespan attached to a context, you can have contexts expiring and appearing (becoming active) in very specific ways. This means you can move the conversation to the next intent quite easily

…and has an associated fallback

And if the user doesn’t quite provide the input you expected, you can handle this scenario. You can even decide how exactly you will handle it.

What the above set of conditions mean is that you have very fine grained control over the conversation flow, even allowing for all the ways the user can go off track.

In contrast, since RASA doesn’t provide you explicit contexts, you will be performing all the above on your own (i.e. you will be reinventing the Dialogflow wheel inside your RASA bot).

But I still want to do it!

OK, if you still want to do it, it is best you follow the general advice I provide in my material even as you build your Dialogflow agent

  • do not use slot filling [1]
  • do not use follow up intents [2]
  • always set the context lifespan to 1 [3]
  • do not use wildcard entities without a lot of consideration, and definitely don’t use them in intents which don’t have an input context [4]
  • avoid using composite entities [5] – although I don’t think I will suggest this to someone who doesn’t want to export their agent to RASA. I think composite entities are very powerful tools for Dialogflow agents
  • understand candidate intents thoroughly

Why? Because you will end up with a linear set of intents rather than the hierarchy of follow-up intents or the self-loop of slot filling, and you will see that it will be a lot easier to map your Dialogflow agent to the flat hierarchy of RASA intents.

By the way, even with all this in place, you might still find that RASA doesn’t give you all the functionality you need, because I don’t think it is actually possible to fully export a Dialogflow conversation to the story format provided by RASA.

Feedback?

Are you a RASA NLU expert? Do you disagree with my views? I would love to hear your thoughts in the comments.

On the other hand, if you are a Dialogflow user who is trying to export your agent to RASA, I would love to hear from you too on how it went once you are done.

Are you interested in a course on migrating Dialogflow to RASA NLU?

Migrating your Dialogflow agent to RASA NLU is the subject of an entire course, in my opinion. So if at least 10 people comment that they are interested in such a course, I will be happy to create one.

References

[1] Required parameters are hard to map

[2] Followup intents are hard to map

[3] I have written about this extensively on this site, for example here

[4] They are not well supported in RASA

[5] No support for composite entities in RASA

Free: Dialogflow ES Crash course for non-programmers

I recently changed the name of my website from Mining Business Data to BotFlo. To help spread the word, and to hopefully get people to bookmark my website, I am making a set of my training courses free for a few weeks. 

Learn more
"The magic key I needed as a non-programmer"

The custom payload generator was the magic key I needed (as a non-programmer) to build a good demo with rich responses in DialogFlow Messenger. I've only used it for 30 minutes and am thrilled. I've spent hours trying to figure out some of the intricacies of DialogFlow on my own. Over and over, I kept coming back to Aravind's tutorials available on-line. I trust the other functionalities I learn to use in the app will save me additional time and heartburn.

- Kathleen R
Cofounder, gathrHealth

Similar Posts

2 Comments

  1. Sir i have created chatbot(Taking users data) with contexts and webhook using dialogflow. so now i want to migrate my dialogflow to rasa . How to do it ? .It is easy or difficult to do migration as i want to ask user input