Filling list slot with in loop until

I am using RASA 3.1 version.

I have a list slot called symptoms which I need to filled by asking user the symptoms they are observing. User may not enter all the symptoms in one go and bot may need to ask the user if they have entered all the symptoms or not. Once user confirms that all the symptoms are entered, boot is supposed to do next action.

How can I collect multiple symptoms in a loop. I think will be have to use form but I am not able to think of how to make it loop until user has no symptoms to inform. Can someone help me here, please.

Regards, Vishesh

I think, at the beginning user don’t realize all the symptoms. So during the chat, he can come up with more symptoms. I also think, you should use a form to collect the needed data, including the symptoms.

standard behavior
Just make theConversational agent ask for all the slots
User is free either to answer the questions the CA asks, one after another. Or user gives the data conform his own sequence.

So could be, he already gives more than only one symptom

extra behavior_ When all slots have been filled, either present the symptom list user already has given, and ask the user if he wants to add more symptoms.

Or present present all the collected data and ask if the user wants to add symptoms to the data or change any value.

Some more tips

  1. The conversational agent could help user. f.e.one symtom triggers CA to ask “could it be that …” Although this could trigger the user to mention symptoms that are irrelevant or even wrong.
  2. You could consider writing a custom action, after eacht symptom, ask if user has more symptoms.
  3. As far as I know, you have to write your custom action to fill a list slot anyway

I just want to say that Each time you read a line, you assign it to all of the elements of word. This is why word only ends up with the last line of the file.