Spaces:
Runtime error
Runtime error
Update RAG_utils.py
Browse files- RAG_utils.py +3 -1
RAG_utils.py
CHANGED
@@ -670,6 +670,7 @@ class PDFQueryEngine:
|
|
670 |
total_score = 0
|
671 |
criteria_met = 0
|
672 |
reasoning = []
|
|
|
673 |
|
674 |
for j, query in enumerate(queries):
|
675 |
# Handle special cases based on the value of j and other conditions
|
@@ -691,11 +692,12 @@ class PDFQueryEngine:
|
|
691 |
if extracted_data_score > 0:
|
692 |
criteria_met += 1
|
693 |
reasoning.append(extracted_data["reasoning"])
|
|
|
694 |
total_score += extracted_data_score
|
695 |
|
696 |
score_percentage = (float(total_score) / len(queries)) * 100
|
697 |
logger.info("Evaluation completed.")
|
698 |
-
return total_score, criteria_met, score_percentage, reasoning
|
699 |
|
700 |
|
701 |
|
|
|
670 |
total_score = 0
|
671 |
criteria_met = 0
|
672 |
reasoning = []
|
673 |
+
score_list = []
|
674 |
|
675 |
for j, query in enumerate(queries):
|
676 |
# Handle special cases based on the value of j and other conditions
|
|
|
692 |
if extracted_data_score > 0:
|
693 |
criteria_met += 1
|
694 |
reasoning.append(extracted_data["reasoning"])
|
695 |
+
score_list.append(extracted_data_score)
|
696 |
total_score += extracted_data_score
|
697 |
|
698 |
score_percentage = (float(total_score) / len(queries)) * 100
|
699 |
logger.info("Evaluation completed.")
|
700 |
+
return total_score, criteria_met, score_percentage, score_list, reasoning
|
701 |
|
702 |
|
703 |
|