Skip to content

Commit 6420470

Browse files
added code for fixing follow up to tie with previous response
1 parent 3e18ca1 commit 6420470

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed
Binary file not shown.

FASTAPI-DEPLOYMENT/rhl_fastapi_v2_modify.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ async def _background_update_and_save(user_id: str, user_message: str, bot_reply
266266
CLASSIFICATION RULES:
267267
- MEDICAL_QUESTION: any standalone question about medical facts, diagnoses, treatments, NEWBORN CARE, or women's health
268268
- MEDICAL_QUESTION : Even if user asks multiple times about the same MEDICAL TOPIC, it should be considered as a MEDICAL_QUESTION
269-
- FOLLOW_UP: short responses to previous assistant suggestions (yes, sure, prevention please, etc.)
269+
- FOLLOW_UP: short responses to previous assistant suggestions (yes, sure, prevention please, etc.) or followup up symptoms, complications, procedures about previous answwer
270270
- CHITCHAT: greetings, thanks, smalltalk, profanity, non-medical topics, or explicit "stop" requests OR ANYTHING WHICH IS NON-MEDICAL OR NON_FOLLOWUP
271271
272272
REFORMULATION RULES:
@@ -277,6 +277,7 @@ async def _background_update_and_save(user_id: str, user_message: str, bot_reply
277277
- Correct spelling/abbreviations when meaning changes
278278
- Expand medical abbreviations (IUFD -> Intrauterine fetal death)
279279
- Keep rewritten_query concise and medically precise
280+
- If followup is symptoms, complication,procedure pair it with previous answer
280281
281282
EXAMPLES:
282283
@@ -749,6 +750,7 @@ async def _background_update_and_save(user_id: str, user_message: str, bot_reply
749750
"enc 2.pdf": "Essential Newborn Care: Assessment and Continuing Care Provider Guide",
750751
"enc2.pdf": "Essential Newborn Care: Assessment and Continuing Care Provider Guide",
751752
"pee": "Pre-eclampsia & Eclampsia Provider Guide",
753+
"29_jan_morning": "WHO",
752754
"pee.pdf": "Pre-eclampsia & Eclampsia Provider Guide",
753755
"pee 1": "HMBS: Pre-Eclampsia & Eclampsia Medication Table",
754756
"pee1": "HMBS: Pre-Eclampsia & Eclampsia Medication Table",

chat_history.db

4 KB
Binary file not shown.

0 commit comments

Comments
 (0)