Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentiment values not being set for None / Unknown intent #5837

Closed
2 of 8 tasks
bradrlaw opened this issue Aug 12, 2021 · 0 comments · Fixed by #6348
Closed
2 of 8 tasks

Sentiment values not being set for None / Unknown intent #5837

bradrlaw opened this issue Aug 12, 2021 · 0 comments · Fixed by #6348
Assignees
Labels
Area: AI-LUIS The issue is related to LUIS needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@bradrlaw
Copy link
Member

Describe the bug

When looking at sentiment for the utterances the user has entered, we can use the turn.recognized.sentiment.score to get the last sentiment value. However, when the none intent is triggered, the sentiment block is not set.

Version

Version: 2.1.0
Electron: 8.2.4
Chrome: 80.0.3987.165
NodeJS: 12.13.0
V8: 8.0.426.27-electron.0

Browser

  • Electron distribution
  • Chrome
  • Safari
  • Firefox
  • Edge

OS

  • macOS
  • Windows
  • Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Enter an utterance that should trigger the none intent
  2. Investigate / watch the turn.recognized object
  3. See that not sentiment block is set, even though LUIS has returned the sentiment.

Expected behavior

Expect that the sentiment block will be set when the none intent is triggered so that the sentiment can be tracked for all utterances.

Screenshots

Additional context

Here is the LUIS trace:

{
  "activity": {
    "type": "trace",
    "timestamp": "2021-08-12T15:24:55.133Z",
    "serviceUrl": "http://localhost:5000",
    "channelId": "emulator",
    "from": {
      "id": "XXXXXXXXXXXXX",
      "name": "Bot",
      "role": "bot"
    },
    "conversation": {
      "id": "XXXXXXXXXXXX"
    },
    "recipient": {
      "id": "XXXXXXXXXXXXXX",
      "role": "user"
    },
    "locale": "en-us",
    "replyToId": "XXXXXXXXXXXXXx",
    "label": "LuisV3 Trace",
    "valueType": "https://www.luis.ai/schemas/trace",
    "value": {
      "recognizerResult": {
        "text": "buy a pizza",
        "alteredText": null,
        "intents": {
          "None": {
            "score": 0.5878249
          }
        },
        "entities": {},
        "sentiment": {
          "label": "neutral",
          "score": 0.5
        }
      },
      "luisModel": {
        "ModelID": "XXXXXXXXXXXX"
      },
      "luisOptions": {
        "IncludeAllIntents": false,
        "IncludeInstanceData": false,
        "IncludeAPIResults": false,
        "Log": true,
        "DynamicLists": null,
        "ExternalEntities": null,
        "PreferExternalEntities": true,
        "DateTimeReference": null,
        "Slot": "production",
        "Version": null
      },
      "luisResult": {
        "query": "buy a pizza",
        "prediction": {
          "topIntent": "None",
          "intents": {
            "None": {
              "score": 0.5878249
            }
          },
          "entities": {},
          "sentiment": {
            "label": "neutral",
            "score": 0.5
          }
        }
      }
    },
    "name": "LuisRecognizer",
    "id": "XXXXXXXXXXXXXXx",
    "localTimestamp": "2021-08-12T11:24:55-04:00"
  },
  "id": "XXXXXXXXXXXXX",
  "timestamp": 1628781895133
}

Here is the turn object in Composer missing the sentiment block for the above LUIS result:
{
  "locale": "en-us",
  "activity": {
    "type": "message",
    "id": "XXXXXXXXXXXXXXXX",
    "timestamp": "2021-08-12T15:24:54.493Z",
    "localTimestamp": "2021-08-12T15:24:54Z",
    "localTimezone": "America/New_York",
    "serviceUrl": "http://localhost:5000",
    "channelId": "emulator",
    "from": {
      "id": "XXXXXXXXXXXXXXX",
      "name": "",
      "role": "user"
    },
    "conversation": {
      "id": "XXXXXXXXXXXXXXX"
    },
    "recipient": {
      "id": "XXXXXXXXXXXXXXXX",
      "name": "Bot",
      "role": "bot"
    },
    "textFormat": "plain",
    "locale": "en-us",
    "text": "buy a pizza",
    "channelData": {
      "clientActivityID": "XXXXXXXXXXXXXXXXX",
      "clientTimestamp": "2021-08-12T15:24:54.466Z"
    }
  },
  "dialogEvent": {
    "Bubble": false,
    "Name": "unknownIntent",
    "Value": null
  },
  "recognized": {
    "text": "buy a pizza",
    "alteredText": null,
    "intents": {
      "None": {
        "score": 1
      }
    },
    "entities": {
      "$instance": {}
    },
    "intent": "None",
    "score": 1
  },
  "interrupted": true
}
@cwhitten cwhitten transferred this issue from microsoft/BotFramework-Composer Aug 12, 2021
@mrivera-ms mrivera-ms added needs-triage The issue has just been created and it has not been reviewed by the team. Area: AI-LUIS The issue is related to LUIS labels Aug 25, 2021
gabog pushed a commit that referenced this issue Jun 8, 2022
…6348)

* Add properties to RecognizerResult

* Add unit tests for missing properties in RecognizerResult
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: AI-LUIS The issue is related to LUIS needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants