The model is unable to predict the proper action - rasa-nlu

I added the story,
story: interactive_story_1
steps:
intent: call
entities:
person: son
slot_was_set:
person: son
action: action_call
and when i am running this on rasa interactive, it identifies the intent correctly, sets the slot properly but it predicts action_default_fallback with 0.3 probability and asks to run that instead of action_call which is clearly mentioned in the story!

Ok, I solved it, there was a problem with my rasa core configuration, it was not trained properly so all the action predictions by the dialogue management model was faulty.

Related

How to Intent classification with similar examples in nlu.md in Rasa

I am developing chatbot using Rasa for a Contract Manager Organisation. I am facing few issues and after reading a lot on the forums and Rasa blog, I am unable to conclude to a solution for this. I have several similar intents with similar examples like -
“inform_supplier_start_date” and “inform_contract_start_date”.
“inform_supplier_email” and “inform_customer_email” and “inform_reviewer_email”
Now the issue is, for both the categories of intents the example sentence in nlu.md is same. What I exactly mean is-
##intent:inform_suppler_start_date
-what is the supplier [Microsoft] (supplier_name) start date
-[EON Digital] (supplier_name) start date
##intent:inform_contract_start
1) start-date of [O2 Mobile phones] (contract_name)
2) [O2 Mobile phones] (contract_name) start date
The model isnt able to differentiate and identify the correct intent. It is getting confused and identifying the wrong intent, since the words in these intents are similar.
I need correct intents to be recognised ,so that accordingly, In custom action i can query the Database and get the corresponding result for supplier and contract.
I have many fields like this for which the example data and user queries will be same. For Example-
customer_email & supplier_email & reviewer_email
total_spend_contract & total_spend_supplier & total_spend_customer
contract_number_for_supplier & contract_number_of_contract & contract_number_organisation
What exactly I should be doing to get correct classification. One solution i am thinking of is merging the intents like “supplier_start_date” and "contract_start_date" as one “start_date” and check for the extracted entity inside custom actions in both supplier and contract database. But I dont think that would be proper usage of Natural Language.
Please Suggest, I shall be highly greatful for the same. Regards.
As the examples for your intents are very similar, the model will not be able to differentiate between them. Also the intent is actual the same, inform_suppler_start_date and inform_contract_start inform the bot about a start date. What kind of start date it is should be figured out via the entity recognition. So I would propose to merge the similar intents and check what the entity recognition detected as entities. Depending on whether a supplier or a contract was found, you can execute query A or B.

How to tie entity recognition to intent prediction?

I'm having a problem with Rasa_NLU giving me the wrong entity for an intent. An example is “How do I get to New York?” Where, I tagged the training data to name the entity “city”. In a different intent, it was tagged “destination”.
intent: check_weather
what is the weather in new york?
intent: get_directions
how do I get to new york?
I have a script that takes action on the intent returned and processes the entities. If I get back the get_directions intent, I’ll look in the json for the destination entity, but it has city instead. Using ner_crf, is there a way to de-emphasize entities in an intent, so that the classifier is biased to those that the intent was trained for? That is, the classifier would be weighted to giving a destination for get_directions, and a city for get_weather?
The typical answer I've found is to add more training examples. I'm up to 60 for each of the two intents I have, and it is still getting it wrong.
As of right now, you can only featurize/unfeaturize all entities for a certain intent. I can see that that's not really your use case since both intents require entities -- just different ones. There is currently a community PR open to add per-intent featurization of specific entities, so it will be available in the future.

Communication.ContactName Entity not recognized in LUIS Intent

I have created several utterances in LUIS for an intent to create new meeting items in my application.
I have tagged the corresponding elements in the utterance to recognize the name of the invited person and the date / time of the meeting.
When I train the model and test it afterwards, date and time is recognized every time. Not so for the contactname. I have tried all possible things like adding the utterance as pattern, adding phrase lists, but no success.
What can I do, to make this work? Is there anythink I am missing?
If you're using simple entities, keep in mind that you'll need to train 10-15 utterances, and that there should be different names in all utterances. Using the same name repeatedly may cause faulty training.

Rasa-core, Slots not getting Populated

I am trying to create simple printer support chat bot using rasa-core via nlu interpreter, bot should get the printer model, and printer type and post a issue.
I have used the printermodel and printertype variable in slot and entity, but the slots are not getting populated from the chat string.
Please help me on this.
Not very much information to go off of, but here are several things I would check if my slots weren't being filled correctly:
Is NLU parsing the entities correctly? Slots are usually filled from NLU entities. Send your text direct to the NLU and see if the entities are found.
Entity and Slot names are not consistent? The default method of filling slots without custom programming expects the slot name to match the entity name.
Are the slots defined correctly in the domain information?
If you're still having trouble I encourage you to create an issue or join us on gitter.
For example, we have to design simple conversation
User: I am Shivam
Bot: Hello Shivam
Here, we have to extract name and respond using it.
Step 1: In nlu.md file
## intent:told_name
- i am [shivam](name)
- my name is [shivam](name)
- hi, i am [shivam](name)
Step 2 In domain.yml file
intents:
- told_name
actions:
- utter_greet
entities:
- name
slots:
name:
type: text
templates:
utter_greet:
- text: "Hello {name}"
- text: "Hello {name}, happy to meet you."
Step 3 In stories.md file
# story_01
* told_name{"name": "Mayank"}
- utter_greet
I think, you are missing someting in step 3

Can't add Subject text to Regarding field in Dynamics CRM Activity

I've added several Subjects under the Admin section of Dynamics CRM. I'd really like to add one of these "Subjects" to the Regarding field within an Activity. E.g. someone called, and it was related to "ProductX".
Strangely, the entity type "Subject" does not appear when trying to select an item for the field. A range of other entity types such as "Contacts" and "Accounts" appear.
Does anyone know why Subjects can't be selected here? I would have expected this was OOB functionality.
That because it doesn’t really make sense to have activities regarding a subject.
An activity only really makes sense in the context of something else, and that something else is generally a real thing in the world or a piece of work. The Regarding field really says: "This Activity involves working on this thing".
For example, if John Smith rings your company, it makes sense to create a new Phone Call activity that Regards the Contact record of John Smith. With this approach you can see the entire activity history against a Contact. By making the Phone Call regard the Contact you are saying this piece of work is about the Contact.
If the Phone Call was Regarding a Subject, it would be saying, "This Phone Call involves working on the Subject", which isn’t true, its work about the Contact. Also you lose the ability to track correspondence with the contact.
So my suggestion would be, use the Regarding field to link to people and things, and add a relationship between your activities and subject if you want to classify your phone calls.
As a side, there is a product entity in CRM (it can’t be Regarding however), so perhaps you should create a relationship to that.

Resources