Issue with Rasa Chatbot: Story Blocked at "provide_employee_id" Action does not continue

I am encountering an issue with my Rasa chatbot where the conversation flow gets blocked at the “provide_employee_id” action in the stories “User Chooses Efficiency Calculation day,” “User Chooses Efficiency Calculation - Month,” and “User Chooses Efficiency Calculation - week.” The conversation does not continue to the next utterance as expected.

Here is an overview of the relevant components in my project:

Stories: I have defined stories for different user interactions, including scenarios where the bot needs to gather an employee ID from the user. Actions: I have an “action_get_employee_id” action that queries a database to retrieve the employee ID and returns it as a slot. Domain: I have defined slots, intents, and actions in my domain file. Pipeline: I’m using a pipeline configuration with different NLU and Core components. I have thoroughly reviewed my code, including the action implementation, database query, and slot mappings. However, the issue persists, and the bot gets stuck at the “provide_employee_id” action.

I have also tried using the interactive learning feature to debug the issue but haven’t been able to identify the root cause.

Could someone please help me troubleshoot this issue? Any insights, suggestions, or debugging tips would be greatly appreciated. I’m happy to provide more code snippets, configuration details, or logs if needed.

Thank you in advance for your assistance!

stories.yml version: “3.1”

version: "3.1"




stories:
  

  - story: efficiency calculation 
    steps:
      - intent : efficiency 
      - action : utter_calculation_efficiency
  

  - story : efficiency choice 
    steps :
     - intent : efficiency_per 
     - action : get_efficiency_choice
  


  - story: User Chooses Efficiency Calculation day 
    steps:  
      - intent : efficiency_per_day1
      - action : utter_efficiency_per_day
      - action : utter_request_id_employee
      - intent : provide_employee_id
      - action : action_get_employee_id 
      - action : utter_ask_date
      - intent : provide_specific_date
      - action : action_get_specific_date 
      - action : get_efficiency
    

  - story: User Chooses Efficiency Calculation - Month
    steps:
      - intent : efficiency_per_month1 
      - action : utter_efficiency_per_month  
      - action : utter_request_id_employee
      - intent : provide_employee_id 
      - action : action_get_employee_id
      - action : utter_get_start_date 
      - intent : provide_start_date
      - action : action_get_start_date
      - action : utter_get_end_date
      - intent : provide_end_date
      - action : action_get_end_date
      - action: get_efficiency
      

  - story: User Chooses Efficiency Calculation - week
    steps:
      - intent: efficiency_per_week1
      - action : utter_efficiency_per_week
      - action : utter_request_id_employee
      - intent : provide_employee_id 
      - action : action_get_employee_id
      - action : utter_get_start_date 
      - intent : provide_start_date 
      - action : action_get_start_date
      - action : utter_get_end_date
      - intent : provide_end_date
      - action : action_get_end_date
      - action: get_efficiency
     


  - story: User Chooses Error Calculation
    steps:
      - intent : errors 
      - action: get_errors
      

  - story : toutes les features 
    steps : 
      - intent : present_the_features 
      - action : utter_info 

  

domain.yml

version: "3.1"

intents:
  - salutation
  - greet
  - present_the_features
  - goodbye
  - confirmation 
  - nothing
  - deny
  - thank
  - provide_employee_id
  - provide_specific_date  
  - out_of_scope
  #- calculation_error  
  - provide_start_date 
  - provide_end_date 
  - efficiency 
  - errors 
  - efficiency_per
  - efficiency_per_day1
  - efficiency_per_week1
  - efficiency_per_month1

  


entities:
  - time_frame 
  - error 
  - efficiency 
  - employee_id
  - start_date
  - end_date
  - specific_date 




slots :
  time_frame : 
    type: categorical 
    values : 
      - month 
      - week 
      - day 
    mappings: 
    - type : custom
      entity : get_efficiency_choice 
  employee_id :
    type: text  
    mappings:
    - type : custom
      action : action_get_employee_id
  specific_date : 
    type : text 
    mappings : 
     - type : custom
       action : action_get_specific_date  
  errors:
    type : text 
    mappings : 
     - type : custom
       action :  get_errors
  efficiency :
    type : text 
    mappings : 
     - type : custom
       action :  get_efficiency
    
    

  
  end_date : 
    type : text 
    mappings: 
    - type: custom 
      action : action_get_end_date

  start_date : 
    type : text 
    mappings: 
    - type: custom 
      action : action_get_start_date



      


      

