RasaHQ / rasa

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
https://rasa.com/docs/rasa/
Apache License 2.0
18.87k stars 4.63k forks source link

Ability to compose domain files #4164

Closed moaazsidat closed 5 years ago

moaazsidat commented 5 years ago

Description of Problem: Currently there's no opinions that Rasa enforces about being able to split the domain file into multiple files (unlike stories e.g.).

We ran into this issue when trying to model a rule based system within a chatbot where we ended up with 3000+ slots and 1000+ actions for that functionality within the chatbot. This main the domain file increasingly frustrating to add to and work with.

Overview of the Solution: Spent some time last night writing a domain composer for our use case and wanted to get thoughts from the community about it.

here's the structure of my data/ folder:

├── domain.yml
├── domains
│   ├── hotel_booking
│   │   ├── actions.yml
│   │   ├── forms.yml
│   │   ├── intents.yml
│   │   └── slots.yml
│   ├── common
│   │   ├── actions.yml
│   │   ├── forms.yml
│   │   ├── intents.yml
│   │   └── slots.yml
│   ├── flight_booking
│   │   ├── actions.yml
│   │   ├── forms.yml
│   │   ├── intents.yml
│   │   └── slots.yml
└── stories.md

when a dev runs make build:domain which uses the composer script aforementioned they get a data/domain.yml file, which can then be used for training, that looks like this:

actions:
  <all action values>
forms:
  <all form values>
intents:
  <all intent values>
slots:
  <all slot values>

Questions

sara-tagger commented 5 years ago

Thanks for submitting this feature request 🚀@MetcalfeTom will get back to you about it soon!✨

MetcalfeTom commented 5 years ago

Hi @moaazsidat, like the idea :+1:

How exactly does the training data importing work here? Does your stories.md contain stories from all three of the domains in your example?

Seems like your solution deals implements two features here:

  1. I like the domain-splitting for larger projects. Seems like an intuitive way of making large projects digestible.

  2. The other feature you're proposing is the unification of a multi-skill assistant. This is already in the code, but is still experimental

Unfortunately we merged the ability to make custom Training Data Importers with rasa==1.1.8 and I think your implementation is already covered by this functionality. Give it a test and let us know if you have any feedback 😄I wonder if you could instead be searching for these domain files and unifying them automatically by passing a domain directory, rather than a make command.

no-response[bot] commented 5 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. Without this, we don't have enough information to help you. Please comment below with the requested information if you still need help.