moazx commited on
Commit
5ced715
·
1 Parent(s): 4fd13fd

Refine recommendations and output structure in assessment chain. Update order of sections to place Discussion & Rationale before Eligibility Analysis, ensuring clarity in patient eligibility reasoning.

Browse files
Files changed (1) hide show
  1. core/assessment_chain.py +9 -9
core/assessment_chain.py CHANGED
@@ -615,7 +615,7 @@ SASLT 2021 GUIDELINES REFERENCE:
615
  RESPONSE FORMAT (JSON ONLY - NO MARKDOWN):
616
  {{
617
  "eligible": true or false,
618
- "recommendations": "Start with clinical recommendations/decision, then eligibility analysis, and end with discussion/rationale. Use \\n for new lines. Do NOT include the patient summary here.",
619
  "patient_summary": "3-5 bullet patient summary (age, sex, HBV DNA, ALT, fibrosis stage, immunosuppression, coinfections). Use \\n for new lines."
620
  }}
621
 
@@ -632,7 +632,12 @@ Use \\n for line breaks (NOT literal newlines). Format as follows:
632
  *Key Factors:*\\n
633
  - 3-5 concise bullets of the main clinical considerations driving the decision\\n
634
  \\n
635
- **Eligibility Analysis**\\n
 
 
 
 
 
636
  \\n
637
  *Absolute Indications Check (Priority):*\\n
638
  {hiv_absolute_indication if has_hiv else ""}
@@ -650,11 +655,6 @@ Use \\n for line breaks (NOT literal newlines). Format as follows:
650
  - Note any additional factors: family history, age >30, extrahepatic manifestations\\n
651
  - Cite specific SASLT guideline provisions\\n
652
  \\n
653
- **Discussion & Rationale (keep at bottom)**\\n
654
- - Concise narrative explaining why the patient is (not) eligible with SASLT page citations\\n
655
- - Highlight any caveats or follow-up steps\\n
656
- - Explicitly remind that HIV coinfection is an absolute indication if present\\n
657
- \\n
658
  Do NOT include patient summary text in "recommendations". Place it only in "patient_summary".
659
 
660
  Return ONLY the JSON object, nothing else."""
@@ -847,8 +847,8 @@ REASONING & OUTPUT RULES:
847
  }}
848
  4. Recommendations order (must follow this sequence):
849
  - Clinical Recommendation section FIRST with *Decision:* ELIGIBLE/NOT ELIGIBLE, immediate plan, and monitoring/treatment steps.
850
- - Eligibility Analysis section in the middle referencing specific SASLT criteria with citations.
851
- - Discussion/Rationale section LAST with concise explanation and any caveats.
852
  5. The patient_summary field must only contain the patient summary text (no clinical recommendation content).
853
  6. The JSON MUST be the only output. Do not include explanations outside the JSON.
854
 
 
615
  RESPONSE FORMAT (JSON ONLY - NO MARKDOWN):
616
  {{
617
  "eligible": true or false,
618
+ "recommendations": "Start with clinical recommendations/decision, then discussion/rationale, and end with eligibility analysis. Use \\n for new lines. Do NOT include the patient summary here.",
619
  "patient_summary": "3-5 bullet patient summary (age, sex, HBV DNA, ALT, fibrosis stage, immunosuppression, coinfections). Use \\n for new lines."
620
  }}
621
 
 
632
  *Key Factors:*\\n
633
  - 3-5 concise bullets of the main clinical considerations driving the decision\\n
634
  \\n
635
+ **Discussion & Rationale (keep second)**\\n
636
+ - Concise narrative explaining why the patient is (not) eligible with SASLT page citations\\n
637
+ - Highlight any caveats or follow-up steps\\n
638
+ - Explicitly remind that HIV coinfection is an absolute indication if present\\n
639
+ \\n
640
+ **Eligibility Analysis (place last)**\\n
641
  \\n
642
  *Absolute Indications Check (Priority):*\\n
643
  {hiv_absolute_indication if has_hiv else ""}
 
655
  - Note any additional factors: family history, age >30, extrahepatic manifestations\\n
656
  - Cite specific SASLT guideline provisions\\n
657
  \\n
 
 
 
 
 
658
  Do NOT include patient summary text in "recommendations". Place it only in "patient_summary".
659
 
660
  Return ONLY the JSON object, nothing else."""
 
847
  }}
848
  4. Recommendations order (must follow this sequence):
849
  - Clinical Recommendation section FIRST with *Decision:* ELIGIBLE/NOT ELIGIBLE, immediate plan, and monitoring/treatment steps.
850
+ - Discussion/Rationale section SECOND with concise explanation and any caveats.
851
+ - Eligibility Analysis section LAST referencing specific SASLT criteria with citations.
852
  5. The patient_summary field must only contain the patient summary text (no clinical recommendation content).
853
  6. The JSON MUST be the only output. Do not include explanations outside the JSON.
854