Help with intent and entity extraction

Guys, I am going crazy here. I can’t figure out why this is happening. So I have a rasa bot which takes food items and quantities…

so if the user says “can i have two green salad”, my nlu is supposed to separate out the quantity and food item.

   - intent: order
  examples: |
    - [one]{"entity": "quantity", "value": "1"} [vegetable rice](food_item)
    - [1](quantity) [vegetable samosa](food_item)
    - [four]{"entity": "quantity", "value": "4"} [vegetarian momo](food_item)
    - [3](quantity) [vegetarian samosa](food_item)
    - [steamed basmati rice](food_item)
    - [tandoor platter](food_item)
    - [tandoori chicken](food_item)
    - [five]{"entity": "quantity", "value": "5"} [tandoori chicken](food_item)
    - [two]{"entity": "quantity", "value": "2"} [tandoori chicken half](food_item)
    - [tandoori chicken quarter](food_item)
    - [tandoori fish tikka](food_item)
    - i want [two]{"entity": "quantity", "value": "2"} [chicken curry](food_item)
    - do you have [four]{"entity": "quantity", "value": "4"} [tandoori mixed grill](food_item)
    - i will have [chicken dhaniya adhraki](food_item)

I also have my synonyms:

- synonym: '1'
  examples: |
    - one
- synonym: '4'
  examples: |
    - four
    - for
    - fore
    - fur
- synonym: '5'
  examples: |
    - five
- synonym: '2'
  examples: |
    - two
    - too
    - to
    - do

All well? Why is my dietclassifier going haywire? Look:


Need help o_0

PS: my responses are in the nlu file, so it says no response file

Hi @arkaprabha-majumdar :wave: this sounds like it could be a good use for the DucklingHTTPExtractor component in your pipeline. Duckling helps extract numbers, currency amounts, distances, times etc. that are in your user messages. Duckling will extract number entities regardless of whether they are strings or numeric values so that you don’t have to write synonyms for each one.

You can find details for add Duckling to your Rasa pipeline here:

but why are the intents classifying wrong? Because the intent is getting classified randomly, doing any other work on it only gives more errors. Say I said “I want to order” and then I say “please give me one green salad”, it can classify that as deny, payment, whatever with 0.5 - 0.6 confidence

also i tried fallback, but that gives this error. help?


  1. Can you please try giving one of the examples from the training data itself to check if it works?

  2. Make sure you have added “order” intent in domain file as well.

  3. I think the model is not trained with the “order” intent maybe. You can delete all the trained models and run “rasa train” to make sure your model is trained with the newest data.

If you have a limited number of menu items that you want to extract I would look into using a Lookup Table. Using a lookup for food_item can help simplify your NLU training data for your intent.

I would also make sure your training data is diverse to cover situations where a user places an order with and without specifying a food_item. From the training data you have provided all the examples have a food_item specified. Adding some training examples like “can I place an order” or “I want to place an order” can help the model generalize to instances where no food_item is provided.