mgbam commited on
Commit
4955e3a
·
verified ·
1 Parent(s): b0646e5

Update modules/prompts.py

Browse files
Files changed (1) hide show
  1. modules/prompts.py +11 -9
modules/prompts.py CHANGED
@@ -1,8 +1,8 @@
1
  # modules/prompts.py
2
  """
3
  Central repository for all Gemini prompt engineering.
4
- (v2.0 - The "Clinical Insight Engine" Upgrade)
5
- This version establishes a new "Clinical Information Scientist" persona and
6
  channels the AI's safety impulse into a useful, actionable guidance section.
7
  """
8
 
@@ -38,10 +38,14 @@ def get_term_extraction_prompt(user_text: str) -> str:
38
  """
39
 
40
 
41
- # ==============================================================================
42
- # V2.0 UPGRADE: The Symptom Synthesis prompt creates a "Clinical Information Scientist"
43
- # ==============================================================================
44
  def get_synthesis_prompt(user_query: str, concepts: list, pubmed_data: str, trials_data: str, fda_data: str, vision_analysis: str = "") -> str:
 
 
 
 
 
 
 
45
  return f"""
46
  You are Asclepius, a Clinical Information Scientist AI. Your task is to synthesize raw data from public health databases into an insightful, human-readable narrative. You will then provide actionable guidance on how to discuss these findings with a doctor.
47
 
@@ -67,7 +71,7 @@ def get_synthesis_prompt(user_query: str, concepts: list, pubmed_data: str, tria
67
  (Summarize any relevant data from OpenFDA.)
68
  {fda_data if fda_data else "No specific adverse event data was found for this query."}
69
 
70
- {f"## Analysis of Uploaded Image\\n{vision_analysis}" if vision_analysis else ""}
71
 
72
  ---
73
 
@@ -77,10 +81,8 @@ def get_synthesis_prompt(user_query: str, concepts: list, pubmed_data: str, tria
77
  **Begin your report now.**
78
  """
79
 
80
- # ==============================================================================
81
- # V2.0 UPGRADE: The Drug Interaction prompt creates a "Clinical Pharmacist AI"
82
- # ==============================================================================
83
  def get_drug_interaction_synthesis_prompt(drug_names: list[str], interaction_data: str, safety_data: str) -> str:
 
84
  return f"""
85
  You are a Clinical Pharmacist AI. Your task is to transform raw drug data into a clear, executive safety briefing. You will conclude with actionable guidance for the user.
86
 
 
1
  # modules/prompts.py
2
  """
3
  Central repository for all Gemini prompt engineering.
4
+ (v2.1 - SyntaxError Hotfix)
5
+ This version establishes a "Clinical Information Scientist" persona and
6
  channels the AI's safety impulse into a useful, actionable guidance section.
7
  """
8
 
 
38
  """
39
 
40
 
 
 
 
41
  def get_synthesis_prompt(user_query: str, concepts: list, pubmed_data: str, trials_data: str, fda_data: str, vision_analysis: str = "") -> str:
42
+ """(v2.0) Creates a "Clinical Information Scientist" persona."""
43
+
44
+ # ==============================================================================
45
+ # THIS IS THE PERMANENT FIX FOR THE SYNTAX ERROR.
46
+ vision_section = f"## Analysis of Uploaded Image\n{vision_analysis}" if vision_analysis else ""
47
+ # ==============================================================================
48
+
49
  return f"""
50
  You are Asclepius, a Clinical Information Scientist AI. Your task is to synthesize raw data from public health databases into an insightful, human-readable narrative. You will then provide actionable guidance on how to discuss these findings with a doctor.
51
 
 
71
  (Summarize any relevant data from OpenFDA.)
72
  {fda_data if fda_data else "No specific adverse event data was found for this query."}
73
 
74
+ {vision_section}
75
 
76
  ---
77
 
 
81
  **Begin your report now.**
82
  """
83
 
 
 
 
84
  def get_drug_interaction_synthesis_prompt(drug_names: list[str], interaction_data: str, safety_data: str) -> str:
85
+ """(v2.0) Creates a "Clinical Pharmacist AI" persona."""
86
  return f"""
87
  You are a Clinical Pharmacist AI. Your task is to transform raw drug data into a clear, executive safety briefing. You will conclude with actionable guidance for the user.
88