LUIS Batch Testing for Entity is Not Working - azure

Referring to the batch testing document from Microsoft, I have imported the LUIS app provided from this document and import this this JSON batch file to LUIS batch testing panel and try to run the test.
The testing result of 'Intents' is as expected, however, for the 'Entities', it is expected some of the entities will pass but at the end all entities are failed:
Entities Fail Screenshot
Is it a bug in LUIS or anything going wrong?
Updates: The issue above is fixed but some batch testing function are still not working
After the fix have been released, I have tried it again. I found that it works fine with no entity, simple entity and hierarchical entity. However, for List Entity and Regex Entity still not working on Microsoft sample. Entity list and entity list in batch testing in Microsoft sample are not match. Besides, in my own Luis project, the list entity is showing in the batch testing entity list but the result is strange (caption in this screen cap).

By the way, if you look at the tutorial, it is stated that:
"Only the machine-learned entities are used: simple, hierarchical (parent-only), and composite entities. Do not add non-machine-learned entities because they are always found either through regular expressions, or explicit text matches"
And List Entities are not machine-learned entities.

Related

Action and parameters in dialogeflow

When I created A Parameter and I assigned it to te entity called #sys.unit-information-name,
I keep getting this warning: *The annotated text 'diabetes' in training phrase 'show me results on diabetes' does not correspond to entity type '#sys.unit-information-name'. And as a result my chatbot does not give me the right result, basically it will just keep asking the question under the Prompts under the Action and parameters.
If I remove this parameter it works. But I want to use the parameter & Entity
Any Help
Thanks
The problem you are facing is because you are explicitly creating a parameter and adding the system entity #sys.unit-information-name. This entity is used to refer to information about units as per system Entities documentation.
Since you are referring to a disease “diabetes” as per your expression “show me results on diabetes”, this entity cannot be used to map diabetes or any other disease also. There is no system Entities for Diseases, so it's better that we create a custom entity defining most of the disease names.
When giving the training Phrases if the word matches with values defined in entity, then entity mapping for that word will be done and the response will be generated.

Entity with excluded values in Dialogflow

I want to create an entity that has any value except the values that are defined in another entity.
For example, i have an entity that contains all the possible products categories that i use in the bot, and if the user type a value that is not in that entity i want to react in some way.
It's like a fallback but only triggered when that condition is met.
Any suggestion?
Entity extraction is based on some definite value that can be identified and separated. There should be some basic features defined for the agent to train on. Based on these trained features, the agent will look for an entity and extract it from the user's response.
If you have already defined an entity to look for, it will be extracted by the Dialogflow based on the training data. If there is nothing defined it will not be identified as an entity as the agent will be not sure what to look for.
So, what you can do is,
Make the entity (already defined) as not required. Uncheck the "required" checkbox in the Dialogflow.
Add the "#sys.any" in the Entity you defined and make it a composite Entity with the combination of your Entity and "#sys.any" something in the line of
Train your agent to look for this new Entity with your Basic Entity data and Anything else data.
Collect this in the webhook.
OR
You when you want to collect anything else, you can collect user utterance from the agent object and parse the data using Regex pattern of your choice.

Identify input text without any entities in IBM Watson Conversation

Is there a way with Watson to identify input.text's that have no entities at all?
I don't need to know anything about the input.text, I just need to know if it does or doesn't have an entity.
You can find out whether any Entity got identified or not, only from the entities array from the response. If this array is empty, then no entity got identified from the input.text, else some entities got identified.

Loopbackjs custom methods not showing in relations

In Strong loop i have a User model, and a Messages model. The Messages model has a custom method added in the message.js file. Lets say it's called
Message.sendMessage
This works fine at the messages end point. I've then added the messages model to the User model as a one to many - this works fine and i can now see all the messages models that are predefined, but not my methods added via actually code. So the basic CRUD methods work, but not custom methods. Any idea how to make these show up?
Message.sendMessage is a static method and cannot be invoked from a model instance.
If you want to invoke it from the instances of the Message class, you need to define it as Message.prototype.sendMessage

How to create and fetch relational records in core data

Total newbie question now... Suffice to say, I have searched for a completely noddy explanation but have not found anything 'dumb' enough. The problem is...
I have created a core data stack in which I have a entity called 'Client' and an entity called 'Car'. It is a one-to-many relationship.
So far i have successfully created and fetched the client list using code from apple's tutorial. Once I select a client, I then push a new tableViewController which should list the Cars for that chosen client.
First question...
I am used to sql style database programming where if I wanted to add a car to a client, I would simply add a 'ClientID' tag to the 'Car' record thereby providing the relationship to a specific client. How do I do the equivalent in core data? My understanding from my reading is adding attributes to point to other entities isnt necessary - core data maintains this relationship for you without needing additional attributes in the entities.
Second question...
As and when I have created a 'car' entity and successfully linked it to a 'Client'. How to I create a fetch which will retrieve just THAT client's cars. I could alter the code from apple to fetch ALL cars but I don't know how to fetch cars associated with a given client. From my reading, I think I need to use predicates, but apples predicate documentation stands alone and does not give clear guidance on how to use it with core data
I realise how noddy this is, but I cant find an idiots guide anywhere...
Any help/code exmaples much appreciated.
OK, I have answered my own question. For those who have found my question and would like to know the answer, it is extremely simple...
Firstly, to create a 'Car' and associate it with a 'Client'. Firstly create a 'Car' as you normally would and simply add this line of code...
newCar.client = client;
This sets the 'client' relationship on the 'Car' record to the client in question.
Secondly, I had thought that if you had a client and needed to find their cars, you would need a new fetch. But not so! Simply use the following lines of code...
NSSet *cars = client.cars;
[self setCarsArray:[cars allObjects]];
The first line uses "client.cars" o follow the object graph to determine the cars this client has and populates them in an NSSet. The second line then populates a NSArray which is declared in the current viewcontroller which can be used to for display purposes.
Sorted!!

Resources