Spaces:
Sleeping
Sleeping
Clarify recommendations format in assessment chain by removing editorial hints from the output structure. Ensure the order of sections is maintained without including phrases like '(start with this section)', '(keep second)', or '(place last)'.
Browse files- core/assessment_chain.py +5 -5
core/assessment_chain.py
CHANGED
|
@@ -615,14 +615,14 @@ 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 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 |
|
| 622 |
STRUCTURE OF "recommendations" FIELD:
|
| 623 |
Use \\n for line breaks (NOT literal newlines). Format as follows:
|
| 624 |
|
| 625 |
-
**Clinical Recommendation
|
| 626 |
*Decision:* [ELIGIBLE/NOT ELIGIBLE]\\n
|
| 627 |
*Immediate Plan:*\\n
|
| 628 |
{hiv_treatment_section if has_hiv else ""}
|
|
@@ -632,12 +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 |
-
**Discussion & Rationale
|
| 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
|
| 641 |
\\n
|
| 642 |
*Absolute Indications Check (Priority):*\\n
|
| 643 |
{hiv_absolute_indication if has_hiv else ""}
|
|
@@ -845,7 +845,7 @@ REASONING & OUTPUT RULES:
|
|
| 845 |
"recommendations": "Start with the clinical recommendation/decision, then the eligibility analysis, and end with a short discussion/rationale. Use \\n for new lines. Do NOT include the patient summary here.",
|
| 846 |
"patient_summary": "3-5 bullet patient summary (age, sex, HBV DNA, ALT, fibrosis, immunosuppression, coinfections). Use \\n for new lines."
|
| 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.
|
|
|
|
| 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. Do NOT include editorial phrases like '(start with this section)', '(keep second)', or '(place last)'.",
|
| 619 |
"patient_summary": "3-5 bullet patient summary (age, sex, HBV DNA, ALT, fibrosis stage, immunosuppression, coinfections). Use \\n for new lines."
|
| 620 |
}}
|
| 621 |
|
| 622 |
STRUCTURE OF "recommendations" FIELD:
|
| 623 |
Use \\n for line breaks (NOT literal newlines). Format as follows:
|
| 624 |
|
| 625 |
+
**Clinical Recommendation**\\n
|
| 626 |
*Decision:* [ELIGIBLE/NOT ELIGIBLE]\\n
|
| 627 |
*Immediate Plan:*\\n
|
| 628 |
{hiv_treatment_section if has_hiv else ""}
|
|
|
|
| 632 |
*Key Factors:*\\n
|
| 633 |
- 3-5 concise bullets of the main clinical considerations driving the decision\\n
|
| 634 |
\\n
|
| 635 |
+
**Discussion & Rationale**\\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**\\n
|
| 641 |
\\n
|
| 642 |
*Absolute Indications Check (Priority):*\\n
|
| 643 |
{hiv_absolute_indication if has_hiv else ""}
|
|
|
|
| 845 |
"recommendations": "Start with the clinical recommendation/decision, then the eligibility analysis, and end with a short discussion/rationale. Use \\n for new lines. Do NOT include the patient summary here.",
|
| 846 |
"patient_summary": "3-5 bullet patient summary (age, sex, HBV DNA, ALT, fibrosis, immunosuppression, coinfections). Use \\n for new lines."
|
| 847 |
}}
|
| 848 |
+
4. Recommendations order (must follow this sequence and DO NOT include editorial hints like '(start with this section)', '(keep second)', or '(place last)' in the output):
|
| 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.
|