Does RASA NLU support entity list extraction?

For example, users will ask “show me chinese, mexican and japanese restaurants.” It should extract

"entities": [
  {
    "value": ["chinese", "mexican", "japanese"],
    "entity": "cuisine"
  }
]

Or, users may ask “show me the flights from San Francisco to New York or Miami.”

Also, does RASA support adjective extraction? For example, users may ask “show me popular, closer and open restaurants.”

Hello @howard123. Yes, rasa supports list entity extraction. You can read more about it in the documentation here: Slot Types

@Juste, @howard123 So in your NLU file for this training example, how did you tag the extraction of the list value? Was it like shown below?

- show me [chinese, mexican and japanese](cuisine:["chinese","mexican","japanese"]) restaurants.

Hi @ganeshv. You should label each entity in your NLU examples for example:

Show me [chinese](cuisine), [mexican](cuisine) and [japansese](cuisine) restaurants.

To enable your assistant to extract these details as a list slot, define this slot in your domain, for example:

slots:
  cuisine:
    type: list

Then, when predicting on unseen inputs, for example I would like to get the list of chinese, mexican and japanese restaurants the model will extract all identified cuisine entities as a list [chinese, mexican, japanese].

1 Like

It works like a charm!

  • I would like to use that with a form. Is it ok to not use the type “unfeaturized”?
  • I would also use it with buttons, but that’s more a front end issue.

Thanks to rasa dev and communauty for that amazing work!

1 Like

Thank you @Juste! I was able to confirm through a bit of trial and error (posted my findings in another post here - How to annotate a list and combination logic in the training examples?). Seemed like the most intuitive thing to do and you pretty much confirmed that this is the way to do it. :slight_smile:

1 Like