wit icon indicating copy to clipboard operation
wit copied to clipboard

App does not match trait entity, even if the inputted sentence is word to word like the trained expression.

Open vladikus10 opened this issue 8 years ago • 12 comments

Do you want to request a feature, report a bug, or ask a question about wit? Possible bug or misunderstanding What is the current behavior? Currently I have a trait entity called question with value location with the following expressions:

Where is the bathroom?
I'm looking for the bathroom.
Where can I find the bathroom?
Can you tell me where the bathroom is?
What is the location of the bathroom?
Location of the bathroom please.
Where are we?

The bathroom is an entity called place. When I do a request with the sentence: "Where can I find the bathroom?", which is word to word like the third expression, wit API does not return the question:location entity, only the bathroom keyword:

{
    "_text": "Where can I find the bathroom?",
    "entities": {
        "place": [
            {
                "confidence": 0.98416767138022,
                "value": "bathroom",
                "type": "value"
            }
        ]
    },
    "msg_id": "0DhGjumexpVUoOL8K"
}

Same results with this input: "What is the location of the bathroom?" What is the expected behavior? I expect for it to return >0.95 confidence if not 1 like with other ones:

{
    "_text": "Location of the bathroom please.",
    "entities": {
        "place": [
            {
                "confidence": 0.97417984874595,
                "value": "bathroom",
                "type": "value"
            }
        ],
        "question": [
            {
                "confidence": 0.97449452743932,
                "value": "location"
            }
        ]
    },
    "msg_id": "0RYsZ5eM2oFL1765T"
}

The thing I don't understand is why it does not match the inputs? I would understand if it had trouble if I had inputted a sentence that I did not train it for, however the inputs were word to word just like the expressions. Perhaps I'm not training it correctly? What is the App ID where you are experiencing this issue (if applicable)? 5ab4e419-c23f-4d3a-93ad-8f2f71f2c427

vladikus10 avatar Mar 26 '18 13:03 vladikus10

Hi @vladikus10,

Thanks for the thorough report. This is indeed unexpected. Can you try validating a few more samples of Where can I find with different places, to see if it helps?

patapizza avatar Mar 26 '18 15:03 patapizza

Hey @patapizza, i will.

While on the topic, I wanted to ask. If you have dozens of places, wouldn't it be enough to just give one expression and then specify a place keyword entity and then give it more place values? I have it like that in this app and it seems to work fine with other places (well atleast for the expressions that do work).

vladikus10 avatar Mar 26 '18 17:03 vladikus10

I added more expressions with the same result, it just detects the place entity.

Where can I find the cafe?
Where can I find the gym?
Where can I find the meeting room?

If I actually set the n parameter to 2, then it actually shows that it detects it as location question at 0.23 :

{
    "_text": "Where can I find the gym?",
    "entities": {
        "place": [
            {
                "confidence": 1,
                "value": "gym",
                "type": "value"
            }
        ],
        "question": [
            {
                "confidence": 0.23028135554424,
                "value": "location"
            }
        ]
    },
    "msg_id": "06B0DaqC9ntbMA1aW"
}

EDIT: I tried "Where would I find the bathroom?" (which is not a registered expression, but similar to "Where can I find..") and it gave the confidence of 0.449, which is higher than "Where can I find the bathroom?".

vladikus10 avatar Mar 26 '18 17:03 vladikus10

UPDATE: I tried some other sentences and for what ever reason, wit can't identify "What is the location of the bathroom?", how it finds fine the input "What is the location of the meeting room?", even tough the trained expression has a different keyword in it.

{
    "_text": "What is the location of the meeting room?",
    "entities": {
        "place": [
            {
                "metadata": "{place_id: 1}",
                "confidence": 1,
                "value": "meeting room",
                "type": "value"
            }
        ],
        "question": [
            {
                "confidence": 0.98760135022012,
                "value": "location"
            }
        ]
    },
    "msg_id": "060tNT3OpLjpb0Tu3"
}

vladikus10 avatar Mar 27 '18 11:03 vladikus10

I have been facing the same issue from past two days. App id: 5aba14c0-f06e-4346-8fcb-4bff155823da

nirmaljosep avatar Mar 28 '18 13:03 nirmaljosep

just restarted your app. Your training was stuck

l5t avatar Mar 28 '18 15:03 l5t

Still no luck. Trained with 'please set the room temperature' for trait set_temperature. Using exact words also doesn't finds a match. And can we do this app restart from our end? incase training is getting stuck regularly.

nirmaljosep avatar Mar 29 '18 07:03 nirmaljosep

Please try again, your app had training issues, which we fixed and are preventing from happening again

blandinw avatar Mar 29 '18 17:03 blandinw

Created a new bot and trained for set_temperature. Exact trained phrases also not working. Could you be more specific on identifying root cause than saying app restarted. Completely stuck with this for nearly 4 days. New app id:5abde675-c577-4d6a-89c7-af90b1f57fc3 image image

nirmaljosep avatar Mar 30 '18 07:03 nirmaljosep

This really sucks. We are not able to train new examples here for about two weeks now.

herrspiess avatar Mar 30 '18 11:03 herrspiess

@blandinw Any news here?

herrspiess avatar May 18 '18 10:05 herrspiess

Sorry for the latency here.

@vladikus10 It seems like it's working fine now:

screen shot 2018-05-25 at 2 55 47 pm screen shot 2018-05-25 at 2 56 17 pm screen shot 2018-05-25 at 2 56 41 pm

@nirmaljosep It seems like your app has been updated for another use case now. Please ping back if you still run into any issues.

@herrspiess Please open a new issue using the provided template, thanks.

patapizza avatar May 25 '18 18:05 patapizza