midrees2806 commited on
Commit
9e69b9a
Β·
verified Β·
1 Parent(s): 0c0a9b1

Update rag.py

Browse files
Files changed (1) hide show
  1. rag.py +3 -0
rag.py CHANGED
@@ -72,6 +72,9 @@ def get_best_answer(user_input):
72
  return "Please enter a valid question."
73
  user_input_lower = user_input.lower().strip()
74
 
 
 
 
75
  # πŸ‘‰ Check if question is about fee
76
  if any(keyword in user_input_lower for keyword in ["fee structure", "fees structure"]):
77
  return (
 
72
  return "Please enter a valid question."
73
  user_input_lower = user_input.lower().strip()
74
 
75
+ if len(user_input_lower.split()) < 3:
76
+ return "Please ask your question properly with at least 3 words."
77
+
78
  # πŸ‘‰ Check if question is about fee
79
  if any(keyword in user_input_lower for keyword in ["fee structure", "fees structure"]):
80
  return (