How to convert a file into a format acceptable to rasa

ai.yaml (8.1 KB) I found this file

How can I convert it to the format accepted by rasa so that I can train it

thanks :smile:

You need to create an intent and response(s) for every question, and link intent to response with stories and/or rules.

How to do it?

Use python or manually add them one by one?

Is there a quicker and more convenient way?

Yes you’ll have to do it one by one.

Of course you can write Python code for that, but how will you give proper names to the intents and responses then? And intents also need multiple examples.

This is how to transform a part of your examples:

- - What is AI?
  - Artificial Intelligence is the branch of engineering and science devoted to constructing machines that think.
- - What is AI?
  - AI is the field of science which concerns itself with building hardware and software that replicates the functions of the human mind.
- - Are you sentient?
  - Sort of.
- - Are you sentient?
  - By the strictest dictionary definition of the word 'sentience', I may be.
- - Are you sentient?
  - Even though I'm a construct I do have a subjective experience of the universe, as simplistic as it may be.

In nlu.yml:

nlu:
- intent: ask_about_ai
  examples: |
  - What is AI?
  - whats ai
  - Can you explain what AI is?
  - I want to know about artificial intelligence
  - more about ai
  - what's artificial intelligence?

- intent: ask_if_sentient
  examples: |
  - Are you sentient?
  - um... are you a sentient being?
  - you sentient?
  - Can I ask if you're sentient?
  - r u sentient

In domain.yml:

responses:
  utter_explain_ai:
  - text: Artificial Intelligence is the branch of engineering and science devoted to constructing machines that think.
  - text: AI is the field of science which concerns itself with building hardware and software that replicates the functions of the human mind.

  utter_sentience:
  - text: Sort of.
  - text: By the strictest dictionary definition of the word 'sentience', I may be.
  - text: Even though I'm a construct I do have a subjective experience of the universe, as simplistic as it may be.

In rules.yml (or do stories instead):

rules:
- rule: Answer when asked about AI
  steps:
  - intent: ask_about_ai
  - action: utter_explain_ai

- rule: Answer when asked about sentience
  steps:
  - intent: ask_if_sentient
  - action: utter_utter_sentience

Because I want to train a chatting robot, I will use a lot of daily chat, so I want to know if there is a more convenient way

sorry to ping you there but can you please answer this as well Not able to call action server using rasa-sdk

Using Rasa X you can easily convert real conversations to the correct format, after having done the initial transformations.