Is creating a custom action for retrieval intents possible?

Hi

My use case has around 220 sub-intents. It is primarily in FAQ format. There are other intents as well which are used to continue the story/give a humane feel to the person on the other side. I wish to fetch the responses for the sub-intents from a CSV or DB.

However, Rasa automatically creates utter_faq response and even if I try to define it as a custom action, it is shows me that utter_faq response is not defined and doesn’t detect it in the action.py file. I would rather have a single response action and fetch items from DB than put in 220 individual responses in the domain/nlu file.

Is there a way to define a custom action for retrieval intents?

1 Like

Hi @Snorlaxcode did you find an answer? I’d like to do the same thing

Hi. I was unable to find a solution for this. But I will raise a feature request on git. Please comment on it that its a requirement for you too.

1 Like

Please comment on the issue for possible implementation in future version.

Will do. Thanks

@Snorlaxcode did you find any workaround?

I have a similar use case:

Intention: FAQ/abc
Action: action_faq
 -> read file/db
 -> get answer
 -> dispatcher.utter_message(text = ...)

I am thinking of using normal intents.

But what annoys me is that there are hundreds of rules…

Same here. I used regular intents for all and included 220 responses in the domain file. There are a lot of bugs in the retrieval intent system and honestly, it hasn’t been designed keeping scalability in mind. I would suggest using regular intents.