responses:
  utter_greeting:
  - text : "Hello and welcome to kaschke! I am your virtual assistant."
  utter_salutation:
  - text : "Hello! how can I help you ? "
  utter_info :
  - text : > 
     I am delighted to be able to help you and accompany you through the different options available:    
    buttons : 
    - title : "efficiency"
      payload : '/efficiency'
    - title : " errors "
      payload : '/errors'
  utter_calculation_efficiency: 
  - text: >  
     the calculation of efficiency per: 
    buttons : 
    - title : "month"
      payload : '/efficiency_per_month1'
    - title : "week"
      payload : '/efficiency_per_week1'
    - title : "day"
      payload : '/efficiency_per_day1'
  utter_goodbye:
  - text: "Bye"
  utter_thank:
  - text : "You’re welcome! Do you have any other questions?"
  utter_confirmation: 
  - text: "All right, how can I help you now?"
  utter_help: 
  - text: "Okay, feel free to ask me more questions if you need further clarification or information!"
  utter_nothing:
  - text: "Perfect!"
  utter_request_id_employee:
  - text : "Could you give me an employee ID so I can send you the employee’s efficiency?"
  utter_ask_date : 
  - text : "Correct."
  utter_efficiency_per_month : 
  - text : "To calculate the efficiency per month, you should provide an ID of the employee , the start date and the end date of the month."
  utter_efficiency_per_week :
  - text : "To calculate the efficiency per week, you should provide an ID of the employee, the start date and the end date of the week." 
  utter_efficiency_per_day : 
  - text : "To calculate the efficiency per day, you should provide an ID of the employee  and the specific Date."
  utter_get_id :
  - text : "give me the ID of employee"
  utter_get_start_date: 
  - text : "give me the start date "
  utter_get_end_date :
  - text : "give me the end date "
  
actions:
 - action_get_employee_id
 - get_errors
 - action_greet
 - action_get_specific_date
 - get_efficiency 
 - action_default
 - utter_get_id
 - action_get_end_date
 - action_get_start_date 
 - utter_get_end_date
 - utter_get_start_date
 - utter_request_id_employee
 - get_efficiency_choice
 - utter_efficiency_per_week
 - utter_efficiency_per_day
 - utter_efficiency_per_month
 
 
 


session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true
  

nlu.yml

version: "3.1"

nlu:
- intent: greet
  examples: |
    - hey
    - hello
    - hi
    - hello there
    - hey there
    - let's go
    - hey dude
    - good afternoon



- intent: salutation 
  examples: |
    - greeting 
    - good morning
    - good evening

- 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 : efficiency_per
  examples: |
    - can you give me the efficiency per [month](time_frame) .
    - can you give me the efficiency per [day](time_frame). 
    - calculate the efficiency per [week](time_frame).
    - calculate the efficiency per [day](time_frame).
    - I want to know the efficiency per [week](time_frame).
    - I want to know the efficiency per [day](time_frame).




- intent:  present_the_features
  examples: |
    - what are you presenting?
    - what do you got?
    - what are you doing? 
    - What do you propose?
    - Can you give me a sense of what you are presenting?
    - What are your products or services?

- intent : efficiency 
  examples: | 
     - can you give me the efficiency ?
     - I want to calculate the efficiency 
     - can you tell me the efficiency of the employee ?
     - how can I calculate the efficiency of employees 
     - give options for calculating efficiency 

- intent : errors 
  examples: | 
     - can you give me the errors ?
     - I want to calculate the errors 
     - can you tell me the errors in the database ?
     - how can I see the errors  in the database 
     - I want to know the mistakes in the data base please ?



- intent : confirmation
  examples: |
   - Agreed
   - ok 
   - of course
   - well 

- intent : nothing
  examples: |
    - nothing
    - all is well

- intent: deny
  examples: |
    - no
    - n
    - never
    - I don't think so
    - don't like that
    - no way
    - not really

- intent: thank
  examples: |
    - thank you
    - thanks
    - thank you very much
    - be great
    - thank you, bye
    - thanks by 

- intent : provide_employee_id
  examples: |
   - [10001](employee_id)
   - [20554](employee_id)
   - [10002](employee_id)
   - [19622](employee_id)
   - [10003](employee_id)
   - [11558](employee_id)
   - [10004](employee_id)
   - [88421](employee_id)
   - [10005](employee_id)
   - [16231](employee_id)
   - [10008](employee_id)
   - [10009](employee_id)
   - [10012](employee_id)
   - [10013](employee_id)
   - [12555](employee_id)


