question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle custom fields from an NLU Message

See original GitHub issue

A forum user (post) brought up a good point that at the moment if you build a custom NLU component, you have to put any additional information (like sentiment) into the entities key of the Message for the formation to be passed onto the dialogue manager.

A sentiment component right now should return output like this:

{ ‘intent’:

{ ‘name’:‘greet’, ‘confidence’:0.44503513568867775 }

, ‘entities’:[

{ ‘value’:‘neg’, ‘confidence’:0.9933702940854111, ‘entity’:‘sentiment’, ‘extractor’:‘sentiment_extractor’ }

}

It would be more intuitive to have this information in a separate field since sentiment isn’t really an entity:

{ “intent”:

{ “name”: “foo”, “confidence”: 0.1234567890 }

, “entities”: [], “sentiment”: [

{ “value”: “NEUTRAL”, “score”: 0.123, “confidence”: 0.897 }

], }

On the NLU side the Message class would already allow this extra field (only on the master branch of rasa though) - see here. But I’m not sure whether the dialogue manager will handle that properly.

@degiz said he would look into this when he’s back from vacation

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
degizcommented, Mar 17, 2022

Exalate commented:

degiz commented:

@mjaycub added the low one for now, doesn’t seem to be burning.

1reaction
akeladcommented, Mar 17, 2022

Exalate commented:

akelad commented:

So what I meant in this situation is that UserMessage (from the channel definition, which is the one that gets put in the tracker) actually has a metadata field at the moment. But the tracker.latest_message method doesn’t even let you access that right now, only the parse data. That’s actually a separate issue as well, that to access any metadata you assign there you have to iterate through the tracker events.

But yeah so what I’m saying is that we use a key like metadata, where users could provide extra NLU attributes. And I guess that would then be accessible from tracker.latest_message.get("metadata"). Or we actually fill the UserMessage metadata field with that as well, kind of depends.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tuning Your NLU Model - Rasa
In Rasa, incoming messages are processed by a sequence of components. ... or to do sentiment analysis, check out Custom NLU Components.
Read more >
Solved: Re: Help writing custom fields from Idea Portal - ServiceNow ...
I have created a custom string field ("u_test") on my table and am trying to test modifying the ... _fields.category.config" category-label="data.messages.
Read more >
Personalizing Messages Using Custom Fields
With Custom Fields, you can easily manage customer data and leverage it to create personalized text message campaigns.
Read more >
Creating Mix.dialog Applications
Click COFFEE_TYPE in the list of custom entities. Expand the Advanced settings section. Panel nlu entities advanced settings; Use the fields at the...
Read more >
Send group message - UiPath Documentation Portal
SendGroupMessage Sends a group message in Cisco Webex Teams. In the Body of the Activity The ... Manage Text Automation ... Create Template...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found