Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update _metric_handler.py for built-in chat flow
* add fallback_groundedness_evaluation node to chat node list
* keep evaluation_per_turn column in output
  • Loading branch information
qusongms committed Mar 22, 2024
commit 27fdf77eb368e495997220f0e71a15d02aef7fee
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

NODE_LIST_BY_TASK = {
"qa": ["gpt_coherence", "gpt_similarity", "gpt_relevance", "gpt_fluency", "gpt_groundedness"],
"chat": ["evaluate_chat_rag", "evaluate_coherence_fluency"],
"chat": ["evaluate_chat_rag", "evaluate_coherence_fluency", "fallback_groundedness_evaluation"],
}


Expand Down Expand Up @@ -136,6 +136,9 @@ def calculate_metrics(self) -> Dict:
if col.replace("outputs.", "").startswith(metric):
is_col_to_delete = False
break
# keep the column "evaluation_per_turn" in the output
if "evaluation_per_turn" in col:
is_col_to_delete = False
if is_col_to_delete:
columns_to_drop.append(col)
result_df.drop(columns_to_drop, axis=1, inplace=True)
Expand Down