ivan.dmi
(Ivan)
September 8, 2021, 12:51pm
1
Is it possible to write test stories for chit chat and FAQs?
Test should look something like that?
- story: Ask name
steps:
- user: |
What is your name?
intent: simple_question/ask_name
- action: utter_simple_question/ask_name
I did that, but when I run test, it didn’t pass. The failed_test_stories.yml output:
- story: Ask name (.\tests\test.yml)
steps:
- intent: simple_question
- action: utter_simple_question/ask_name # predicted: utter_simple_question
- action: action_listen # predicted: action_default_fallback
nik202
(NiK202)
September 10, 2021, 10:02am
2
@ivan.dmi Heya!
I guess you have seen this doc page : Chitchat and FAQs please see how the rules are mentioned or you want to use stories only? Emphasis more on intent and the way chitchat is used in the doc.
@ivan.dmi Even please share the config.yml file .
Check:
story: ask name
steps:
intent: ask_name or intent you defined in NLU simple_question/ask_name ?
action: utter_simple_question
ivan.dmi
(Ivan)
September 10, 2021, 10:11am
3
Is it possible to use rules in tests? On this page (Testing Your Assistant ) I don’t see examples with keyword rule in tests.This is from test.yml:
- story: Ask name
steps:
- user: |
What is your name?
intent: simple_question/ask_name
- action: utter_simple_question/ask_name
nik202
(NiK202)
September 10, 2021, 10:13am
4
@ivan.dmi mate I never tried it but you can experiment
By running rasa test you can see, that both our tests still pass! Rules, however do not generalize to unseen conversations. You should reserve them for single-turn conversation snippets , and use stories to train on multi-turn conversations. More on this in the documentation.
ivan.dmi
(Ivan)
September 10, 2021, 10:23am
5
You mean rules don’t need to be tested? How can I test FAQ and chit chat rule?
I have rule in rules.yml:
- rule: simple question
steps:
- intent: simple_question
- action: utter_simple_question
I have test:
- story: Ask name
steps:
- user: |
What is your name?
intent: simple_question/ask_name
- action: utter_simple_question/ask_name
But It failed. Result from failed_test_stories.yml :
- story: Ask name (.\tests\test.yml)
steps:
- intent: simple_question
- action: utter_simple_question/ask_name # predicted: utter_simple_question
- action: action_listen # predicted: action_default_fallback
nik202
(NiK202)
September 10, 2021, 10:26am
6
@ivan.dmi please try and please see my above post.
@ivan.dmi Please check this Github Repo: https://github.com/RasaHQ/rasa/tree/main/examples/responseselectorbot for your reference, you will get a lot of idea and syntax.
ivan.dmi
(Ivan)
September 10, 2021, 10:33am
7
nik202
(NiK202)
September 10, 2021, 10:34am
8
@ivan.dmi Ivan, as a reference I shared you the repo, that dnt have any test or other information. Its complete project for FAQs and Chitchat. Now you got it?