Problem with Slot and Entity extraction , require Pipeline and need Working Example

I have implemented slot and entity as it mentionn in rasa official repository

Also added lookup table of entity used in intent But slot stuck with same result all time for Example

nlu.md

          ## intent:location_ask
             -What is your address in [california](location)?
             -Do you know my address in [brazil](location)? 
  
           ## lookup:california
               - california
               - brazil
               - china
               - NYC
               - Florida
            ## synonym:california
               - california
               - brazil
               - china
               - NYC
               - Florida

stories.md

  path 1
  * location_ask{"location":"california"}
    -action_location

Domain.yml

  intents : 
  - location_ask
  entities:
  -location
  -california 
  
  slots:
  -location:
    type:text
  
  actions:
  - action_location

action.py

  from typing import Any, Text, Dict, List,Optional,Iterator
  
  from rasa_sdk import Action, Tracker
  from rasa_core.events import SlotSet
  from rasa_sdk.executor import CollectingDispatcher
  
  
  class Location(Action):
  
      def name(self) -  Text:
          return "action_location"
  
  
      def run(self, dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any]) -  List[Dict[Text, Any]]:
           #locationEntity=next(tracker.get_latest_entity_values("location"), None)
              address=tracker.get_slot("location")
              dispatcher.utter_message(str(address))
              return []

What error I am getting? If send

Case 1

user : What is your address in california
Bot response: california user : What is your address in brazil Bot response : brazil user : what is your address in china
Bot respnse : brazil user : what is your address in china
Bot respnse : brazil

user : what is your address in california
Bot respnse : california
user : what is your address in china
Bot respnse : california

Case 2 Restart rasa shell

user : What is your address in china
Bot response: None

what i am expecting (with entity extraction as well as slot)

user : what is your location in china
bot response: china
user : what is your location in florida
bot response: florida

I want to know proper solution for entity extraction and slot if any example repo is there please let me know What should i mention on pipeline and policy please update Also mention rasa proper version to run this @Juste @juste_petr

@abhishek1 A couple of things I noticed:

(1) Why do you have two entities? E.g. location and california? Shouldn’t california be a value of the entity location? If that is correct, you should remove carlifornia from the list of entities in your domain file.

(2) Your example data for loccation_ask looks good. However, you are not using the sections synonym and lookup correctly. After the keyword location you should name the entity, e.g. location (assuming that california is not an entity type). The list of locations itself looks good. Regarding synonyms: You should only list synonyms of a specific value. Please, take a look at Training Data Format. In the example in our documentation we list synonyms for New York City. E.g. you want to list names that refer to the same location, but you listed all kind of different locations, that should all be mapped to california. The list for synonyms for california, might look like this

## synonym:california
- california
- CA

(3) How does your config.yml look like? What pipeline are you using? You should either use the supervised_embeddings or the pretrained_embeddings_spacy pipeline.

(4) It might be possible to simplify your story:

  ## path 1
  * location_ask
    - action_location

Does that help?

My config.yml

# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en
pipeline: supervised_embeddings

# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
  - name: MemoizationPolicy
  - name: KerasPolicy
  - name: MappingPolicy

Can you share me any working repository for such problem ?

You can take a look at our documentation bot Sara: GitHub - RasaHQ/rasa-demo: Sara - the Rasa Demo Bot: An example of a contextual AI assistant built with the open source Rasa Stack We got some lookup tables and synonyms over there. Hope it helps.

EntitySynonymMapper is missing in your nlu pipeline. Include it and check again.