How do I handle the following case - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum
👋 Introducing the Rasa Playground
How do I handle the following case
post by en-ashay on Jan 12, 2021
If I want to answer the difference between two or more categories, what could be a good approach?
e.g.
- What is the difference between a car loan and a bike loan?
- What is the difference between a car loan and a House loan?
- What is the difference between a personal loan and a House loan?
All the questions are related to loans only. ( so can be used in one intent)
Also if I have some follow-up questions
Like Processing fee, interest rate. How can relate that it’s asking for the previously mentioned type of loan only?
post by siriusraja on Jan 13, 2021
Hi @en-ashay
You can have 1 intent named compare_loan and 1 entity named loan_type of type list to store the 2 loan types ( car & Bike).
Based on the extracted entities you can answer the differences.
With respect to answering the follow-up questions, you can always refer back to the loan_type slot to understand which one he is talking about. For this you need to write different stories.
post by en-ashay on Jan 13, 2021
HI @siriusraja, my main issue was the followup questions .i.e what is the interest rate , time, etc. How do I map the answer of different entity pairs?
Also what would happen if my user types "What is the diff between a car, home and bike loan"?
i.e. 3 entity or 1 instead of two
post by siriusraja on Jan 13, 2021
Hi @en-ashay
List slot will hold ‘n’ number of entities. So enumerate this slot to see how many values has been extracted and accordingly define your response in your custom action.
For the follow-up question in your scenario, you can respond back with interest rate & time information for those entity values in your list slot.