Getting started with Rasa

Hi @Juste I tried going through the master class but i think i got lost somewhere along the way so decided to go back to basics and try the Udemy course instead. But somehow I am also having challenges with that too.

The one thing i noticed is that both courses refer to stories.md and the nlu.md but the rasa init is now creating *.yml versions instead, so i assumed maybe a version difference? Aso the format of the actual stories is slightly different in the 2 courses vs what the rasa init project has e.g. the use of * to prefix user input parts of the story. I imagine that is not something to worry about though?

Anyway, trying out the Udemy course health form example, here is one of my stories:

stories:
  - story: survey happy path
    steps:
      - intent: greet
      - action: utter_greet
      - intent: affirm
      - action: health_form
      - action: form{"name":"health_form"}
      - action: form{"name":null}
      - action: utter_slots_values
      - intent: thankyou
      - action: utter_no_worries
      - action: utter_goodbye

When i train the model, i get some warnings:

c:\users\me\.pyenv\pyenv-win\versions\3.7.7\lib\site-packages\rasa\shared\utils\io.py:89: UserWarning: Intent 'out_of_scope' has only 1 training examples! Minimum is 2, training may fail.
c:\users\me\.pyenv\pyenv-win\versions\3.7.7\lib\site-packages\rasa\shared\utils\io.py:89: UserWarning: Intent 'stop' has only 1 training examples! Minimum is 2, training may fail.

… … c:\users\me.pyenv\pyenv-win\versions\3.7.7\lib\site-packages\rasa\core\policies\form_policy.py:50: FutureWarning: ‘FormPolicy’ is deprecated and will be removed in in the future. It is recommended to use the ‘RulePolicy’ instead. (will be removed in 3.0.0) docs=DOCS_URL_MIGRATION_GUIDE, c:\users\me.pyenv\pyenv-win\versions\3.7.7\lib\site-packages\rasa\shared\utils\io.py:89: UserWarning: It is not recommended to use the ‘RulePolicy’ with other policies which implement rule-like behavior. It is highly recommended to migrate all deprecated policies to use the ‘RulePolicy’. Note that the ‘RulePolicy’ will supersede the predictions of the deprecated policies if the confidence levels of the predictions are equal. More info at Version Migration Guide

Then i get this error:

Processed trackers: 100%|█████████████████████████████████████████████| 509/509 [00:07<00:00, 67.07it/s, # actions=343]

ActionNotFoundException: Cannot access action ‘form{“name”:“health_form”}’, as that name is not a registered action for this domain. Available actions are: - action_listen - action_restart - action_session_start - action_default_fallback - action_deactivate_loop - action_revert_fallback_events - action_default_ask_affirmation - action_default_ask_rephrase - action_two_stage_fallback - action_back - … - utter_ask_confirm_exercise - utter_ask_continue - utter_ask_diet - utter_ask_exercise - utter_ask_goal - utter_ask_sleep - utter_ask_stress - utter_diet_info - utter_exercise_info - utter_goodbye - utter_greet - utter_iamabot - utter_no_worries - utter_slots_values - utter_stress_info - health_form

If i comment out the these 2 lines from my story then the training completes without errors

image

but then the assistant doesn’t work correctly

I guess i don’t yet fully understand how the form should be implemented. I tried to look at the docs but trying to bring that in line with this tutorial is confusing me a little. May someone explain to me how i can correctly implement the form for the Udemy tutorial.

UPDATE: I tried using GitHub - RasaHQ/rasa-for-beginners: Rasa for Beginners, no custom changes, just the stock standard code from the repo

Still no luck with that either. What am I doing wrong?

Hi @blestab. The difference in the training data format you mentioned is indeed because of the version changes. The .yml data format has been introduced in Rasa 2.0 (released last week). Could you try installing the latest Rasa 1.x version (1.10.14 for example)? That should solve the versioning issue until we make the updates in the content.

Thanks @Juste, i’ll give it a whirl.

Hi @Juste ! thanks for helping, I am having the same problem and I want to make this work with version 2, do you know how to properly declare a form and be classified as Action in the new YML format so that it can bypass the error that is currently giving? (ActionNotFoundException: Cannot access action) thanks!

It seems like it might be worth un-pinning this and then pinning a new “Getting started” thread given the changes with moving to Rasa 2.0+

The links above work but things have changed and in particular directing people to the Udemy course now, when it’s specifically for version 1.0 seems actively counterproductive: someone could come here, see that, go sit through a couple of hours of the course and only then realise they’d focused on the legacy version :frowning:

Great point @nmstoker! :slight_smile: Will unpin this for now and work on updating it.

1 Like

Thanks @Juste

I must say, coming back to use Rasa after a longish break, the docs seems to have a few confusing aspects and I don’t think it’s just me being sleepy :slightly_smiling_face:

Mainly it’s the lack of overviews and coverage of some critical things, seemingly lost in the transition to 2.0 (ie there’s very little info on credentials.yml or domain.yml, just some examples mentioned in passing at various points).

It feels like a new person would struggle to find the complete set of necessary details to start from scratch (or they’d clone one of the starter, get some distance and then find the key details were hard to come by). I guess the forum can help but it would be ideal if a few of the gaps were filled to enable the “happy path” through the docs.

Perhaps it’s a glitch but search in the docs is also a bit weird too (eg if you don’t pick from the drop-down list and go to view the full set of results, eg here: Search the documentation | Rasa Open Source Documentation, you always get “No results were found” and it doesn’t matter what you search for so far as I can see)

Anyway, let me know if you want any more detailed pointers - I appreciate the efforts and documentation is never easy!! Hope all’s well with you.