I am currently developing a bot, and I have a question about how to implement one functionality.
So far, basically, the bot is working alright answering general questions from a specific domain. Now, I want to add one functionality where the user asks the bot to do some kind of search based on his/her input.
To put it more clearly, here are the steps that I want to execute:
1. User asks "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 is doing text similarity search. 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.
Here’s what I have already thought of, but didn’t find a solution.
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. 2. 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'.
I would be very grateful if someone provides me an answer, or an opinion on how to solve this. If my question is not clear enough, I can try explaining it better the parts that are confusing you.
Thanks in advance