Adding utterances in the nlu.md file and training a model not working

rasa synonyms not working
rasa nlu
how to define entity in rasa
rasa regex
rasa lookup table example

I've added below utterance in the nlu.md file :

## intent:input_year
- [2019](year)

And have a story like this :

## test
* input_year{"year" : "2019"}
 - utter_year

The intent input_year and action utter_year is added to domain.yml

I trained a new model through command line, started rasa x and talked to the bot, on entering 2019 the intent identified is null0.

This is my pipeline :

pipeline: 
- name: "SpacyNLP"
- name: "SpacyTokenizer"
- name: "RegexFeaturizer"
- name: "SpacyFeaturizer"
- name: "CRFEntityExtractor"
- name: "EntitySynonymMapper"
- name: "SklearnIntentClassifier"
- name: "DucklingHTTPExtractor"
  # url of the running duckling server
  url: "http://localhost:8000"
  # dimensions to extract
  dimensions: ["email", "time", "number", "amount-of-money", "distance"]
  # allows you to configure the locale, by default the language is
  # used
  locale: "NL_Nothing"
  # if not set the default timezone of Duckling is going to be used
  # needed to calculate dates from relative expressions like "tomorrow"
  timezone: "US/Pacific"

Is this a valid way to train new data ? Or is it important to use the UI to train? Please suggest what is wrong here. Thanks


Have you specified a entity and slot in domain file if not you have to specify it because if you are defining the intent like this [2019](year). In your case slot will be "year". You can specify those things like below in your domain.yml file.

entities:
- echannel_service

slots:
  year:
    type: text

Note: Insteat of slot type as text you can use categorical and specifiy the list of years. Refer this about slots

If you have already mentioned those things and still it doesnt work, try specifing in the stories like this.

## input_year path
* input_year{"yea":"2019"}
    - slot{"year":"2019"}

If you don't want to use slots just specify the years in nlu.md file like this and try.

## intent:input_year
- 2019 year
- 2020 year

Synonym in nlu.md are not working properly, Here is my nlu.md file data: ## intent:defect_flow - i have an issue with I am trying to implement synonyms functionality but it is not working as expected. Add a training example with “critical” and the slot should be filled with “High” I don't want to increase the training data with same kind of utterance. See Generic Utterances Model for more information on the JSON schema for utterances. See the documentation on endpoint configuration for LUIS and Lex for more information on how to supply endpoint settings and secrets, e.g., endpoint authentication keys, to the CLI tool. Detailed Usage-s, --service. Identifier of the NLU provider to run against.


Option 1

hi, you can try adding lookup for your year in nlu.md like below.

## lookup:year
 - 2001
 - 2002
 - 2003
 - 2010
 - 2011
 - 2012
 - 2018
 - 2019

Option 2

I'm giving this option since you have already trained your bot using interactive form. Try changing your intent like below and check if thats working.

## intent:input_year
- [2019](year) year

Let me know the result.

Intelligent Virtual Agents: 11th International Conference, IVA , Another conclusion is that one can easily develop an NLU module. A solution for this problem is to add extra weight to some words, something that could Moreover, adding synonyms to the training utterances file could also help. Another limitation is that the actual model does not comprise any history of the interactions. Add from 10 to 30 utterances or more, with as much variety between them as you can provide. As you build and retrain your model iteratively, you can use your utterances to test your intent prediction confidence scores.


Is 2019 the only line you have for that intent? I think Rasa expects several examples for possible inputs per intent. Try adding more examples to that intent.

2. View Your NLU Training Data, Run the code cell below to see the NLU training data created by the rasa init The configuration file defines the NLU and Core components that your model Run the command below to view the example stories inside the file data/stories.​md : These simple utterance actions are the actions in the domain that start with  The model works, but is prone to mistakes: our limited training data doesn’t provide enough information for the NLU to be very accurate. A good next step will be to update the NLU data and add more training examples to all of the intents in our training data file to improve the performance of the model.


Rasa X domain file not updated · Issue #3610 · RasaHQ/rasa · GitHub, GitHub is home to over 50 million developers working together to host I train the NLU and Core models through Rasa X, and by testing the model in training data, this intent is automatically added to the domain file (under intents) . Can not add new intent unless editing the domain.yml manually #3621. Teams. Q&A for Work. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.


Moodbot, GitHub is home to over 50 million developers working together to Content of nlu.md file: model with name 'en' INFO:rasa_nlu.components:Added 'nlp_spacy​' story as an appropriate response to the mood_great user utterance. Try to give some more inputs in the nlu training file and check it again. The configuration file defines the NLU and Core components that your model will use. In this example, your NLU model will use the supervised_embeddings pipeline. You can learn about the different NLU pipelines here. Let’s take a look at your model configuration file. cat config.yml. The language and pipeline keys specify how the NLU model


Building Chatbots with Python: Using Natural Language Processing , We'll get to know in a moment if our rasa-nlu-trainer is successfully installed add new examples from here and it will keep on extending the data.json file. I would suggest that you add more data to your intents for better training of the model. Just as we selected the entities within utterances to define them in Chapter 3  The training data for Rasa NLU is structured into different parts: common examples. synonyms. regex features and. lookup tables. While common examples is the only part that is mandatory, including the others will help the NLU model learn the domain with fewer examples and also help it be more confident of its predictions.