Search code examples
nlpazure-language-understanding

Training model to recognize brands as entities


I'm trying to create a model in LUIS that allow me to detect if a brand (any brand) is mentioned in an utterance. I've tried different approaches but I'm struggling to get it working.

First I have an intent searchBrand with some examples utterances:

'Help me find info about Channel'
'I want to know more about Adidas'
...

What I want is that LUIS recognizes that a brand has been mentioned in the utterance (as an entity). I believe I have these options:

  1. Use a List Entity: impossible since I would have to fill the list with every possible brand that exists and, moreover, the user would have to write the brand exactly as it is, not allowing typos (e.g. ralf lauren)

  2. Use a ML Entity: I believe this could be the right approach. I've tried the following without success:

    • Create a ML Entity "brands"
    • Add a Structure with 1 component "brand"
    • Add to the component a Descriptor with a list of different brands as an example

Once I label the entities in the utterances, the model recognizes correctly the brands that I added to the Descriptor but it fails to recognize others brands or typos


Solution

  • I got it working following this:

    1. Create a ML Entity "brands"
    2. Add to the entity a Descriptor with a list of different brands as an example. Remember to normalize the elements in the Descriptor
    3. Add brands to the Descriptor
    4. Label entities as "brands" inside utterances in intent "searchBrands"
    5. Train & test the model

    It is very important to normalize everything in LUIS. I had the brands inside the Descriptor capitalized and LUIS couldn't recognize new ones, once I normalized the brands LUIS started suggesting new ones and recognizing more when testing the model

    enter image description here