- intent : provide_specific_date
  examples: |
    - [2022-09-10](specific_date)
    - [2022-09-15](specific_date)
    - [2023-11-09](specific_date)
    - [2022-01-13](specific_date)
    - [22/10/2015](specific_date)
    - [1-10-2023](specific_date)
    - [2023-01-01](specific_date)


- intent : efficiency_per_week1
  examples: |
   - What was the overall efficiency for the [week](time_frame) ?
   - How productive were the employees throughout the [week](time_frame) ?
   - Provide me the weekly efficiency for the [week](time_frame) .
   - I want to  calculate the efficiency of this  [week](time_frame) . 
   - What is the  efficiency of the team for the [week](time_frame) ?
   - Compare the efficiency of different teams for the [week](time_frame) .
   - Can you show me the efficiency  of the [week](time_frame) ?
   - What was the efficiency of employees for the [week](time_frame)?"
   - Give me the weekly efficiency report for the [week](time_frame).
   - Provide me the efficiency for the [week](time_frame) .
   - How productive were we  in that [week](time_frame) ?
   - What is the efficiency for the [week](time_frame) ?
   - I want to know the efficiency on the [week](time_frame) .
   - What was the efficiency on this [week](time_frame)?
   - Give me the efficiency in the [week](time_frame) .

- intent : efficiency_per_month1
  examples: |
    - Give me the efficiency for all the  days in [month](time_frame).
    - How productive were the employees throughout [month](time_frame)?
    - Provide me the monthly efficiency for [month](time_frame).
    - I want to know the efficiency on the 1st of [month](time_frame).
    - Tell me the efficiency for the entire [month](time_frame).
    - What is the average efficiency of the team for [month](time_frame)?
    - Compare the efficiency of different teams for [month](time_frame).
    - Can you show the efficiency trend for [month](time_frame)? 
    - What was the efficiency of employee John in [month](time_frame)?
    - Give me the monthly efficiency report for [month](time_frame).
    - Provide me the efficiency per day for [month](time_frame).
    - how productive were we on the 15th of [month](time_frame)?
    - What is the efficiency for [month](time_frame)?
    - I want to know the efficiency on [month](time_frame).
    - Tell me the efficiency for the entire [month](time_frame).
    - Compare the efficiency of different teams for [month](time_frame).
    - Can you show the efficiency trend for [month](time_frame)?"
    - What was the efficiency during [month](time_frame)?"
    

- intent : efficiency_per_day1
  examples: |
    - What was the efficiency of [day](time_frame)?
    - Give me the efficiency [day](time_frame).
    - How productive were the employees on the [day](time_frame)?
    - Provide me the efficiency for the [day](time_frame).
    - I want to know the efficiency on the [day](time_frame).
    - Tell me the efficiency for the [day](time_frame).
    - What is the average efficiency of the [day](time_frame).


- intent :  provide_start_date 
  examples : |
    - 2022-11-30
    - from 2023-03-03
    - 2023-02-02
    - 2023-05-05
    - 2022-08-20

- intent :  provide_end_date 
  examples : |
     - 2023-08-04
     - to 2023-06-10
     - 2023-07-20
     - 2023-09-15
     - 2023-10-25
    
- intent : out_of_scope 
  examples : | 
   - I have nothing to do.
   - I am sick.
   - In short.
   - Need service.

config.yml

# The config recipe.
# https://rasa.com/docs/rasa/model-configuration/
recipe: default.v1

# The assistant project unique identifier
# This default value must be replaced with a unique assistant name within your deployment
assistant_id: 20230808-130627-denim-render

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

pipeline:
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
  analyzer: "char_wb"
  min_ngram: 1
  max_ngram: 4
- name: DIETClassifier
  epochs: 100
  constrain_similarities: true
- name: EntitySynonymMapper
- name: ResponseSelector
  epochs: 100
  constrain_similarities: true




policies:
- name: MemoizationPolicy
- name: TEDPolicy
  max_history: 5
  epochs: 100
- name: RulePolicy
  core_fallback_threshold: 0.5
- name: UnexpecTEDIntentPolicy
  max_history: 5
  epochs: 100






I would not do this with stories and use forms instead. As a bot grows, use of stories only becomes more and more difficult to troubleshoot.