After all this time looks like am going to give up on rasa :(

it was really good using rasa for building a chatbot and very easy for peoples with less coding skill…after all this time trying to fix formaction that keeps fiiling by it self if it has similar values…i tried many ways but faild…examples like if i have phone number and account number since both of them are expecting close values and other like this…if anyone can help me on this problem i would really love to see the solution…i had asked before on collecting user answer to do a prediction using machine learning but still couldnt find an answer…too bad

@faiza_conte, even if you give up, you’ll still have the same issue. You can just study a little bit more and also seek for help at here. Congrats for doing that :smiley: Read Rasa’s documentation or improve your programming skill can also help.

That’s seens to be simple to resolve. You want to collect phone and account number, right?

You can use Regex to validate this data or, if you’re using forms, you can validate there. That’s two ideas, do some test :smiley:

1 Like

@marcos.allysson…thanks a lot but the problem am facing is that if I have similar values for different intent or entities the nlu picks it up automatically without me reaching there…assume I have the same values for different intent or entities so I dont want it to be picked up by the nlu…I tried to make the auto fill to false but still if nlu saw similar values for one entity then it will pick it up…what I wanted to do is by using different intent or entities to recive similar values…if u have any idea for that…I would love to continue with rasa lol

@faiza_conte, try rasa interactive. This way you can teach and guide your assistant.

@marcos.allysson…how many times do I teach through the interactive mode??

@faiza_conte, depends on your assistant conversation paths. But, you can start with just one path and check if everything is okay. Test is very important.

@faiza_conte I’d hate to see you give up. Do you have your code posted to a git repo we can pull down and take a look?

I agree at times Rasa can be frustrating, I’m struggling with something right now and I’ve been working with Rasa for a year and 1/2 :slight_smile: Most of my issue is that I admittedly don’t have a deep knowledge of the algorithms and things and things are a bit different with version 2, but I know I’ll figure it out.

Anyway, if you can post your project somewhere, maybe a couple of us can take 10-15 minutes and look to see if something stands out to me. I can’t promise I can help but I’m willing to try to get you over the hump. It’s just easier to do looking over the entire project.

1 Like

@jonathanpwheat In which github ripo shall I post my project ???

You can just create a new public repo for your project under your own account on Github and then I’ll be able to see it and pull it down after you tell me the URL for it.

@jonathanpwheat…okay…I have another question …I wanted to do a conditional flow in a story…assume the story goes like this the user asks for a treatment then the the bot asks an initial symptom by providing a button selection then if a user selects one of the buttons as initial symptom then based on that the Bot will ask further question related to what the user selects as initial…here what am facing is how can I make a conditional flow in story to do a formaction…I have 4 buttons and 4 formaction so if a user selects button 1 then formaction1 will be asked if 2 then formaction 2 will be asked…how can we make like that in story??

Sure, that’s pretty straight forward, I’ve done something similar with 2 buttons each with their own intent, but you can do that with one intent and multiple stories as well. I’ll stub out both below

The 4 intent version

**This isn’t the most efficient or saleable solution, but its easy to understand and debug.

Not sure the syntax below is 100% correct, I haven’t tried what I’m about to type, but I’m mirroring from similar code in my bot.

Setup each button to call a different intent and optionally set a slot/entity if you want

intents:
  - symptom_one
  - symptom_two
  - symptom_three
  - symptom_four

slots:
- symptom
  type: text
  auto_fill: true
  influence_conversation: true

entities:
- symptom

responses:
  utter_say_sorry_to_hear_that:
  - text: "I'm sorry to hear that"

  utter_ask_primary_symptom:
  - text: "Can you tell me your primary symptom?"
    buttons:
    - title: "Runny nose"
      payload: '/symptom_one{"symptom": "runny nose"}'
    - title: "Cough"
      payload: '/symptom_two{"symptom": "cough"}'
    - title: "Stomach pain"
      payload: '/symptom_three{"symptom": "stomach pain"}'
    - title: "Headache"
      payload: '/symptom_four{"symptom": "headache"}'

Then create a story for each of those 4 intents that when triggered calls your form action

stories:
- story: Has Runny Nose
  steps:
  - intent: symptom_one
  - action: utter_say_sorry_to_hear_that
  - action: your_form_action_name_for_symptom_one
  - active_loop:  your_form_action_name_for_symptom_one
  - active_loop: null

- story: Has Cough
  steps:
  - intent: symptom_two
  - action: utter_say_sorry_to_hear_that
  - action: your_form_action_name_for_symptom_two
  - active_loop:  your_form_action_name_for_symptom_two
  - active_loop: null

... repeat for three and four

One Intent version (this is off the cuff, not 100% if this syntax will be correct)

intents:
- primary_symptom

slots:
- symptom
  type: text
  auto_fill: true
  influence_conversation: true

entities:
- symptom

responses:
  utter_say_sorry_to_hear_that:
  - text: "I'm sorry to hear that"
 
Change your buttons to something like this:

  utter_ask_primary_symptom:
  - text: "Can you tell me your primary symptom?"
    buttons:
    - title: "Runny nose"
      payload: '/primary_symptom{"symptom": "runny nose"}'
    - title: "Cough"
      payload: '/primary_symptom{"symptom": "cough"}'
    - title: "Stomach pain"
      payload: '/primary_symptom{"symptom": "stomach pain"}'
    - title: "Headache"
      payload: '/primary_symptom{"symptom": "headache"}'

Here’s where I’m not exactly sure with the Rasa version 2 syntax.

stories:
- story: Has Runny Nose
  steps:
  - intent: primary_symptom
  - slot_was_set:
    - symptom: "runny nose"
  - action: utter_say_sorry_to_hear_that
  - action: your_form_action_name_for_symptom_one
  - active_loop:  your_form_action_name_for_symptom_one
  - active_loop: null

- story: Has Runny Nose
  steps:
  - intent: primary_symptom
  - slot_was_set:
    - symptom: "cough"
  - action: utter_say_sorry_to_hear_that
  - action: your_form_action_name_for_symptom_one
  - active_loop:  your_form_action_name_for_symptom_one
  - active_loop: null

repeat for the other symptoms

Hopefully that’s enough to get you pointed in the right direction.