Search code examples
azure-language-understanding

How to make LUIS respond with the matched entity


I am setting up a LUIS service for dutch.

I have this sentence:

Hi, ik ben igor -> meaning Hi, I'm igor

  • Where Hi is an simple entity called Hey, that can have multiple different values such as (hey, hello, ..) which I specified as a list in the phrases.
  • And Igor is a simple entity called Name

In the dashboard I can see that Igor has been correctly mapped as a Name entity, but the retrieved result is the following:

    {
        "query": "Hi, ik ben igor",
        "topScoringIntent": {
            "intent": "Greeting",
            "score": 0.462906122
        },
        "intents": [
            {
                "intent": "Greeting",
                "score": 0.462906122
            },
            {
                "intent": "None",
                "score": 0.41605103
            }
        ],
        "entities": [
            {
                "entity": "hi",
                "type": "Hey",
                "startIndex": 0,
                "endIndex": 1,
                "score": 0.9947428
            }
        ]
    }

Is it possible to solve this? I do not want to make a phrase list of all the names that exist.


Solution

  • Managed to train LUIS to even recognize asdaasdasd:

    {
        "query": "Heey, ik ben asdaasdasd",
        "topScoringIntent": {
            "intent": "Greeting",
            "score": 0.5320666
        },
        "intents": [
            {
                "intent": "Greeting",
                "score": 0.5320666
            },
            {
                "intent": "None",
                "score": 0.236944184
            }
        ],
        "entities": [
            {
                "entity": "asdaasdasd",
                "type": "Name",
                "startIndex": 13,
                "endIndex": 22,
                "score": 0.8811139
            }
        ]
    }
    

    To be honest I do not have a great guide on how to do this:

    • Add multiple example utterances with example entity position
    • Did this for about 5 utterances
    • No phrase list necessary

    I'm going to accept this as an answer, but once someone explains in-depth and technically what is happening behind the covers, I will accept that answer.