Dialog Engine ML vs State Machine

Hi All,

Currently i’m investigating on dialogue system in general. Basically from the lecturer of Staffan Larsson, I found that there’s a pro and cons using Rule based vs ML.

Rule based approach is easy to explain and can have traceability/observability. But easily to make branch hell with nested and complex real world scenario.

ML is simple but hard to get the data and labeling, also kinda difficult to debug?

Is there any suggestion on how to do this right? I’m trying to create our own dialogue engine in .net core. Because of contract needs.

How rasa core approach this kind of issues?

Any thought on this one?

Cheers

Hi @welly87! Obviously a super interesting topic. At a high level, I think you should use rules to deal with the things you can expect, and have ML available to take over whenever you are in unknown territory. Hence Rasa has support for both rule-based and ML-based dialogue policies.

So, if you have some business logic to implement (e.g. you need to fill some slots), that is something you know up front. You can implement it in Rasa in a form, it would be silly to learn that behaviour from data since you already know it.

ML is there to handle all the unexepcted cases, where users don’t follow the happy path. For example you can read this paper about the TED policy [1910.00486] Dialogue Transformers , also a cool video about it.

As mentioned in another thread, where things really get interesting is when we stop relying on intents for every message, and isntead of having separate steps for NLU and Dialogue management, we can contextually interpret a message and go straight to the next step.

1 Like

Thanks a lot. Make a lot of sense… Will read the paper.

Great video… I learn a lot from your youtube channels. It’s easy to understand for developers

Rock on!

Hi @amn41,

I can’t find how to use rule-based like finite state machine here?

Is that mean i need to create custom component and inject that into the pipeline?

Cheers

hi welly! a bunch of those policies are rule-based, but none of them are a finite state machine ( the closest thing is probably a Form ). But I would suggest checking out the thread about Rasa Open Source 2.0, we are consolidating and simplifying the rule system a lot.

thanks a lot for your reply.

i do really impress with all the source and knowledge from rasa docs and youtube videos. i’ve learned a lot.

And also like your pragmatics style of seeing things, i thought PhD always love a ‘perfect’ world. you and rasa team prove that’s not the case

:slight_smile: