Help with stories, Intent and Action

Hello People,

My first post,…

I am trying a develop a bot that will connect to an excel database and answer questions. The excel has hospital ward bed occupancy details. The hierarchy is hospitals >> wards >> bed with their status ( occupied and available) there are three scenarios I am trying to create

  1. User asks for occupancy for a hospital then bot will aggregate and return the number of occupied beds

  2. Then user might ask for a specific ward ( if he has already queried for the facility then the ward in that facility)

  3. User might directly ask for a ward in facility or if he has not queried any facility before then he has to supply both the ward and facility

I am able to achieve scenario 1; can you help me with scenario 2 and 3; Please find nlu the stories that I had created but does not work for scenario 2 and does not work well for scenario 3

NLU:

intent:find_occupancy

  • could you tell me the occupancy?
  • can you tell me the occupancy?
  • can you give me occupancy details
  • I want to know the occupancy for a facility
  • whats the bed status
  • can you give me the bed status details?
  • can you give me the bed status?
  • I want to know the bed status for a facility

intent:find_occupancy_facility

  • I want to know the occupancy details for Al Dhaid
  • can you give me the bed status for Al Amal?
  • I want to know the bed status for Dibba
  • I need to the bed status details for Al Fujairah
  • Al Kuwait bed occupancy details

intent:find_occupancy_for_ward

Story:

greet path

  • greet
    • utter_greet

say goodbye

  • goodbye
    • utter_goodbye

user asks for bed status

  • greet
    • utter_greet
  • find_occupancy
    • utter_ask_facility
  • facility_info
  • utter_finding_bed_status
  • action_show_bed_status
  • thanks
  • utter_welcome
  • utter_goodbye

user asks for bed status for location

  • greet
    • utter_greet
  • find_occupancy_facility
    • utter_finding_bed_status
    • action_show_bed_status
  • thanks
    • utter_welcome
    • utter_goodbye

user asks for bed status for ward

  • greet
    • utter_greet
  • find_occupancy_for_ward
    • utter_ask_ward
  • ward_info
    • utter_finding_bed_status_ward
    • action_show_bed_status_ward
  • thanks
  • utter_welcome
  • utter_goodbye

user asks for bed status for ward and facility

  • greet
    • utter_greet
  • find_occupancy_for_ward
    • utter_finding_bed_status_ward
    • action_show_bed_status_ward
  • thanks
  • utter_welcome
  • utter_goodbye

Welcome to the community @Sheik! Have you looked into slots and forms? It seems like they might be helpful for you to achieve the other scenarios

I did use the slots, but both y slots are of the same type and hence the bot picks one for the other for example when I want to query a specific facility it treats it as a ward and other times as facilities

@Sheik So they are the same entity type? If so, why? You also don’t have a lot of training data, so you might want to collect some more NLU training examples

I have my data set which is a set of hospitals and respective wards and bed Ids;Bed Ids being primary key and each bed has a status of assigned or available. the first use case is user asks for occupancy the bot to respond with all the available and assigned beds across the facilities. Then the user could query for a specific facility F1, it brings up the available and assigned bed for all wards in that facility. Then the user may query a specific ward(if he has already asked for a facility) I want this to be in memory as the ward names are not unique and may be used in other facilities as well (for example male ward could be in a facility F1 and another faciity F2), so when the user next asks the bot for a ward, based on a facility chosen, I want to show the results for that specific ward in that facility. Sometime the user could directly ask a question by specifying both the facility and the ward name. the bot is not able to differentiate between entity facility and entity ward, also when the user queries a ward right after querying for facility it still asks for the ward info and some times it takes the ward as the facility. Hope the question is clear

Hi Ty Dunn, The webinar video link plays only the audio the visual is all green mat. Is there any support channel I can make use, I am currently working on PoC for one of biggest government entities and looking for some technical support

The webinar video link plays only the audio the visual is all green mat.

That is odd. The YouTube video works normal for me.

Is there any support channel I can make use, I am currently working on PoC for one of biggest government entities and looking for some technical support

It sounds like this might be a good route for you: https://rasa.com/contact-sales/