Hi @spotlight2001,
You can try adding a few(5-10) names and quantities in the intents of “name” and “quantity”.
example:
name :
john
walter
adam…
quantity :
5
10
13…
Also, annotate the entity in the intent.
example: my name is [[walter]] ((name))
Here, will contain the name and () will contain the entity name, Assuming you already have slots for name and quantity
As you can see, “want leave on 31 december” is an intent and “31 december” is an entity.
arbitrary string like “My name is Walter” → but works for any value
You should give your NLU multiple examples on how to recognize “Walter” and similar words as an entity.
arbitrary text like "I want to order 10 pizzas → but should work for any value
I’d just recommend using duckling as it handles stuff like that quite fine (Numeral). You don’t want to see it as floats or text. You won’t be able to use a string version of 10 unless you parse it first. A float also seems weird, do you want 10.2452 pizza’s?
- My name is [Walter](name)
- My name is [Fritz](name)
- My name is [Franz](name)
- My name is [Hans](name)
domain.yml
utter_greet:
- text: "hi {name}, how are you?"
Actual:
Your input -> my name is Franz
hi Franz, how are you?
Your input -> my name is franz
hi Franz, how are you?
Your input -> my name is peter
hi Franz, how are you?
Your input -> my name is stefan
hi Franz, how are you?
Expect:
my name is Ali
hi Ali, how are you?
? I dont get it.
2nd try:
nlu.md
## intent:introduce
- My name is [Walter Fritz Franz Hans](name)
.
Your input -> my name is Walter
hi None, how are you?
Your input -> my name is Walter Fritz Franz Hans
hi Walter Fritz Franz Hans, how are you?
I’m not sure but I think there is a method to get the latest updated value of a slot. You can use that in the first method that you tried. But maybe you’ll need a custom action for this.