- lookup: food
examples: |
- italian pancake
- pizza
- doughy stuff
- tomato sauce
- lookup: furniture
examples: |
- something to sit on
- butsupporter
- stool
- intent: order_pizza
examples: |
- I would like a [pizza](food)
- I am hungry for a [pizza](food)
- can i get a [italian pancake](food)
- please give me a [italian pancake](food)
- intent: order_furniture
examples: |
- I would like a [chair](furniture)
- I am hungry for a [chair](furniture)
- can i get a [stool](furniture)
- please give me a [stool](furniture)
Although entities from the lookup table are recognized, the model doesn’t seem to use the entities/lookuptable to classify the intents when using values not listed in the intent examples.
for example: “can I get a butsupporter” recognizes butsupporter as entity furniture but it’s kinda random to which intent this gets classified. Whats going on?
Thanks for your answer, It still didn’t work as I would expect after adding extra examples. I would like a cheese platter still gets classified as order_furniture
version: "3.1"
nlu:
- intent: greet
examples: |
- hey
- hello
- hi
- hello there
- good morning
- good evening
- moin
- hey there
- let's go
- hey dude
- goodmorning
- goodevening
- good afternoon
- intent: goodbye
examples: |
- cu
- good by
- cee you later
- good night
- bye
- goodbye
- have a nice day
- see you around
- bye bye
- see you later
- intent: affirm
examples: |
- yes
- y
- indeed
- of course
- that sounds good
- correct
- intent: deny
examples: |
- no
- n
- never
- I don't think so
- don't like that
- no way
- not really
- intent: mood_great
examples: |
- perfect
- great
- amazing
- feeling like a king
- wonderful
- I am feeling very good
- I am great
- I am amazing
- I am going to save the world
- super stoked
- extremely good
- so so perfect
- so good
- so perfect
- intent: mood_unhappy
examples: |
- my day was horrible
- I am sad
- I don't feel very well
- I am disappointed
- super sad
- I'm so sad
- sad
- very sad
- unhappy
- not good
- not very good
- extremly sad
- so saad
- so sad
- intent: bot_challenge
examples: |
- are you a bot?
- are you a human?
- am I talking to a bot?
- am I talking to a human?
- intent: order_pizza
examples: |
- I would like a [pizza](food)
- I would like a [pizza](food)
- I am hungry for a [pizza](food)
- can i get a [italian pancake](food)
- please give me a [italian pancake](food)
- i would like some [italian pancake](food)
- can you provide me with [doughy stuff](food)
- please give me a lot of [doughy stuff](food)
- i really need [doughy stuff](food)
- I wish to have [pizza](food)
- please entertain me with [pizza](food)
- i wont some of your [pizza](food)
- if you dont give me some [pizza](food)
- if you wont give me some [pizza](food)
- isnt it nice to have [pizza](food)
- provide me with please [pizza](food)
- i would like to get some [pizza](food)
- a [pizza](food) would be nice
- some [pizza](food) for me would be great
- i'm really missing some [pizza](food)
- intent: order_furniture
examples: |
- I would like a [chair](furniture)
- I would like a [chair](furniture)
- I am hungry for a [chair](furniture)
- can i get a [chair](furniture)
- please give me a [buttsupporter](furniture)
- i would like some [buttsupporter](furniture)
- can you provide me with [kruk](furniture)
- please give me a lot of [kruk](furniture)
- i really need [buttsupporter](furniture)
- I wish to have [chair](furniture)
- please entertain me with [chair](furniture)
- i wont some of your [chair](furniture)
- if you dont give me some [chair](furniture)
- if you wont give me some [chair](furniture)
- isnt it nice to have [chair](furniture)
- provide me with please [chair](furniture)
- i would like to get some [chair](furniture)
- a [chair](furniture) would be nice
- some [chair](furniture) for me would be great
- i'm really missing some [chair](furniture)
Sorry, ignore my prior message. These two intents are the same except for the entity type. You should combine the intents into a single order intent and use a single entity, item.
- rule: order
steps:
- intent: order
- action: utter_order
Thanks again, I know this would be the way for the use case I’m showing. But, I made this to see the influence of the Regexfeaturizer and the lookup tables. The model doesn’t seem to attribute a lot of weight to these features when training. This is why I would like to get a deeper understanding. In the example I gave everything is the same except for the entities. Therefore I would expect the model to classify the intents correctly by using the lookup tables. However, it only does this for some.
When using lookup tables with RegexFeaturizer , provide enough examples for the intent or entity you want to match so that the model can learn to use the generated regular expression as a feature. When using lookup tables with RegexEntityExtractor , provide at least two annotated examples of the entity so that the NLU model can register it as an entity at training time.
While it’s not explicitly stated here, I don’t think Rasa is generating additional utterance examples for all of your lookup table entries as you might expect. I haven’t looked at the source code for lookup tables, but based on these docs, it’s probably only using a RegEx for model.
Thanks, it looks like this is the case to me as well… Was just hoping for a different outcome. I don’t really see the use for lookup tables if they don’t work the way I thought they would work. Sure, they could improve intent qualification but you still have to use the different values in the intent examples.