Get user input in custom action.py file or skip NLU Intent Recognition and get input of whatever the user types

I have a query regarding how to incorporate a feature in the bot I’m currently creating.

So far, the bot is essentially doing a good job of responding to broad inquiries from a certain domain. Now, I want to add a feature where the user may ask the bot to conduct a search based on the information they have provided.

The steps I intend to take are listed below for clarity:

  1. User search something to know about “I want to search.”
  2. Bot determines that it is intent WANT_TO_SEARCH
  3. Bot utters “What is your query text”
  4. User enters query text.
  5. Bot executes text similarity search between query text and corpus of documents.

I already have an action that searches for text similarities. My problem is how to get the user query text from step 4 , because if the user enters something, the bot is trying to classify its intent. I would also like to mention that the query text that user can enter is random and can’t be put in one intent. Basically, that’s the main point of this functionality. To provide at least some results for questions that are not covered in the main domain.

  1. Somehow to invoke action_listen inside my custom action and to get the user input there and proceed with my action.
  • I searched about this and as far as I know this is not possible in Rasa yet.
  1. To put 2 followup actions, firstly ‘action_listen’ and then my action that is doing text similarity search.
  • I tried this, but it is not functioning as I thought it would. It completely skips ‘action_listen’.

Create a form with a slot for the query text. You can see an example in the restaurant formbot with the preferences and feedback slots.

Thank you , it worked