Replacing the slots filed with form

Hi. I have problem with slot replacing in message filed with the form before. Sometimes works correctly “{slot_name}” will be return right “slot content”, but sometimes returns “[‘slot content’, ‘slot content’]”. I can’t exactly determine influence cases. It does randomly … Rasa 2.4 Example of tracker data:

{
   "name":"4-chat;o5rFnR8bQFCMgmNTUB6O2Ip6RukoFQ7SsrSL5iiisA75k9MhnfTDksUNRBR0;766f229414727713710fa2daa6676f8e3d86317e",
   "events":[
      {
         "action_text":null,
         "confidence":1,
         "name":"action_session_start",
         "event":"action",
         "timestamp":1646911946.162582,
         "policy":null
      },
      {
         "event":"session_started",
         "timestamp":1646911946.1628091
      },
      {
         "action_text":null,
         "confidence":null,
         "name":"action_listen",
         "event":"action",
         "timestamp":1646911946.162887,
         "policy":null
      },
      {
         "name":"last customer message",
         "event":"slot",
         "value":"I want to change the delivery address",
         "timestamp":1646911946
      },
      {
         "input_channel":"rest",
         "metadata":[
            
         ],
         "parse_data":{
            "metadata":[
               
            ],
            "entities":[
               
            ],
            "intent_ranking":[
               {
                  "confidence":0.9872864484786987,
                  "name":"change_delivery_address",
                  "id":-2178559665480064102
               },
               {
                  "confidence":0.006570795085281134,
                  "name":"broken_ice_cream_machine",
                  "id":31975402335019317
               },
               {
                  "confidence":0.0017573883524164557,
                  "name":"elaborate",
                  "id":1542544289260472210
               },
               {
                  "confidence":0.0010771972592920065,
                  "name":"forgotten_password",
                  "id":-7700761986773980760
               },
               {
                  "confidence":0.0009544116910547018,
                  "name":"bot_challenge",
                  "id":5508938074644618334
               },
               {
                  "confidence":0.0009387017926201224,
                  "name":"turn_on_hotspot",
                  "id":-454639427864394666
               },
               {
                  "confidence":0.00046669048606418073,
                  "name":"provide_zip_code",
                  "id":-3293718409895637099
               },
               {
                  "confidence":0.0004444131627678871,
                  "name":"get_customer_card",
                  "id":5679639267606902126
               },
               {
                  "confidence":0.0002603426401037723,
                  "name":"begin_conversation",
                  "id":7941615042413852842
               },
               {
                  "confidence":0.00024358303926419467,
                  "name":"change_phone_number",
                  "id":-3686881372647725522
               }
            ],
            "message_id":"d0e7ccb4fb3149c796dd95aeb85cba04",
            "text":"I want to change the delivery address",
            "intent":{
               "confidence":0.9872864484786987,
               "name":"change_delivery_address",
               "id":-2178559665480064102
            },
            "response_selector":{
               "default":{
                  "response":{
                     "template_name":"utter_None",
                     "response_templates":null,
                     "confidence":0,
                     "responses":null,
                     "id":null,
                     "utter_action":"utter_None",
                     "intent_response_key":null
                  },
                  "ranking":[
                     
                  ]
               },
               "all_retrieval_intents":[
                  
               ]
            }
         },
         "message_id":"d0e7ccb4fb3149c796dd95aeb85cba04",
         "text":"I want to change the delivery address",
         "event":"user",
         "timestamp":1646911946.652697
      },
      {
         "use_text_for_featurization":false,
         "event":"user_featurization",
         "timestamp":1646911946.6691837
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"change_delivery_address",
         "event":"action",
         "timestamp":1646911946.669202,
         "policy":"policy_0_AugmentedMemoizationPolicy"
      },
      {
         "name":"change_delivery_address",
         "event":"active_loop",
         "timestamp":1646911946.6693587
      },
      {
         "name":"requested_slot",
         "event":"slot",
         "value":"phone_number",
         "timestamp":1646911946.669367
      },
      {
         "metadata":{
            "utter_action":"utter_ask_change_delivery_address_phone_number"
         },
         "data":{
            "image":null,
            "buttons":null,
            "attachment":null,
            "elements":null,
            "quick_replies":null,
            "custom":null
         },
         "text":"Could you please provide your phone number ?",
         "event":"bot",
         "timestamp":1646911946.6693714
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"action_listen",
         "event":"action",
         "timestamp":1646911946.681981,
         "policy":"policy_2_RulePolicy"
      },
      {
         "name":"last customer message",
         "event":"slot",
         "value":"123654789",
         "timestamp":1646911951
      },
      {
         "input_channel":"rest",
         "metadata":[
            
         ],
         "parse_data":{
            "metadata":[
               
            ],
            "entities":[
               {
                  "start":0,
                  "extractor":"RegexEntityExtractor",
                  "end":9,
                  "value":"123654789",
                  "entity":"phone_number"
               },
               {
                  "confidence_entity":0.9448188543319702,
                  "start":0,
                  "extractor":"DIETClassifier",
                  "end":9,
                  "value":"123654789",
                  "entity":"US zip code"
               }
            ],
            "intent_ranking":[
               {
                  "confidence":0.8831213116645813,
                  "name":"provide_zip_code",
                  "id":-3293718409895637099
               },
               {
                  "confidence":0.06301435828208923,
                  "name":"inform",
                  "id":-2249192345339288346
               },
               {
                  "confidence":0.022489212453365326,
                  "name":"forgotten_password",
                  "id":-7700761986773980760
               },
               {
                  "confidence":0.007278882432729006,
                  "name":"render_rich_content",
                  "id":-3086225541826733408
               },
               {
                  "confidence":0.006705470383167267,
                  "name":"change_delivery_address",
                  "id":-2178559665480064102
               },
               {
                  "confidence":0.006169444415718317,
                  "name":"bot_challenge",
                  "id":5508938074644618334
               },
               {
                  "confidence":0.003363898489624262,
                  "name":"broken_ice_cream_machine",
                  "id":31975402335019317
               },
               {
                  "confidence":0.003286926541477442,
                  "name":"deny",
                  "id":6883754078560951274
               },
               {
                  "confidence":0.002467397367581725,
                  "name":"turn_on_hotspot",
                  "id":-454639427864394666
               },
               {
                  "confidence":0.0021030502393841743,
                  "name":"affirm",
                  "id":-3387098541671927213
               }
            ],
            "message_id":"f8ed2806b99f431fbed21e8c1e57c8f7",
            "text":"123654789",
            "intent":{
               "confidence":0.8831213116645813,
               "name":"provide_zip_code",
               "id":-3293718409895637099
            },
            "response_selector":{
               "default":{
                  "response":{
                     "template_name":"utter_None",
                     "response_templates":null,
                     "confidence":0,
                     "responses":null,
                     "id":null,
                     "utter_action":"utter_None",
                     "intent_response_key":null
                  },
                  "ranking":[
                     
                  ]
               },
               "all_retrieval_intents":[
                  
               ]
            }
         },
         "message_id":"f8ed2806b99f431fbed21e8c1e57c8f7",
         "text":"123654789",
         "event":"user",
         "timestamp":1646911951.7629993
      },
      {
         "name":"US zip code",
         "event":"slot",
         "value":"123654789",
         "timestamp":1646911951.7630305
      },
      {
         "name":"phone_number",
         "event":"slot",
         "value":"123654789",
         "timestamp":1646911951.7630372
      },
      {
         "use_text_for_featurization":false,
         "event":"user_featurization",
         "timestamp":1646911951.7867923
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"change_delivery_address",
         "event":"action",
         "timestamp":1646911951.7868133,
         "policy":"policy_2_RulePolicy"
      },
      {
         "name":"phone_number",
         "event":"slot",
         "value":"123654789",
         "timestamp":1646911951.7869794
      },
      {
         "name":"requested_slot",
         "event":"slot",
         "value":"email",
         "timestamp":1646911951.7869866
      },
      {
         "metadata":{
            "utter_action":"utter_ask_change_delivery_address_email"
         },
         "data":{
            "image":null,
            "buttons":null,
            "attachment":null,
            "elements":null,
            "quick_replies":null,
            "custom":null
         },
         "text":"I would also need your email please.",
         "event":"bot",
         "timestamp":1646911951.78699
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"action_listen",
         "event":"action",
         "timestamp":1646911951.8026054,
         "policy":"policy_2_RulePolicy"
      },
      {
         "name":"last customer message",
         "event":"slot",
         "value":"name@email.tld",
         "timestamp":1646911962
      },
      {
         "input_channel":"rest",
         "metadata":[
            
         ],
         "parse_data":{
            "metadata":[
               
            ],
            "entities":[
               {
                  "start":0,
                  "extractor":"RegexEntityExtractor",
                  "end":14,
                  "value":"name@email.tld",
                  "entity":"email"
               },
               {
                  "confidence_entity":0.6692137122154236,
                  "start":0,
                  "extractor":"DIETClassifier",
                  "end":14,
                  "value":"name@email.tld",
                  "entity":"email"
               }
            ],
            "intent_ranking":[
               {
                  "confidence":0.9700577259063721,
                  "name":"inform",
                  "id":-2249192345339288346
               },
               {
                  "confidence":0.0070722028613090515,
                  "name":"render_rich_content",
                  "id":-3086225541826733408
               },
               {
                  "confidence":0.004411171656101942,
                  "name":"bot_challenge",
                  "id":5508938074644618334
               },
               {
                  "confidence":0.0037630044389516115,
                  "name":"forgotten_password",
                  "id":-7700761986773980760
               },
               {
                  "confidence":0.00320420041680336,
                  "name":"begin_conversation",
                  "id":7941615042413852842
               },
               {
                  "confidence":0.0031678429804742336,
                  "name":"goodbye",
                  "id":-1352836896246326542
               },
               {
                  "confidence":0.002783191157504916,
                  "name":"provide_invoice_number",
                  "id":785266604143917713
               },
               {
                  "confidence":0.0019141166703775525,
                  "name":"request_living_location",
                  "id":-7808477568155782139
               },
               {
                  "confidence":0.0018406010931357741,
                  "name":"turn_on_hotspot",
                  "id":-454639427864394666
               },
               {
                  "confidence":0.0017859668005257845,
                  "name":"affirm",
                  "id":-3387098541671927213
               }
            ],
            "message_id":"01dc43d9f2d94f0b93cfb231eab4b04a",
            "text":"name@email.tld",
            "intent":{
               "confidence":0.9700577259063721,
               "name":"inform",
               "id":-2249192345339288346
            },
            "response_selector":{
               "default":{
                  "response":{
                     "template_name":"utter_None",
                     "response_templates":null,
                     "confidence":0,
                     "responses":null,
                     "id":null,
                     "utter_action":"utter_None",
                     "intent_response_key":null
                  },
                  "ranking":[
                     
                  ]
               },
               "all_retrieval_intents":[
                  
               ]
            }
         },
         "message_id":"01dc43d9f2d94f0b93cfb231eab4b04a",
         "text":"name@email.tld",
         "event":"user",
         "timestamp":1646911962.156132
      },
      {
         "name":"email",
         "event":"slot",
         "value":"name@email.tld",
         "timestamp":1646911962.1561887
      },
      {
         "use_text_for_featurization":false,
         "event":"user_featurization",
         "timestamp":1646911962.1827157
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"change_delivery_address",
         "event":"action",
         "timestamp":1646911962.1827335,
         "policy":"policy_2_RulePolicy"
      },
      {
         "name":"email",
         "event":"slot",
         "value":[
            "name@email.tld",
            "name@email.tld"
         ],
         "timestamp":1646911962.1828783
      },
      {
         "name":"requested_slot",
         "event":"slot",
         "value":"address",
         "timestamp":1646911962.182885
      },
      {
         "metadata":{
            "utter_action":"utter_ask_change_delivery_address_address"
         },
         "data":{
            "image":null,
            "buttons":null,
            "attachment":null,
            "elements":null,
            "quick_replies":null,
            "custom":null
         },
         "text":"What is the new address ?",
         "event":"bot",
         "timestamp":1646911962.1828885
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"action_listen",
         "event":"action",
         "timestamp":1646911962.2004554,
         "policy":"policy_2_RulePolicy"
      },
      {
         "name":"last customer message",
         "event":"slot",
         "value":"Unknown Street 321",
         "timestamp":1646911974
      },
      {
         "input_channel":"rest",
         "metadata":[
            
         ],
         "parse_data":{
            "metadata":[
               
            ],
            "entities":[
               {
                  "confidence_entity":0.9671446084976196,
                  "start":15,
                  "extractor":"DIETClassifier",
                  "end":18,
                  "value":"321",
                  "entity":"US zip code"
               }
            ],
            "intent_ranking":[
               {
                  "confidence":0.7742953300476074,
                  "name":"provide_zip_code",
                  "id":-3293718409895637099
               },
               {
                  "confidence":0.04380479454994202,
                  "name":"inform",
                  "id":-2249192345339288346
               },
               {
                  "confidence":0.03752373531460762,
                  "name":"deny",
                  "id":6883754078560951274
               },
               {
                  "confidence":0.03074674867093563,
                  "name":"forgotten_password",
                  "id":-7700761986773980760
               },
               {
                  "confidence":0.024891171604394913,
                  "name":"thanks",
                  "id":7056127221409343148
               },
               {
                  "confidence":0.024101773276925087,
                  "name":"change_delivery_address",
                  "id":-2178559665480064102
               },
               {
                  "confidence":0.01825825311243534,
                  "name":"network_outage",
                  "id":5260776182169938489
               },
               {
                  "confidence":0.015744565054774284,
                  "name":"search_expert",
                  "id":-6414400310525439534
               },
               {
                  "confidence":0.015597171150147915,
                  "name":"get_weather",
                  "id":-4423085993281095323
               },
               {
                  "confidence":0.015036488883197308,
                  "name":"affirm",
                  "id":-3387098541671927213
               }
            ],
            "message_id":"bc1f6502e56548da968fd8d4c7686bf3",
            "text":"Unknown Street 321",
            "intent":{
               "confidence":0.7742953300476074,
               "name":"provide_zip_code",
               "id":-3293718409895637099
            },
            "response_selector":{
               "default":{
                  "response":{
                     "template_name":"utter_None",
                     "response_templates":null,
                     "confidence":0,
                     "responses":null,
                     "id":null,
                     "utter_action":"utter_None",
                     "intent_response_key":null
                  },
                  "ranking":[
                     
                  ]
               },
               "all_retrieval_intents":[
                  
               ]
            }
         },
         "message_id":"bc1f6502e56548da968fd8d4c7686bf3",
         "text":"Unknown Street 321",
         "event":"user",
         "timestamp":1646911974.8766115
      },
      {
         "name":"US zip code",
         "event":"slot",
         "value":"321",
         "timestamp":1646911974.876642
      },
      {
         "use_text_for_featurization":false,
         "event":"user_featurization",
         "timestamp":1646911974.8999434
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"change_delivery_address",
         "event":"action",
         "timestamp":1646911974.8999703,
         "policy":"policy_2_RulePolicy"
      },
      {
         "name":"address",
         "event":"slot",
         "value":"Unknown Street 321",
         "timestamp":1646911974.900198
      },
      {
         "name":"requested_slot",
         "event":"slot",
         "value":"additional_notes",
         "timestamp":1646911974.900209
      },
      {
         "metadata":{
            "utter_action":"utter_ask_change_delivery_address_additional_notes"
         },
         "data":{
            "image":null,
            "buttons":null,
            "attachment":null,
            "elements":null,
            "quick_replies":null,
            "custom":null
         },
         "text":"Any additional requests ?",
         "event":"bot",
         "timestamp":1646911974.9002144
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"action_listen",
         "event":"action",
         "timestamp":1646911974.9179842,
         "policy":"policy_2_RulePolicy"
      },
      {
         "name":"last customer message",
         "event":"slot",
         "value":"I need nothing",
         "timestamp":1646911991
      },
      {
         "input_channel":"rest",
         "metadata":[
            
         ],
         "parse_data":{
            "metadata":[
               
            ],
            "entities":[
               
            ],
            "intent_ranking":[
               {
                  "confidence":0.6621188223361969,
                  "name":"nlu_fallback"
               },
               {
                  "confidence":0.3378811776638031,
                  "name":"deny",
                  "id":6883754078560951274
               },
               {
                  "confidence":0.21888373792171478,
                  "name":"roaming",
                  "id":-1944451321698490094
               },
               {
                  "confidence":0.1640712469816208,
                  "name":"data_usage",
                  "id":-4478345098715914764
               },
               {
                  "confidence":0.060994990170001984,
                  "name":"roaming+e-sim",
                  "id":2529908527015565539
               },
               {
                  "confidence":0.04973551258444786,
                  "name":"network_outage",
                  "id":5260776182169938489
               },
               {
                  "confidence":0.04569706320762634,
                  "name":"stop",
                  "id":-6035140867579868534
               },
               {
                  "confidence":0.04236811399459839,
                  "name":"bot_skills",
                  "id":-9171784036837779835
               },
               {
                  "confidence":0.029207173734903336,
                  "name":"search_expert",
                  "id":-6414400310525439534
               },
               {
                  "confidence":0.027966542169451714,
                  "name":"affirm",
                  "id":-3387098541671927213
               },
               {
                  "confidence":0.02319442667067051,
                  "name":"thanks",
                  "id":7056127221409343148
               }
            ],
            "message_id":"1ac772ff7eea47068056fad4d4caec50",
            "text":"I need nothing",
            "intent":{
               "confidence":0.6621188223361969,
               "name":"nlu_fallback"
            },
            "response_selector":{
               "default":{
                  "response":{
                     "template_name":"utter_None",
                     "response_templates":null,
                     "confidence":0,
                     "responses":null,
                     "id":null,
                     "utter_action":"utter_None",
                     "intent_response_key":null
                  },
                  "ranking":[
                     
                  ]
               },
               "all_retrieval_intents":[
                  
               ]
            }
         },
         "message_id":"1ac772ff7eea47068056fad4d4caec50",
         "text":"I need nothing",
         "event":"user",
         "timestamp":1646911991.092327
      },
      {
         "use_text_for_featurization":false,
         "event":"user_featurization",
         "timestamp":1646911991.1148372
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"change_delivery_address",
         "event":"action",
         "timestamp":1646911991.1148608,
         "policy":"policy_2_RulePolicy"
      },
      {
         "name":"additional_notes",
         "event":"slot",
         "value":"I need nothing",
         "timestamp":1646911991.1149795
      },
      {
         "name":"requested_slot",
         "event":"slot",
         "value":null,
         "timestamp":1646911991.1149898
      },
      {
         "name":null,
         "event":"active_loop",
         "timestamp":1646911991.1149955
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"utter_e6a462aeb9e5c6795e47d06ffbce7c6989bccdeb",
         "event":"action",
         "timestamp":1646911991.13458,
         "policy":"policy_2_RulePolicy"
      },
      {
         "metadata":{
            "utter_action":"utter_e6a462aeb9e5c6795e47d06ffbce7c6989bccdeb"
         },
         "data":{
            "image":null,
            "buttons":null,
            "attachment":null,
            "elements":null,
            "quick_replies":null,
            "custom":null
         },
         "text":"Summary:\nEmail - ['name@email.tld', 'name@email.tld']\nPhone - 123654789\nAddress - Unknown Street 321\nNote - I need nothing",
         "event":"bot",
         "timestamp":1646911991.1347713
      },
      {
         "action_text":null,
         "confidence":1,
         "name":"action_listen",
         "event":"action",
         "timestamp":1646911991.154525,
         "policy":"policy_2_RulePolicy"
      }
   ]
}
1 Like

Hi Rasa Team, I am unfortunately experiencing the same issue :confused:. After the form is done, I am trying to summarize the collected data to a customer, but the data are always rendered in different formats unpredictably. Sometimes the same data are array and next time it is string.

I am using Rasa 2.4. Any idea what may cause the issue or how to resolve it? Many thanks.