Let’s say I have an application that has a database of products, and the user may do operations on them (for instance, set the price). I want to let the user do these operations using a Rasa Chatbot.
What I’m trying to do, is have training scenarios with the following structure:
# domain.yml
entities:
- name
slots:
name:
type: text
mappings:
- type: from_entity
entity: name
#nlu.yml
- intent: set_price
examples: |
- set price of product [IPhone X](name)
The problem here is that the name of the product is completely arbitrary. The user creates the product, so the name can be anything. Is it possible to still train Rasa in order to extract the product name? I’m not sure if using spaCy extractors like for Person names or locations works here because the names are random…
Right now, the solution I’m using is having the name slot with mapping from_text, therefore the dialog flow would be:
user: Set price of product
bot: what is the product?
user: IPhone
This works, but it would be ideal to do this in one sentence…