Spaces:
Sleeping
Sleeping
Update chat/rag_engine.py
Browse filesbugs fixed related to quote
- chat/rag_engine.py +6 -6
chat/rag_engine.py
CHANGED
|
@@ -503,7 +503,7 @@ class RoleBasedReasoning:
|
|
| 503 |
Query: {query}
|
| 504 |
|
| 505 |
Respond with a friendly greeting and invitation to ask questions. Keep it brief and welcoming.
|
| 506 |
-
Example: "Hello! I'm here to help answer your health questions in simple, clear terms. What would you like to know?"""
|
| 507 |
|
| 508 |
elif role == 'student':
|
| 509 |
return f"""You are teaching a student.
|
|
@@ -511,7 +511,7 @@ Example: "Hello! I'm here to help answer your health questions in simple, clear
|
|
| 511 |
Query: {query}
|
| 512 |
|
| 513 |
Respond with an encouraging greeting that invites learning questions.
|
| 514 |
-
Example: "Hi there! I'm here to help you learn about medical topics. What are you curious about today?"""
|
| 515 |
|
| 516 |
elif role in ['clinician', 'doctor']:
|
| 517 |
return f"""You are assisting a healthcare professional.
|
|
@@ -519,7 +519,7 @@ Example: "Hi there! I'm here to help you learn about medical topics. What are yo
|
|
| 519 |
Query: {query}
|
| 520 |
|
| 521 |
Respond with a professional greeting appropriate for clinical setting.
|
| 522 |
-
Example: "Hello. I'm ready to assist with evidence-based medical information. How can I help you today?"""
|
| 523 |
|
| 524 |
elif role in ['researcher', 'professor']:
|
| 525 |
return f"""You are assisting an academic professional.
|
|
@@ -527,7 +527,7 @@ Example: "Hello. I'm ready to assist with evidence-based medical information. Ho
|
|
| 527 |
Query: {query}
|
| 528 |
|
| 529 |
Respond with a scholarly greeting that invites research questions.
|
| 530 |
-
Example: "Greetings. I'm available to discuss research topics and evidence-based analysis. What would you like to explore?"""
|
| 531 |
|
| 532 |
elif role == 'pharmacist':
|
| 533 |
return f"""You are assisting a pharmacy professional.
|
|
@@ -535,7 +535,7 @@ Example: "Greetings. I'm available to discuss research topics and evidence-based
|
|
| 535 |
Query: {query}
|
| 536 |
|
| 537 |
Respond with a professional greeting focused on medication information.
|
| 538 |
-
Example: "Hello. I can help with medication-related questions and information. How can I assist you today?"""
|
| 539 |
|
| 540 |
else: # general
|
| 541 |
return f"""You are assisting a general user.
|
|
@@ -543,7 +543,7 @@ Example: "Hello. I can help with medication-related questions and information. H
|
|
| 543 |
Query: {query}
|
| 544 |
|
| 545 |
Respond with a friendly, welcoming greeting.
|
| 546 |
-
Example: "Hello! I'm your Medical Research Assistant. I can help with evidence-based information across various specialties. How can I assist you today?"""
|
| 547 |
|
| 548 |
# For substantive queries, use role-appropriate analysis
|
| 549 |
role_prompt = role_info['prompt']
|
|
|
|
| 503 |
Query: {query}
|
| 504 |
|
| 505 |
Respond with a friendly greeting and invitation to ask questions. Keep it brief and welcoming.
|
| 506 |
+
Example: "Hello! I'm here to help answer your health questions in simple, clear terms. What would you like to know?"""
|
| 507 |
|
| 508 |
elif role == 'student':
|
| 509 |
return f"""You are teaching a student.
|
|
|
|
| 511 |
Query: {query}
|
| 512 |
|
| 513 |
Respond with an encouraging greeting that invites learning questions.
|
| 514 |
+
Example: "Hi there! I'm here to help you learn about medical topics. What are you curious about today?"""
|
| 515 |
|
| 516 |
elif role in ['clinician', 'doctor']:
|
| 517 |
return f"""You are assisting a healthcare professional.
|
|
|
|
| 519 |
Query: {query}
|
| 520 |
|
| 521 |
Respond with a professional greeting appropriate for clinical setting.
|
| 522 |
+
Example: "Hello. I'm ready to assist with evidence-based medical information. How can I help you today?"""
|
| 523 |
|
| 524 |
elif role in ['researcher', 'professor']:
|
| 525 |
return f"""You are assisting an academic professional.
|
|
|
|
| 527 |
Query: {query}
|
| 528 |
|
| 529 |
Respond with a scholarly greeting that invites research questions.
|
| 530 |
+
Example: "Greetings. I'm available to discuss research topics and evidence-based analysis. What would you like to explore?"""
|
| 531 |
|
| 532 |
elif role == 'pharmacist':
|
| 533 |
return f"""You are assisting a pharmacy professional.
|
|
|
|
| 535 |
Query: {query}
|
| 536 |
|
| 537 |
Respond with a professional greeting focused on medication information.
|
| 538 |
+
Example: "Hello. I can help with medication-related questions and information. How can I assist you today?"""
|
| 539 |
|
| 540 |
else: # general
|
| 541 |
return f"""You are assisting a general user.
|
|
|
|
| 543 |
Query: {query}
|
| 544 |
|
| 545 |
Respond with a friendly, welcoming greeting.
|
| 546 |
+
Example: "Hello! I'm your Medical Research Assistant. I can help with evidence-based information across various specialties. How can I assist you today?"""
|
| 547 |
|
| 548 |
# For substantive queries, use role-appropriate analysis
|
| 549 |
role_prompt = role_info['prompt']
|