Rasa nlu parse request giving wrong intent result - rasa-nlu

Rasa NLU version (e.g. 0.7.3): 0.10.0a6
Used backend / pipeline (mitie, spacy_sklearn, ...): ["nlp_spacy", "tokenizer_spacy", "intent_featurizer_spacy","ner_crf", "ner_synonyms", "intent_classifier_sklearn","ner_spacy"]
Operating system (windows, osx, ...): Windows server 2012 R2
Issue: I have installed Rasa nlu 0.10.0a6 version. My confi_spacy file looks like.
{
"project":"Project",
"pipeline" : ["nlp_spacy", "tokenizer_spacy", "intent_featurizer_spacy","ner_crf", "ner_synonyms", "intent_classifier_sklearn","ner_spacy"],
"path" : "./projects",
"cors_origins":["*"],
"data" : "./data/examples/rasa/People.json"
}
and my data file looks like.
{
"rasa_nlu_data": {
"regex_features": [
{
"name": "zipcode",
"pattern": "[0-9]{5}"
}
],
"entity_synonyms": [
{
"value": "chinese",
"synonyms": ["Chinese", "Chines", "chines"]
},
{
"value": "vegetarian",
"synonyms": ["veggie", "vegg"]
}
],
"common_examples": [
{
"text": "hey",
"intent": "greet",
"entities": []
},
{
"text": "howdy",
"intent": "greet",
"entities": []
},
{
"text": "hey there",
"intent": "greet",
"entities": []
},
{
"text": "hello",
"intent": "greet",
"entities": []
},
{
"text": "hi",
"intent": "greet",
"entities": []
},
{
"text": "good morning",
"intent": "greet",
"entities": []
},
{
"text": "good evening",
"intent": "greet",
"entities": []
},
{
"text": "dear sir",
"intent": "greet",
"entities": []
},
{
"text": "yes",
"intent": "affirm",
"entities": []
},
{
"text": "yep",
"intent": "affirm",
"entities": []
},
{
"text": "yeah",
"intent": "affirm",
"entities": []
},
{
"text": "indeed",
"intent": "affirm",
"entities": []
},
{
"text": "that's right",
"intent": "affirm",
"entities": []
},
{
"text": "ok",
"intent": "affirm",
"entities": []
},
{
"text": "great",
"intent": "affirm",
"entities": []
},
{
"text": "right, thank you",
"intent": "affirm",
"entities": []
},
{
"text": "correct",
"intent": "affirm",
"entities": []
},
{
"text": "great choice",
"intent": "affirm",
"entities": []
},
{
"text": "sounds really good",
"intent": "affirm",
"entities": []
},
{
"text": "i'm looking for a place to eat",
"intent": "restaurant_search",
"entities": []
},
{
"text": "I want to grab lunch",
"intent": "restaurant_search",
"entities": []
},
{
"text": "I am searching for a dinner spot",
"intent": "restaurant_search",
"entities": []
},
{
"text": "i'm looking for a place in the north of town",
"intent": "restaurant_search",
"entities": [
{
"start": 31,
"end": 36,
"value": "north",
"entity": "location"
}
]
},
{
"text": "show me chinese restaurants",
"intent": "restaurant_search",
"entities": [
{
"start": 8,
"end": 15,
"value": "chinese",
"entity": "cuisine"
}
]
},
{
"text": "show me chines restaurants",
"intent": "restaurant_search",
"entities": [
{
"start": 8,
"end": 14,
"value": "chinese",
"entity": "cuisine"
}
]
},
{
"text": "show me a mexican place in the centre",
"intent": "restaurant_search",
"entities": [
{
"start": 31,
"end": 37,
"value": "centre",
"entity": "location"
},
{
"start": 10,
"end": 17,
"value": "mexican",
"entity": "cuisine"
}
]
},
{
"text": "i am looking for an indian spot called olaolaolaolaolaola",
"intent": "restaurant_search",
"entities": [
{
"start": 20,
"end": 26,
"value": "indian",
"entity": "cuisine"
}
]
}, {
"text": "search for restaurants",
"intent": "restaurant_search",
"entities": []
},
{
"text": "anywhere in the west",
"intent": "restaurant_search",
"entities": [
{
"start": 16,
"end": 20,
"value": "west",
"entity": "location"
}
]
},
{
"text": "anywhere near 18328",
"intent": "restaurant_search",
"entities": [
{
"start": 14,
"end": 19,
"value": "18328",
"entity": "location"
}
]
},
{
"text": "I am looking for asian fusion food",
"intent": "restaurant_search",
"entities": [
{
"start": 17,
"end": 29,
"value": "asian fusion",
"entity": "cuisine"
}
]
},
{
"text": "I am looking a restaurant in 29432",
"intent": "restaurant_search",
"entities": [
{
"start": 29,
"end": 34,
"value": "29432",
"entity": "location"
}
]
},
{
"text": "I am looking for mexican indian fusion",
"intent": "restaurant_search",
"entities": [
{
"start": 17,
"end": 38,
"value": "mexican indian fusion",
"entity": "cuisine"
}
]
},
{
"text": "central indian restaurant",
"intent": "restaurant_search",
"entities": [
{
"start": 0,
"end": 7,
"value": "central",
"entity": "location"
},
{
"start": 8,
"end": 14,
"value": "indian",
"entity": "cuisine"
}
]
},
{
"text": "bye",
"intent": "goodbye",
"entities": []
},
{
"text": "goodbye",
"intent": "goodbye",
"entities": []
},
{
"text": "good bye",
"intent": "goodbye",
"entities": []
},
{
"text": "stop",
"intent": "goodbye",
"entities": []
},
{
"text": "end",
"intent": "goodbye",
"entities": []
},
{
"text": "farewell",
"intent": "goodbye",
"entities": []
},
{
"text": "Bye bye",
"intent": "goodbye",
"entities": []
},
{
"text": "have a good one",
"intent": "goodbye",
"entities": []
}
]
}
}
Using above config and json data I have trained Rasa using below HTTP end point
/train?project=Project
After training data there in one Project folder created with trained data.
And I started Rasa server with below command.
python -m rasa_nlu.server -c config_spacy.json
Now server started with port 5000.
When I can execute '/parse?q=hello&project=Project' parse end point am getting below response.
{
"intent": {
"name": "greet",
"confidence": 0.6409561289105246
},
"entities": [],
"intent_ranking": [
{
"name": "greet",
"confidence": 0.6409561289105246
},
{
"name": "goodbye",
"confidence": 0.16788352870824252
},
{
"name": "restaurant_search",
"confidence": 0.10908268742176423
},
{
"name": "affirm",
"confidence": 0.08207765495946878
}
],
"text": "hello"
}
When I can execute '/parse?q=Great choice&project=Project' parse end point am getting below response.
{
"intent": {
"name": "affirm",
"confidence": 0.7718580601897227
},
"entities": [],
"intent_ranking": [
{
"name": "affirm",
"confidence": 0.7718580601897227
},
{
"name": "goodbye",
"confidence": 0.11611828257295627
},
{
"name": "greet",
"confidence": 0.07060567364272623
},
{
"name": "restaurant_search",
"confidence": 0.04141798359459499
}
],
"text": "Great choice"
}
When I can execute '/parse?q=Great choice&Project=Project' parse end point am getting below response.
{
"intent": {
"name": "None",
"confidence": 1
},
"entities": [],
"text": "Great choice"
}
When I can execute "/parse?q=Book a cab&project=Project" parse end point am getting below response.
{
"intent": {
"name": "goodbye",
"confidence": 0.40930529216955336
},
"entities": [],
"intent_ranking": [
{
"name": "goodbye",
"confidence": 0.40930529216955336
},
{
"name": "restaurant_search",
"confidence": 0.31818118919270977
},
{
"name": "greet",
"confidence": 0.20524111006007764
},
{
"name": "affirm",
"confidence": 0.06727240857765926
}
],
"text": "Book a cab"
}
In this way for each request it is responding with proper results some times and sometime not. If you can observe Parse_reponce2.txt and Parse_reponce3.txt in these both the response I just changed from small 'p' to capital 'P' in place 'Project' because of this change, i got different results for each request.
And in trained data there is no 'Book a cab' text or any related intent to it. But when I send parse using this text I am not getting None intent, it is returning intent result. for any parse request with any random am not getting None intent.
Is this my training issue or what went wrong in it.
Please let me know how can I get proper intent results as well as entities result.
Content of configuration file (if used & relevant):
{
"project":"Project",
"pipeline" : ["nlp_spacy", "tokenizer_spacy", "intent_featurizer_spacy","ner_crf", "ner_synonyms", "intent_classifier_sklearn","ner_spacy"],
"path" : "./projects",
"cors_origins":["*"],
"data" : "./data/examples/rasa/People.json"
}

