I am extremely new to rasa.Just gained level of knowledge that allows me to begin my first scale ecommerce chatbot.I want to know if i can do something with my entities which which be ultimately dynamic.
User:I want to know about (iphone 14){product_name}.
here i want my iphone 14 to ultimately comming from my database in realtime so can i do this?
You can train data to recognize the intent I want to know about.... From my knowledge (which is not a lot as I’m also learning) you would need to implement an action to figure out your entity.
You can, for example try to get some terms from the user text and query your database for best matches and prompt the user (I’m sorry, not versed in iPhone models :D):
User> I want to know about the iphone 14
Bot> Do you want to know about:
- Latest iPhone 14 XPRO
- iPhone 14 with XYZ
- ...
User> Latest iPhone 14 XPRO
Bot> Ok, here is the info on iPhone 14 XPRO
...
Fetch the information again, and set the slot (in other custom action)
There is also the knowledge bases which could also be used here for the same approach. I haven’t used these, but read about and seems interesting and might be a good match for you.
If you want any of your training data to be pulled from a database (or other source that is not in the Rasa yaml format), you can write a custom importer which is discussed here.
You could also consider using something like jinja2 templates and dynamically create your nlu yaml files with the entity list from your db.