Wrong Mapping: Right intent but wrong entities

Hey Guys, So I am only using rasa_nlu, I have enough training examples approx 20 for each intent and entities. These examples are primarily the output of linux shell commands. My issue is that my model classifies the correct intent say “intent1” but maps it with different entity name though the entity value is correct. For example: suppose there are 2 intents “intent1” and “intent2” with respective entities “entity1” and “entity2” with values “1234” and “5432” respectively. so the correct output should be intent1:{entities:[“entity1”=“1234”]} intent2:{entities:[“entity2”=“5432”]} but instead it comes out be intent1:{entities:[“entity1”=“5432”] or intent1:{entities:[“entity2”=“1234”]} How can I resolve this? I have looked into domain.yaml but that is for rasa core…furthermore can this be resolved by using custom component… This is my pipeline language: “en_core_web_md” pipeline:

  • name: “SpacyNLP”
  • name: “SpacyTokenizer”
  • name: “SpacyFeaturizer”
  • name: “CRFEntityExtractor”
  • name: “SklearnIntentClassifier”

Hi @GTroxx,

It could be that your entities are too similar. There is a discussion and some suggestions in this forum post: Similar Entity Extraction

Would you be able to share an example of your training data on the forum or perhaps through github? That would allow for a more detailed evaluation of your issue.

here is my sample training data for get disk

    "text": "77      Virtual HD                                                                                                   Healthy              Online                       500 GB MBR       ",
    "intent": "getDisks",
    "entities": [
      {
        "start": 0,
        "end": 2,
        "value": "77",
        "entity": "diskNumber"
      },
      {
        "start": 8,
        "end": 18,
        "value": "Virtual HD",
        "entity": "friendlyName"
      },
      {
        "start": 117,
        "end": 124,
        "value": "Healthy",
        "entity": "diskHealthStatus"
      },
      {
        "start": 138,
        "end": 144,
        "value": "Online",
        "entity": "diskOperationalStatus"
      },
      {
        "start": 167,
        "end": 173,
        "value": "500 GB",
        "entity": "diskSize"
      },
      {
        "start": 174,
        "end": 177,
        "value": "MBR",
        "entity": "partitionType"
      }
    ]
  },

and for get process

“text”: “2532 94 0.03125 0.001608712 conhost”,

    "intent": "getProcess",
    "entities": [
      {
        "start": 0,
        "end": 4,
        "value": "2532",
        "entity": "processID"
      },
      {
        "start": 10,
        "end": 12,
        "value": "94",
        "entity": "processHandles"
      },
      {
        "start": 14,
        "end": 21,
        "value": "0.03125",
        "entity": "cpu(%)"
      },
      {
        "start": 23,
        "end": 34,
        "value": "0.001608712",
        "entity": "memory(%)"
      },
      {
        "start": 35,
        "end": 42,
        "value": "conhost",
        "entity": "processName"
      }
    ]
  },

it’s confusing between disknumber and processid

hey so I have already shared my training data… I was wondering that would I be able to solve this problem by using domains.yml of Rasa Core where I mention which entities to use for what intent. which will depend on the process of entity value and name mapping so if I mentioned in my domain

intents:

- getProcess:
     use_entities: 
        -processID
- getDisk:
        use_entities:
            -diskNumber

Can I use rasa core only for custom outputs cause i don’t need the dialogue engine.

Hi @GTroxx,

I was thinking that for your use case it might be better not to use entity extraction to get these values.

Instead I recommend to use a custom action that extracts the values from the string, and then store the extracted values in slots.