URL parameters are case sensitive, which is why the two great choice examples had different outputs. In the 2nd case Rasa wasn't finding a project/model to parse against.
Rasa NLU will always return a matched intent. So in the last example you can see that it returned an intent, but the confidence was low. Handling this is what would be called a fallback or out of scope. The two primary ways discussed for handling fallback is to implement logic that takes over when the confidence falls below a certain threshold or to train an actual fallback intent that has all the non-intent examples you want to catch.

I had the same issue with using Rasa NLU where I had around 120 examples for 5 different intents, and 5-7 entities as well. Here, you seem to have used the spacy-sklearn pipeline.
spaCy typically requires more data to train and detect intents and (more so) entities. The docs say 500-1000 examples would be considered "decent and good" for the library.
In my case I changed my pipeline to MITIE-sklearn and I got a decent model trained with only 80 examples and same number of intents as before.
Also spaCy tends to be faster as you would have noted, but MITIE does take around 6 minutes for an 80-example model.

Related

LUISGen throws exception when generating cs classes from json

I am trying to generate cs calsses from json which I exported from luis.ai for one of my luis App.
But when I run the command LUISGen myLuisApp.json -cs myClassName I get below error on commandline
Snapshot of exception
below is the json I got from luis.ai
{
"luis_schema_version": "7.0.0",
"versionId": "0.1",
"name": "myBotName",
"desc": "",
"culture": "en-us",
"tokenizerVersion": "1.0.0",
"patternAnyEntities": [],
"regex_entities": [],
"phraselists": [],
"regex_features": [],
"patterns": [],
"intents": [
{
"name": "ApproveAllTasksOnMe"
},
{
"name": "ApproveTask"
},
{
"name": "GetApprovedTasks"
},
{
"name": "GetCompletedTasks"
},
{
"name": "GetLastApprovedTask"
},
{
"name": "GetLastNTasks"
},
{
"name": "GetLastRejectedTask"
},
{
"name": "GetRejectedTasks"
},
{
"name": "GetTaskDetails"
},
{
"name": "GetTasks"
},
{
"name": "GetTotalPendingTasks"
},
{
"name": "GetTotalTasksCompleted"
},
{
"name": "None"
},
{
"name": "RejectAllTasksOnMe"
},
{
"name": "RejectTask"
}
],
"entities": [
{
"name": "Application",
"children": [],
"roles": [],
"features": []
},
{
"name": "Email",
"children": [
{
"name": "AssignedTo",
"children": [],
"features": []
},
{
"name": "InitiatedBy",
"children": [],
"features": []
}
],
"roles": [],
"features": []
},
{
"name": "Name",
"children": [
{
"name": "AssignedTo",
"children": [],
"features": []
},
{
"name": "InitiatedBy",
"children": [],
"features": []
}
],
"roles": [],
"features": []
},
{
"name": "Status",
"children": [],
"roles": [],
"features": []
},
{
"name": "Workspace",
"children": [],
"roles": [],
"features": []
}
],
"hierarchicals": [],
"composites": [],
"closedLists": [],
"prebuiltEntities": [],
"utterances": [
{
"text": "all approved tasks",
"intent": "GetApprovedTasks",
"entities": []
},
{
"text": "all tasks",
"intent": "GetTasks",
"entities": []
},
{
"text": "approve all",
"intent": "ApproveAllTasksOnMe",
"entities": []
},
{
"text": "approve task",
"intent": "ApproveTask",
"entities": []
},
{
"text": "get all tasks i approved",
"intent": "GetApprovedTasks",
"entities": []
},
{
"text": "get all tasks i rejected",
"intent": "GetRejectedTasks",
"entities": []
},
{
"text": "get last 5 tasks",
"intent": "GetLastNTasks",
"entities": []
},
{
"text": "get last approved task",
"intent": "GetLastApprovedTask",
"entities": []
},
{
"text": "get last rejected task",
"intent": "GetLastRejectedTask",
"entities": []
},
{
"text": "get task details",
"intent": "GetTaskDetails",
"entities": []
},
{
"text": "get tasks pending on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 21,
"endPos": 22,
"children": [
{
"entity": "AssignedTo",
"startPos": 21,
"endPos": 22,
"children": []
}
]
}
]
},
{
"text": "how man tasks are pending on me",
"intent": "GetTotalPendingTasks",
"entities": []
},
{
"text": "how many tasks are assigned to me",
"intent": "GetTotalPendingTasks",
"entities": []
},
{
"text": "how many tasks i closed today",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "how many tasks were completed by me",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "last 7 tasks",
"intent": "GetLastNTasks",
"entities": []
},
{
"text": "last approved task",
"intent": "GetLastApprovedTask",
"entities": []
},
{
"text": "last task i approved",
"intent": "GetLastApprovedTask",
"entities": []
},
{
"text": "last task i rejected",
"intent": "GetLastRejectedTask",
"entities": []
},
{
"text": "list my tasks",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 5,
"endPos": 6,
"children": [
{
"entity": "AssignedTo",
"startPos": 5,
"endPos": 6,
"children": []
}
]
}
]
},
{
"text": "number of tasks closed",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "reject all",
"intent": "RejectAllTasksOnMe",
"entities": []
},
{
"text": "reject all my tasks",
"intent": "RejectAllTasksOnMe",
"entities": []
},
{
"text": "reject all tasks",
"intent": "RejectAllTasksOnMe",
"entities": []
},
{
"text": "reject this task",
"intent": "RejectTask",
"entities": []
},
{
"text": "show all completed tasks",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show all done tasks",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show all tasks approved by me",
"intent": "GetApprovedTasks",
"entities": []
},
{
"text": "show done tasks",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show how many tasks are closed",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "show last 2 tasks",
"intent": "GetLastNTasks",
"entities": []
},
{
"text": "show my tasks",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 5,
"endPos": 6,
"children": [
{
"entity": "AssignedTo",
"startPos": 5,
"endPos": 6,
"children": []
}
]
}
]
},
{
"text": "show tasks i took action on",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show tasks pending on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 22,
"endPos": 23,
"children": [
{
"entity": "AssignedTo",
"startPos": 22,
"endPos": 23,
"children": []
}
]
}
]
},
{
"text": "tasks assigned to me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 18,
"endPos": 19,
"children": [
{
"entity": "AssignedTo",
"startPos": 18,
"endPos": 19,
"children": []
}
]
}
]
},
{
"text": "tasks i rejected",
"intent": "GetRejectedTasks",
"entities": []
},
{
"text": "tasks pending on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 17,
"endPos": 18,
"children": [
{
"entity": "AssignedTo",
"startPos": 17,
"endPos": 18,
"children": []
}
]
}
]
},
{
"text": "tasks rejected by me",
"intent": "GetRejectedTasks",
"entities": []
},
{
"text": "tasks waiting for my attention",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 18,
"endPos": 19,
"children": [
{
"entity": "AssignedTo",
"startPos": 18,
"endPos": 19,
"children": []
}
]
}
]
},
{
"text": "tasks waiting on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 17,
"endPos": 18,
"children": [
{
"entity": "AssignedTo",
"startPos": 17,
"endPos": 18,
"children": []
}
]
}
]
},
{
"text": "today's priorities",
"intent": "GetTasks",
"entities": []
},
{
"text": "total tasks for me",
"intent": "GetTotalPendingTasks",
"entities": []
},
{
"text": "what are my tasks for the day",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 9,
"endPos": 10,
"children": [
{
"entity": "AssignedTo",
"startPos": 9,
"endPos": 10,
"children": []
}
]
}
]
}
],
"settings": []
}
when run the same command with of the json from examples it generated the classes without any error.
Can anybody help me understand what I might be doing wrong or if I am missing something?
I have installed LUISGen with below comand dotnet tool install --global LUISGen --version 2.2.0
Normally I would say 'make sure you're using the most up-to-date version of the tool', but
LUISGen is deprecated (legacy tool). The new botframework-cli was designed to replace legacy standalone tools. I don't think you're missing anything, but it hasn't been updated in almost a year.
The botframework-cli has a similar command: bf luis:generate:cs meant to generate CS classes on LUIS models.
https://github.com/microsoft/botframework-cli/blob/main/packages/luis/README.md#bf-luisgeneratecs

