Help Needed: Slots Not Being Filled and Custom Action Verification

Hello Rasa Community,

I’m currently working on a project using Rasa and facing an issue where my slots are not being filled as expected. I’m not sure what I’m missing or doing wrong, and I would really appreciate any insights or suggestions from the community.

Issue Description:

My slots, defined in the domain.yml file, are not getting filled after user inputs. I’ve defined entities and slots with the same names and provided training data in nlu.yml, but during conversations, the slots remain null.

Custom Action Concern:

I’ve also written a custom action (actions.py) for querying a database based on the slot values. However, since the slots aren’t being filled, the action isn’t performing as intended. I’m not sure if my custom action is correctly set up to use slot values.

Code Snippets:

  1. Slot Definition in domain.yml:

yamlCopy code

slots:
  data_type:
    type: text
    influence_conversation: false
    mappings:
    - type: from_entity
      entity: data_type
  date_range:
    type: text
    influence_conversation: false
    mappings:
    - type: from_entity
      entity: date_range
  1. Sample Intent and Entities in nlu.yml:

yamlCopy code

- intent: query_sales_data
  examples: |
    - Show me [DATA](data_type) sorted by [TIMESTAMP](date_range)
    ...
  1. Custom Action in actions.py:

pythonCopy code

class ActionQueryDatabase(Action):
    def name(self):
        return "action_query_database"

    def run(self, dispatcher, tracker, domain):
        data_type = tracker.get_slot('data_type')
        date_range = tracker.get_slot('date_range')
        # Query logic based on slots
        ...

I’m not sure if there’s an issue with the way I’ve defined slots, entities, or the custom action. Any advice on troubleshooting this or best practices for using slots in custom actions would be greatly appreciated.

Thank you in advance for your help!

Are you using duckling for the date range?

You should review the --debug log to see if the entity is extracted as you expect.