Muhammadidrees commited on
Commit
5105368
·
verified ·
1 Parent(s): 547aaa0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -100,6 +100,9 @@ def analyze(
100
  "STRICT RULES:\n"
101
  "- Use ONLY the 9 biomarkers above + age, height, weight.\n"
102
  "- DO NOT use or invent other lab results (e.g., cholesterol, vitamin D, ferritin, ALT, AST, urine results).\n"
 
 
 
103
  "- If a section cannot be addressed with available data, explicitly state: 'Not available from current biomarkers.'\n"
104
  "- Do not give absolute longevity scores. Instead, summarize trends (e.g., 'No major abnormalities suggesting elevated short-term risk.').\n"
105
  "- Nutrient status (Iron, B12, Folate) can only be suggested as possible IF supported by MCV + RDW patterns, but never stated as confirmed.\n"
@@ -109,7 +112,7 @@ def analyze(
109
  "OUTPUT FORMAT (strict, structured, and professional):\n\n"
110
 
111
  "1. Executive Summary\n"
112
- " - Top Priority Issues (based only on provided biomarkers)\n"
113
  " - Key Strengths\n\n"
114
 
115
  "2. System-Specific Analysis\n"
@@ -131,9 +134,9 @@ def analyze(
131
 
132
  "5. Tabular Mapping\n"
133
  " - This section must always include a Markdown table.\n"
134
- " - The table must contain exactly four columns:\n"
135
- " | Biomarker | Value | Status (Low/Normal/High) | refernce ranges | AI-Inferred Insight |\n"
136
- " - Include ALL 9 Levine biomarkers (Albumin, Creatinine, Glucose, CRP, MCV, RDW, ALP, WBC, Lymphocytes).\n"
137
  " - The first row after the header must begin directly with 'Albumin'.\n"
138
  " - Do NOT add any index numbers (0,1,2...) or empty rows.\n"
139
  " - Each biomarker must appear exactly once as a separate row.\n\n"
@@ -151,6 +154,7 @@ def analyze(
151
  "- Present output beautifully, like a polished medical summary.\n"
152
  )
153
 
 
154
  patient_input =(
155
  f"Patient Profile:\n"
156
  f"- Age: {age}\n"
 
100
  "STRICT RULES:\n"
101
  "- Use ONLY the 9 biomarkers above + age, height, weight.\n"
102
  "- DO NOT use or invent other lab results (e.g., cholesterol, vitamin D, ferritin, ALT, AST, urine results).\n"
103
+ "- Use the reference ranges provided in the Patient Summary for all biomarker interpretations.\n"
104
+ "- Status (Low/Normal/High) must be defined strictly by whether the value falls below, within, or above the provided reference ranges.\n"
105
+ "- Analysis must always explain deviations with respect to these reference ranges.\n"
106
  "- If a section cannot be addressed with available data, explicitly state: 'Not available from current biomarkers.'\n"
107
  "- Do not give absolute longevity scores. Instead, summarize trends (e.g., 'No major abnormalities suggesting elevated short-term risk.').\n"
108
  "- Nutrient status (Iron, B12, Folate) can only be suggested as possible IF supported by MCV + RDW patterns, but never stated as confirmed.\n"
 
112
  "OUTPUT FORMAT (strict, structured, and professional):\n\n"
113
 
114
  "1. Executive Summary\n"
115
+ " - Top Priority Issues (based only on provided biomarkers and their ranges)\n"
116
  " - Key Strengths\n\n"
117
 
118
  "2. System-Specific Analysis\n"
 
134
 
135
  "5. Tabular Mapping\n"
136
  " - This section must always include a Markdown table.\n"
137
+ " - The table must contain exactly five columns:\n"
138
+ " | Biomarker | Value | Status (Low/Normal/High) | Reference Range | AI-Inferred Insight |\n"
139
+ " - The Reference Range column must be populated with the ranges given in the Patient Summary.\n"
140
  " - The first row after the header must begin directly with 'Albumin'.\n"
141
  " - Do NOT add any index numbers (0,1,2...) or empty rows.\n"
142
  " - Each biomarker must appear exactly once as a separate row.\n\n"
 
154
  "- Present output beautifully, like a polished medical summary.\n"
155
  )
156
 
157
+
158
  patient_input =(
159
  f"Patient Profile:\n"
160
  f"- Age: {age}\n"