brahmanarisetty commited on
Commit
e321b00
·
verified ·
1 Parent(s): ed77f6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -56,7 +56,7 @@ qdrant = qdrant_client.QdrantClient(
56
  api_key=QDRANT_API_KEY,
57
  prefer_grpc=False
58
  )
59
- COLLECTION_NAME = "it_support_rag"
60
 
61
  # --- RAG Components Setup ---
62
  device = "cuda" if torch.cuda.is_available() else "cpu"
@@ -166,6 +166,9 @@ generator = pipeline(
166
  # --- Chatbot Logic & Gradio Interface (Improved) ---
167
  SYSTEM_PROMPT = (
168
  "You are a friendly and helpful Level 0 IT Support Assistant. "
 
 
 
169
  "Your purpose is to provide simple, step-by-step solutions for common, entry-level technical issues. "
170
  "Examples of Level 0 issues include: forgotten passwords, basic printer problems, network connectivity checks, or simple software reinstallation. "
171
  "Do not answer questions about booking tickets, Level 1 or Level 2 support, or advanced technical configurations. "
@@ -202,7 +205,7 @@ def chat(query, k, temperature, top_p):
202
  return reply
203
 
204
  words = query.strip().split()
205
- if len(words) < 3:
206
  reply = "Could you provide more detail about what you're experiencing? Any error messages or steps you've tried will help me assist you."
207
  chat_history.append((query, reply))
208
  return reply
 
56
  api_key=QDRANT_API_KEY,
57
  prefer_grpc=False
58
  )
59
+ COLLECTION_NAME = "C2C_RAG"
60
 
61
  # --- RAG Components Setup ---
62
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
166
  # --- Chatbot Logic & Gradio Interface (Improved) ---
167
  SYSTEM_PROMPT = (
168
  "You are a friendly and helpful Level 0 IT Support Assistant. "
169
+ "If the user's question lacks details or clarity, ask a concise follow-up question "
170
+ "to gather the information you need before providing a solution. "
171
+ "Once clarified, then:\n"
172
  "Your purpose is to provide simple, step-by-step solutions for common, entry-level technical issues. "
173
  "Examples of Level 0 issues include: forgotten passwords, basic printer problems, network connectivity checks, or simple software reinstallation. "
174
  "Do not answer questions about booking tickets, Level 1 or Level 2 support, or advanced technical configurations. "
 
205
  return reply
206
 
207
  words = query.strip().split()
208
+ if len(words) < 3 or '?' not in query:
209
  reply = "Could you provide more detail about what you're experiencing? Any error messages or steps you've tried will help me assist you."
210
  chat_history.append((query, reply))
211
  return reply