docstr: Args:
      generated_slots: list of list of strings. 
          Each string is slot-name and slot-value pair e.g. location(Seattle)
      ground_truth_slots: list of list of strings
docstr_tok: ["Args",":","generated_slots",":","list","of","list","of","strings",".","Each","string","is","slot-name","and","slot-value","pair","e.g",".","location","(","Seattle",")","ground_truth_slots",":","list","of","list","of","strings"]
code: def get_slot_filling_metrics(generated_slots, ground_truth_slots):
      """
      Args:
          generated_slots: list of list of strings.
              Each string is slot-name and slot-value pair e.g. location(Seattle)
          ground_truth_slots: list of list of strings
      """
      all_recall = []
      all_precision = []
      all_joint_goal_accuracy = []
  
      for i in range(len(generated_slots)):
          # depulicate and sort
          ground_truth = sorted(list(set(ground_truth_slots[i])))
          predicted = sorted(list(set(generated_slots[i])))
          correct = [item for item in predicted if item in ground_truth]
          recall = (
              len(correct) / len(ground_truth)
              if len(ground_truth) > 0
              else 0
          )
          precision = (
              len(correct) / len(predicted) if len(predicted) > 0 else 0
          )
          joint_goal_accuracy = int(ground_truth == predicted)
          all_recall.append(recall)
          all_precision.append(precision)
          all_joint_goal_accuracy.append(joint_goal_accuracy)
  
      avg_joint_goal_accuracy = np.mean(all_joint_goal_accuracy) * 100
      avg_precision = np.mean(all_precision) * 100
      avg_recall = np.mean(all_recall) * 100
      avg_f1 = (
          2
          * (avg_recall * avg_precision)
          / (avg_recall + avg_precision + 1e-20)
      )
  
      return avg_precision, avg_recall, avg_f1, avg_joint_goal_accuracy
  
file_path: NeMo/nemo/collections/nlp/metrics/dialogue_metrics.py
imports: import json
  from collections import Counter
  import numpy
  from sacrebleu import corpus_bleu
label_desc: Use image node_id 3 for calling the DialogueClassificationMetrics obj's underlying member method code with example usage: obj.get_slot_filling_metrics(generated_slots, ground_truth_slots) and returns: avg_precision,  avg_recall,  avg_f1,  avg_joint_goal_accuracy