List Slot is returning a STRING, but not a list

Hi there, I am trying to extract every single entity out individually from a user’s input.

Input: Hi rasa, please show me a report for dimensions, values, image Expected output: [“dimensions”, “values”, “image”]

However, it is giving me: [“dimensions**,** thumbnail**,** values”]

My nlu.md looks like this:

intent:find_report

  • I would like to know a report that shows objects information?
  • is there a report for object tombstone information?
  • can you tell me which report to use if I want to see objects values
  • please give me a report for [dims]{“entity”: “content”, “role”: “object”}, [values]{“entity”: “content”, “role”: “object”}, [thumbnail]{“entity”: “content”, “role”: “object”}

The entity “content” is set as List Slot.

My question is how to separate the comma-ed elements to list of items…using rasa-ic way?

Thanks!

do one thing, add this in your nlu.md file. then check weather you are getting expected output or not. you can also extract [report] entity if you want.

and also check that you are not using synonyms image->thumbnail

once your slot is set i.e. content= [“dimensions”, “values”, “image”]

in your actions.py file you can separate the comma-ed elements to list of items

Thanks for your feedback Paras.

Unfortunately it doesn’t work. I put your sentence in nlu.md, trained rasa, then typed the exact same sentence in rasa shell. It is still giving me [‘dimensions, values, image’]

An interesting point to add is that if I say “…a report for dimensions and values and image”, it knows how to separate them to 3 items.

It turns out the problem is all about the pipeline.

I was using “Whitespace Tokenizer” by default. It was changed to “Spacy tokenizer” and rasa finally knows to train properly.

This also explains why using “dimensions and values and image” works and “dimensions, values, image” doesn’t