Bind an Array with dynamic length to an Adaptive Card

I was wondering how I could bind an array which can have a dynamic length to an element in Microsofts Adaptive Cards. Specifically, I want to make a list with instructions and display those in "kind-of-a-list" with a dynamic layout. In a perfect world, ths list would be filled dynamically and adjust its length to the length of the array. Any ideas/workarounds?
Card Payload:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "${title}",
"size": "Medium",
"weight": "Bolder",
"wrap": true,
"separator": true
},
{
"type": "FactSet",
"facts": [
{
"title": "1.",
"value": "${instructions[1]}"
},
{
"title": "2.",
"value": "${instructions[2]}"
},
{
"title": "3.",
"value": "${instructions[3]}"
},
{
"title": "4.",
"value": "${instructions[4]}"
},
{
"title": "5.",
"value": "${instructions[5]}"
}
],
"isVisible": false,
"$data": "${$root['instructions[0]']}",
"separator": true
}
]
}
Card Data:
{
"title": "Instructions:",
"instructions" : [
"blablablba",
"qwerertzasdfadfds fasdf ",
"asdfkjhasf 3 asdflkjw",
"Lorem ipsum dolor mi",
"hello world",
"last instruction"
]
}
the best way to do this is if you change your JSON a litle bit:
{
"title": "Instructions:",
"instructions": [{
"id": "1",
"text": "blablablabla"
},
{
"id": "2",
"text": "qwerertzasdfadfds fasdf "
},
{
"id": "2",
"text": "asdfkjhasf 3 asdflkjw"
},
{
"id": "3",
"text": "Lorem ipsum dolor mi"
},
{
"id": "4",
"text": "hello world"
},
{
"id": "5",
"text": "last instruction"
}
]
}
This way you can build the card like this:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.3",
"body": [
{
"type": "TextBlock",
"text": "${title}",
"size": "Medium",
"weight": "Bolder",
"wrap": true,
"separator": true
},
{
"type": "FactSet",
"facts": [
{
"$data": "${instructions}",
"title": "${id}.",
"value": "${text}"
}
],
"separator": true
}
]
}
Which would look like this:

