Multiple slot variable is not working in domain.yml

Hey guys, i am new to rasa, started learning tutorial just wanted to discuss about the following issue. i.e., multiple variables in slot is not working in domain.yml It take only single slot variable, if i add another variable, both the variable stops working.

For example

This is not working

slots:
  name:
    type: text
  age:
    type: text

This is working

slots:
  name: 
    type: text

Any suggestion will be appreciated. Thanks!

Can you explain a bit how it is not working? I could try to help you, but I would need some debugging information. Can you show me for example what pops up in the terminal?

I have modified little rasa starter pack in its domain i have add intent: ‘age’, entity: age, and slot(as shown in question ), now when bot asks

Hey there! Tell me your name

I replied : My name is VIshal

Bot replied : Nice to you meet you None. How can I help?

It is saying None at place of Vishal .

It works fine and fetch information for the NAME

slots:
  name: 
    type: text

But doesn’t fetch information of NAME and AGE when there is two slots

slots:
  name:
    type: text
  age:
    type: text

I’m also facing the face error. While interactive training slot are properly getting filled but when I start actually running core server it is showing None. What is possible fix for this ?

How did you interact training slot. What is the command or what is the way to test?

`python -m rasa_core_sdk.endpoint --actions actions&

python -m rasa_core.train
interactive -o models/dialogue
-d domain.yml -c policy_config.yml
-s data/stories.md
–nlu models/current/nlu
–endpoints endpoints.yml`

interactive_learning

Thanks @Ajinkz, I have tried interactive learning, but it is not working there as well.

@Juste

Something this same thing happened with me.If we pass entity along with its value like [ajinkz](name) then it is likely to fill the slot. But anyhow real problem is it didn’t get filled while we run core server

Yes, m still trying to figure out the problem. Help me out if you find out the solution.

Hey @vishalincedo. Did you add NLU examples which would label age as an entity as well?

Yes i have added the examples

## intent:name
- My name is [Juste](name)  <!--- Square brackets contain the value of entity while the text in 
parentheses is a a label of the entity --> 
- People call me [Greg](name)
- It's [David](name)
- Usually people call me [Amy](name)
- You can call me [Sam](name)
- Please call me [Linda](name)
## intent:user_age
- My age is [23](age) <!--- Square brackets contain the value of entity while the text in 
parentheses is a a label of the entity -->
- Age is [87](age)
- Just [34](age) 

One more thing i have noticed is that sometimes some of the examples work some not.

For example In reply of

Hey there! Tell me your name.
My age is 20 (not works)

But

Just 20 (works)

@Juste why this is happpen and how to improve this?

I think you need more examples for that (if you really have only 3 example inputs). On top of that, I would suggest extracting numbers using duckling rather than NER - it’s a much simpler approach which will give good results quicker.

@Juste How many examples should be there in nlu,md to make robust? Currently, I’m having only 2 entities i.e name & email. Does using duckling will make it robust ?

That also depends on the number of intents you have. I would say, having around 20 examples per intent is a good starting point. Using duckling can make it easier to extract specific entities and require a bit less training examples for NLU. For example, you can extract emails with duckling which will get it right pretty much every time. However, you have to remember that duckling is not using NER to extract the details, but rather using a pattern matching.

1 Like

@Juste

( From duckling document). Please be aware that duckling tries to extract as many entity types as possible without providing a ranking. For example, if you specify both number and time as dimensions for the duckling component, the component will extract two entities: 10 as a number and in 10 minutes as a time from the text I will be there in 10 minutes . In this situation your application would have to decide which entity type is be the correct one. The extractor will always return 1.0 as a confidence, as it is a rule based system

Does that mean we need to do a lot of coding in actions.py to train our parameters for providing better ranking. Isn’t it long and time taken process, which makes developing a chatbot difficult. ?

1 Like