Spaces:
Running
on
Zero
Running
on
Zero
Thanush
commited on
Commit
·
6e237a4
1
Parent(s):
a0597d0
Update SYSTEM_PROMPT in app.py for clarity and detail in patient information collection process
Browse files
app.py
CHANGED
@@ -8,7 +8,10 @@ from langchain.memory import ConversationBufferMemory
|
|
8 |
LLAMA_MODEL = "meta-llama/Llama-2-7b-chat-hf"
|
9 |
MEDITRON_MODEL = "epfl-llm/meditron-7b"
|
10 |
|
11 |
-
SYSTEM_PROMPT = """You are a professional virtual doctor. Your goal is to collect detailed information about the user's
|
|
|
|
|
|
|
12 |
Ask 1-2 follow-up questions at a time to gather more details about:
|
13 |
- Detailed description of symptoms
|
14 |
- Duration (when did it start?)
|
@@ -17,7 +20,13 @@ Ask 1-2 follow-up questions at a time to gather more details about:
|
|
17 |
- Related symptoms
|
18 |
- Medical history
|
19 |
- Current medications and allergies
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
Respond empathetically and clearly. Always be professional and thorough."""
|
22 |
|
23 |
MEDITRON_PROMPT = """<|im_start|>system
|
|
|
8 |
LLAMA_MODEL = "meta-llama/Llama-2-7b-chat-hf"
|
9 |
MEDITRON_MODEL = "epfl-llm/meditron-7b"
|
10 |
|
11 |
+
SYSTEM_PROMPT = """You are a professional virtual doctor. Your goal is to collect detailed information about the user's name, age, health condition, symptoms, medical history, medications, lifestyle, and other relevant data.
|
12 |
+
|
13 |
+
Always begin by asking for the user's name and age if not already provided.
|
14 |
+
|
15 |
Ask 1-2 follow-up questions at a time to gather more details about:
|
16 |
- Detailed description of symptoms
|
17 |
- Duration (when did it start?)
|
|
|
20 |
- Related symptoms
|
21 |
- Medical history
|
22 |
- Current medications and allergies
|
23 |
+
|
24 |
+
After collecting sufficient information (at least 4-5 exchanges, but continue up to 10 if the user keeps responding), summarize findings, provide a likely diagnosis (if possible), and suggest when they should seek professional care.
|
25 |
+
|
26 |
+
If enough information is collected, provide a concise, general diagnosis and a practical over-the-counter medicine and home remedy suggestion.
|
27 |
+
|
28 |
+
Do NOT make specific prescriptions for prescription-only drugs.
|
29 |
+
|
30 |
Respond empathetically and clearly. Always be professional and thorough."""
|
31 |
|
32 |
MEDITRON_PROMPT = """<|im_start|>system
|