How to implement handover to specific agent correctly_

Hello, please advice how to implement handover action with different “target agents” correctly? We want to implement handover, but also give the possibility to specify an agent to handover the conversation to. I think of two ways of doing this and don’t know, which is better. Let’s have 3 agents Adam, Bob and Chris for example.

Solution 1

I define one action_handover and use this in every story. Eg.

user: I want Chris to handle this
bot: performing action_handover

But this way I would need to pass some “argument” alongside the action to specify Chris as a target agent. Only thing I could come up with is using a slot, is there any other way?

Solution 2

I define 3 separate actions action_handover_adam, action_handover_bob and action_handover_chris and I use them in correct places in stories. Eg.

user: I want Chris to handle this
bot: performing action_handover_chris

This way action server has the information about a target agent in the action name directly.

Question is - which solution is better for prediction engine? Is it better to predict one action and change just an argument/slot? Or is it better to predict separate actions for each agent?

Hi @mbukovy, I would go with solution 1. You could define an entity called agent and use for example the RegexEntityExtractor to extract the agent name. If you have a slot with the same name it will automatically be filled. That should be easier to handle.

Hey @Tanja, thanks for your reply :slight_smile: Maybe I’ve made a wrong example. I need to specify the agent statically in training data, because it might be one specific agent, or group of agents etc… It’s not always possible to determine this from the user’s message and fill the slot during the conversation. So I would need to fill the slot in the training data directly. Is it still the better option?

Yes, I still think it is better to handle this via entities rather the intents.