Zekun Wu commited on
Commit
491fd45
1 Parent(s): da04c4f
Files changed (1) hide show
  1. util/evaluator.py +5 -0
util/evaluator.py CHANGED
@@ -79,6 +79,11 @@ class evaluator:
79
  def write_evaluation_commentary(scores):
80
  evaluation_details = []
81
  for principle, score in scores.items():
 
 
 
 
 
82
  if principle == "Factually Correct":
83
  if score >= 0.8:
84
  comment = "Excellent accuracy! The information is precise and directly relevant to the question."
 
79
  def write_evaluation_commentary(scores):
80
  evaluation_details = []
81
  for principle, score in scores.items():
82
+
83
+ if score == -1:
84
+ evaluation_details.append({'Principle': principle, 'Score': score, 'Commentary': 'Failed to evaluate the explanation.'})
85
+ continue
86
+
87
  if principle == "Factually Correct":
88
  if score >= 0.8:
89
  comment = "Excellent accuracy! The information is precise and directly relevant to the question."