Microsoft Teams - multiselect in ms teams bot

How to implement multiselect in drop down list through adaptive cards to fill a form which contains the name of employees to select.
If not what are the other ways to implement multiselect in Ms Teams through bot.
Multiselect like this.
Check and build samples.
Check this sample Adaptive card
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"speak": "<s>Your meeting about \"Adaptive Card design session\"<break strength='weak'/> is starting at ${formatDateTime(start.dateTime, 'HH:mm')}pm</s><s>Do you want to snooze <break strength='weak'/> or do you want to send a late notification to the attendees?</s>",
"body": [
{
"type": "TextBlock",
"text": "${summary}",
"size": "Large",
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": " ${location} ",
"isSubtle": true
},
{
"type": "TextBlock",
"text": "${formatDateTime(start.dateTime, 'HH:mm')} - ${formatDateTime(end.dateTime, 'hh:mm')}",
"isSubtle": true,
"spacing": "None"
},
{
"type": "TextBlock",
"text": "Snooze for"
},
{
"type": "Input.ChoiceSet",
"id": "snooze",
"value": "${reminders.overrides[0].minutes}",
"choices": [
{
"$data": "${reminders.overrides}",
"title": "${hours} hours",
"value": "${hours}"
},
{
"$data": "${reminders.overrides}",
"title": "${minutes} minutes",
"value": "${minutes}"
},
{
"$data": "${reminders.overrides}",
"title": "${seconds} seconds",
"value": "${seconds}"
}
],
"isMultiSelect": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Snooze",
"data": {
"x": "snooze"
}
},
{
"type": "Action.Submit",
"title": "I'll be late",
"data": {
"x": "late"
}
}
]
}

