I'm trying to learn Rasa and I have a question. Since intents are already defined in data/nlu.yml, there's a particular reason to repeat them in domain.yml? Thanks!
Asked
Active
Viewed 462 times
1 Answers
2
Some of Rasa's algorithms (the machine learning ones mainly) need to know which intents exist upfront. Theoretically, you could indeed argue that this can be fetched from the nlu.yml
files. In practice, we need to remember that the nlu.yml
files can get quite big (they also may contain non-intent data, like large lookups).
There are however a few places where the set of intents is needed, and if each lookup for this data requires checking the nlu.yml
file it may get slow as the bot grows larger and larger.
I'm not 100% sure if this is the official reason, but I hope it's a plausible reason why it's preferable to have a central domain.yml
file that contains all settings without containing the data as well.

cantdutchthis
- 31,949
- 17
- 74
- 114
-
2I see your point and it's quite clear. I'm just wondering if the nlu.yml file could be parsed just once to collect all the intents for later use. – Gianluca Dec 30 '21 at 19:52