This is a great step towards handling single-turn interactions separately. However, I have a few questions based on how I was using the traditional approach for single turn interactions along with rasa core and how using response retrieval models would change it.
Let me explain with an example, I have 4 intents and 1 entity of Car Model
intents:
- cost
- specification
- downPayment
- expectedDelivery
entity:
- carModel
slots:
carModel:
type: categorical
values:
- modelX
- cybertruck
actions:
- cost
- specification
- downPayment
- expectedDelivery
- cost_modelX
- specification_modelX
- downPayment_modelX
- expected_delivery_modelX
- cost_cybertruck
- specification_cybertruck
- downPayment_cybertruck
- expectedDelivery_cybertruck
obvious way of making this work is when both intent and entity is specified in the the utterance, for example, ‘what are the specs of cybertruck?’ or ‘when can i expect the delivery of Model X?’
But for a much better experience you cant force the user to mention a car model everytime such as this conversation
> What are the specs of Cybertruck?
> Whats the cost of Cybertruck?
> What about the down payment of Cybertruck?
> when can i expect delivery of Cybertruck?
instead you’d like the flow of conversation from user to be
> What are the specs of Cybertruck?
> How about the cost?
> What about the down payment?
> when can i expect its delivery?
So i want to use the slot set in the first utterance to influence the next predictions (to predict cost_cybertruck
without user mentioning it ), and when that same slot is not set (implying that user never mentioned an entity in previous turns) you provide generic response (thus, only predicts cost
action).
I was writing stories as following:
Generic cost response story
* cost
- cost
Generic specification response story
* specification
- specification
Generic downPayment response story
* downPayment
- downPayment
Generic expectedDelivery response story
* expectedDelivery
- expectedDelivery
Intent + Entity story (similar stories exist for all intent+entity combinations)
* downPayment{"carModel": "modelX"}
- slot{"carModel": "modelX"}
- downPayment_modelX
Story to remember slot and influence next turn predictions
* specification{"carModel": "cybertruck"}
- slot{"carModel": "cybertruck"}
- specification_cybertruck
* cost
- cost_cybertruck
* downPayment
- downPayment_cybertruck
* expectedDelivery
- expectedDelivery_cybertruck
So if I were to use response retrieval models, how would that affect the stories? Since all of the responses would be mapped to something like faq
. So how can I mimic the above behaviour with response retrieval models?