Luis not working due to its maintance (just in spanish culture)?

our staging application with spanish culture was not working yesterday, and today our production application is also not working. The problem is that some intents are not returning any entities. And in the web of luis is annunced that "We are performing system wide maintenance. Some apps may experience temporary unavailability. Thank you for your patience."
We want to know if it is a normal case and how long will it last. Our bot is in the production, which means it is a product. We ara caring about our product, and do not want interrupt its service with any accident.
Also we want to know is there any technical way to avoiding cases like this.
Detail of the error, when call version english https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/xxxx?subscription-key=xxxxxxxxxx&verbose=true&timezoneOffset=0&q=malaga
{
"query": "malaga",
"topScoringIntent": {
"intent": "sports_football_team_global",
"score": 0.989564657
},
"intents": [
{
"intent": "sports_football_team_global",
"score": 0.989564657
},
{
"intent": "sports_user_follow",
"score": 0.256285429
},
{
"intent": "sports_user_unfollow",
"score": 0.0624738075
},
{
"intent": "sports_football_team_information",
"score": 0.0452761
},
{
"intent": "sports_user_notification_level",
"score": 0.0250913966
},
{
"intent": "OPTA_Cancelar",
"score": 0.01700071
},
{
"intent": "None",
"score": 0.0113976067
},
{
"intent": "sports_user_enable_notification",
"score": 0.01062314
},
{
"intent": "sports_user_emotion_hate",
"score": 0.008717464
},
{
"intent": "sports_competition_classification",
"score": 0.006895263
},
{
"intent": "sports_user_welcome",
"score": 0.003931297
},
{
"intent": "root_change_user_info",
"score": 0.002939801
},
{
"intent": "sports_user_disable_notification",
"score": 0.00284402771
},
{
"intent": "sports_team_last_match",
"score": 0.002589234
},
{
"intent": "sports_next_match_bytime",
"score": 0.00225439551
},
{
"intent": "sports_showmore_team",
"score": 0.00210961024
},
{
"intent": "sports_competition_next_round",
"score": 0.00183723459
},
{
"intent": "sports_team_next_match",
"score": 0.0017626757
},
{
"intent": "sports_competition_last_round",
"score": 0.001716528
},
{
"intent": "sports_user_emotion_gol",
"score": 0.001380223
},
{
"intent": "sports_user_unfollow_all",
"score": 0.00104989111
},
{
"intent": "sports_user_current_match",
"score": 0.0008975425
},
{
"intent": "sports_user_last_match",
"score": 0.0005386151
},
{
"intent": "sports_user_show_follow",
"score": 0.0004062014
},
{
"intent": "sports_team_current_match",
"score": 0.000116936135
},
{
"intent": "sports_user_next_match",
"score": 1.70625044E-05
}
],
"entities": [
{
"entity": "malaga",
"type": "football_team",
"startIndex": 0,
"endIndex": 5,
"resolution": {
"values": [
"Málaga"
]
}
}
]
And version spanish https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/xxxxxx?subscription-key=xxxx&verbose=true&timezoneOffset=0&q=malaga
{
"query": "malaga",
"topScoringIntent": {
"intent": "sports_football_team_global",
"score": 0.9602209
},
"intents": [
{
"intent": "sports_football_team_global",
"score": 0.9602209
},
{
"intent": "sports_user_disable_notification",
"score": 0.130784482
},
{
"intent": "sports_team_last_match",
"score": 0.09194096
},
{
"intent": "sports_user_notification_level",
"score": 0.08853955
},
{
"intent": "sports_team_next_match",
"score": 0.0597797334
},
{
"intent": "sports_user_unfollow",
"score": 0.0510462932
},
{
"intent": "sports_football_team_information",
"score": 0.0401076
},
{
"intent": "sports_competition_classification",
"score": 0.03524222
},
{
"intent": "sports_user_follow",
"score": 0.02526744
},
{
"intent": "sports_next_match_bytime",
"score": 0.0111262156
},
{
"intent": "sports_user_enable_notification",
"score": 0.009637802
},
{
"intent": "sports_team_current_match",
"score": 0.00436334638
},
{
"intent": "sports_user_emotion_hate",
"score": 0.004245238
},
{
"intent": "None",
"score": 0.00323706563
},
{
"intent": "sports_user_show_follow",
"score": 0.00276356842
},
{
"intent": "sports_showmore_team",
"score": 0.00234427629
},
{
"intent": "sports_user_last_match",
"score": 0.00233005267
},
{
"intent": "sports_user_welcome",
"score": 0.00157872075
},
{
"intent": "sports_competition_next_round",
"score": 0.00108685123
},
{
"intent": "sports_user_emotion_gol",
"score": 0.000902815256
},
{
"intent": "sports_competition_last_round",
"score": 0.000205698016
},
{
"intent": "sports_user_current_match",
"score": 0.000102570972
},
{
"intent": "sports_user_next_match",
"score": 3.606828E-05
},
{
"intent": "sports_user_unfollow_all",
"score": 3.43515676E-05
}
],
"entities": []
}
It was a temporary issue which has been resolved. Please contact Luisuservoice#microsoft.com if any issues.

When connecting to LUIS, what does the "forceset" parameter do

In my LUIS app I have an intent called GetWeather requiring a Location to be set.
When connecting to the app using the query
What is the weather in london
it correctly returns
{
"query": "what is the weather in london",
"topScoringIntent": {
"intent": "GetWeather",
"score": 0.999875546,
"actions": [
{
"triggered": true,
"name": "GetWeather",
"parameters": [
{
"name": "Location",
"type": "Location",
"required": true,
"value": [
{
"entity": "london",
"type": "Location",
"resolution": {}
}
]
}
]
}
]
},
"entities": [
{
"entity": "london",
"type": "Location",
"startIndex": 23,
"endIndex": 28,
"score": 0.832388461,
"resolution": {}
}
],
"dialog": {
"contextId": "e1df6c2d-e691-4fc6-89f2-3ee2ef519724",
"status": "Finished"
}
}
If I instead use the query
What is the weather
It returns the following expected result.
{
"query": "what is the weather",
"topScoringIntent": {
"intent": "GetWeather",
"score": 1.0,
"actions": [
{
"triggered": false,
"name": "GetWeather",
"parameters": [
{
"name": "Location",
"type": "Location",
"required": true,
"value": null
}
]
}
]
},
"entities": [],
"dialog": {
"prompt": "Where",
"parameterName": "Location",
"parameterType": "Location",
"contextId": "3b0725f4-7d6f-43fd-ab6e-02fc11c3eed1",
"status": "Question"
}
}
I thought that using the contextID together with the forceSet parameter in my next call would set the parameter Location to whatever I send as the query. The conection string I use is this:
https://api.projectoxford.ai/luis/v2.0/apps/{APP_ID}?subscription-key={SUBSCRIPTION_KEY}&q=london&contextid=3b0725f4-7d6f-43fd-ab6e-02fc11c3eed1&forceset=Location
Instead I get the following response back:
{
"query": "london",
"topScoringIntent": {
"intent": "GetWeather",
"score": 1.0,
"actions": [
{
"triggered": false,
"name": "GetWeather",
"parameters": [
{
"name": "Location",
"type": "Location",
"required": true,
"value": null
}
]
}
]
},
"entities": [],
"dialog": {
"prompt": "Where",
"parameterName": "Location",
"parameterType": "Location",
"contextId": "3b0725f4-7d6f-43fd-ab6e-02fc11c3eed1",
"status": "Question"
}
}
I had expected to get something like my first response back.
Am I doing something wrong or just misunderstanding what the forceSet parameter is supposed to do?

Resources