Skip to content

Commit

Permalink
Better error message for hallucinations threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
stomanin committed Apr 19, 2024
1 parent 6824615 commit a40fb7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion medmind.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def vectara_hallucination_evaluation_model(text):
hallucination_score = vectara_hallucination_evaluation_model(response_text)
HIGH_HALLUCINATION_THRESHOLD = 0.9
if hallucination_score > HIGH_HALLUCINATION_THRESHOLD:
response_text = "I'm still under development and learning. I cannot confidently answer this question yet."
response_text = "I'm still under development and learning. I cannot confidently answer this question yet. (The generated response has exceeded the Hallucination threshold from the Vectara Hallucination Evaluation Model)"

except Exception as e:
print(f"Error in chatbot: {e}")
Expand Down

0 comments on commit a40fb7d

Please sign in to comment.