How Do I Detect Intents Through Custom Validation Action

Hello Rasa Community, I am currently working on a new bot that retrieves information based on keywords provided by the user. And I am looking to validate the bot’s response with the user, so conversation flow should be something like this:

  • User: I want some resources in mental health.
  • Bot: I found the following resource: How To Eat Healthy
  • Bot: Is that what you’re looking for?
  • User: No, I need something for mental health. <- So this would be intent: deny.

So for as long as the bot doesn’t return something the keywords indicated, I want to make the bot apologize and ask the user to search again. Is there anyway we could create a validation method that would loop the interactive for as long as the user intent during the confirmation phase is “deny”?

Thanks again for helping me out!