Does slot value infuence the chat flow

Rasa Core version:0.12.0

Python version: py3, py3.5, py3.6

Operating system (windows, osx, …):windows 10 , ubuntu

Issue:

Content of domain file (if used & relevant):

name:
 type: text
services:
 type: categorical
 values:
   - transit
   - civic service
actions:
  - utter_ask_civic_service
  - utter_ask_transit_services
templates:
  - utter_ask_civic_service
     - text: Select civic service type
  - utter_ask_transit_services
     - text: Select the transit support.

in the link Slot Filling and Common Patterns — Rasa Core 0.9.8 documentation it is explained how well a slot value can influence next utterance, but in latest docs it is not mentioned .
i am using Categorical slot , and next utterance is regardless of slot value ,next utterance is randomized .

consider below two training snippets

 ## story 1
 * inform_service{"services":"transit"}
   - slot{"services":"transit"}
   - utter_ask_transit_services



## story 2
 * inform_service{"services":"civic service"}
   - slot{"services":"civic service"}
   - utter_ask_civic_service 

and now testing test 1:
i send

  /inform_service{"services":"civic service"}

5 times

predicted action is randomly

  1. utter_ask_civic_service
  2. utter_ask_transit_services

test 2:
i send

  /inform_service{"services":"transit"}

5 times

predicted action is randomly

  1. utter_ask_civic_service
  2. utter_ask_transit_services

but expected was only utter_ask_transit_services

is this a known issue , any workaround is there for this ?

Hi @manslogic, You should expect explicitly mentioned slots in stories to determine the next utterance. I’m not sure if it’s a copy-paste error, but your domain file looks odd. Training on the stories you posted using Core 0.12.0, I get for /inform_service{"services":"civic service"} the response utter_ask_civic_service in 100% of cases, and for /inform_service{"services":"transit"} I get utter_ask_transit_services in all cases. Here’s the domain file I used:

intents:
- greet
- inform_service

entities:
- name

slots:
  name:
    type: text
  services:
    type: categorical
    values:
    - transit
    - civic service

actions:
- utter_ask_civic_service
- utter_ask_transit_services

templates:
  utter_ask_civic_service:
  - "Select civic service type"
  utter_ask_transit_services:
  - "Select the transit support."

I trained using the following command: python -m rasa_core.train -s st.md -d d.yml -o models/dialogue -c config.yml -o ./test_model, where config.yml looks like this

policies:
  - name: KerasPolicy
    epochs: 200
    max_history: 5
  - name: FallbackPolicy
    fallback_action_name: 'action_default_fallback'
  - name: MemoizationPolicy
    max_history: 5
  - name: FormPolicy

Please let me know if that resolves it

1 Like

thanks a lot @ricwo. it was a copy paste error .

transit

transit was spelled wrong in my domain yml. and it is a categorical slot .
i failed to figure out this mistake .