sentinel / configs /output_format /assessment.yaml
jeuko's picture
Sync from GitHub (main)
94a0f4c verified
format_instructions: |
CRITICAL:
- Return ONLY valid JSON. Do not include any explanatory text, disclaimers, or additional content before or after the JSON.
- The `RISK SCORES (GROUND TRUTH)` section contains validated risk scores. You MUST provide interpretations and explanations for these scores, NOT generate new risk levels.
- Provide a diagnostic recommendation for EVERY diagnostic protocol provided in the `DIAGNOSTIC PROTOCOLS` (i.e. {diagnostic_protocols}).
- **STRICT CATEGORY REQUIREMENT**: For ALL "category" fields in "identified_risk_factors" and "contributing_factors", you MUST use EXACTLY one of these values: {allowed_categories}. DO NOT create new categories like "Symptom", "Dermatologic", or any other value not in this list. Map symptoms to "Clinical Observation", dermatologic factors to "Lifestyle" or "Demographics" as appropriate, and use "Other" ONLY as a last resort when no other category fits.
- The ONLY allowed values for the "strength" field in "contributing_factors" objects are: {allowed_strengths}.
The output must be formatted as a valid JSON instance with the following structure:
{{
"reasoning": "string or null - Your internal step-by-step reasoning process for the assessment. Put all of your reasoning as specified in the `INSTRUCTIONS` here.",
"identified_risk_factors": [
{{
"description": "string - A human-readable description of the risk factor identified from the user's profile.",
"category": "string - MUST be EXACTLY one of: Lifestyle, Family History, Personal Medical History, Demographics, Female-Specific, Clinical Observation, or Other. DO NOT use any other values like 'Symptom' or 'Dermatologic'. Map symptoms to 'Clinical Observation'. Use 'Other' only as last resort."
}}
],
"llm_risk_interpretations": [
{{
"cancer_type": "string - Type of cancer from RISK SCORES section",
"risk_level": "number or null - Optional qualitative score (1-5) that should align with the calculated risk scores. Use null if you cannot confidently map the score to a 1-5 scale.",
"explanation": "string - Explain what the calculated risk score means for the patient. Identify key contributing factors from their profile. Always reference the actual score from RISK SCORES section.",
"recommended_steps": ["string"] or null - Optional steps to mitigate risk, particularly for higher calculated scores.
"contributing_factors": [
{{
"description": "string - A human-readable description of the risk factor",
"category": "string - MUST be EXACTLY one of: Lifestyle, Family History, Personal Medical History, Demographics, Female-Specific, Clinical Observation, or Other. DO NOT use any other values like 'Symptom' or 'Dermatologic'. Map symptoms to 'Clinical Observation'. Use 'Other' only as last resort.",
"strength": "string - MUST be exactly one of: Major, Moderate, or Minor"
}}
]
}}
],
"dx_recommendations": [
{{
"test_name": "string - Name of the diagnostic test",
"recommendation_level": "number - A score from 1 to 5, where 1 is unsuitable, 2 is unnecessary, 3 is optional, 4 is recommended, and 5 is critical - do not skip.",
"frequency": "string - Recommended testing frequency. With a recommendation level of 3 or higher, YOU MUST include the frequency of the test in the frequency field.",
"rationale": "string - Short explanation for why this test is recommended. Always relate the recommendation to the `User Information` and `Clinical Observations` as much as possible.",
"applicable_guideline": "string - The rule or guideline that triggered this recommendation. This field is only included if the recommendation is 3 or higher and is triggered by a rule or guideline - otherwise, leave this field blank."
}}
],
"overall_summary": "string - Provide a detailed summary of your the user's cancer risk profile, your diagnostic recommendations, and your reasoning. This should start with a single summary paragraph, and then provide a detailed breakdown of the reasoning for each assessment, diagnostic recommendation, and other insights, advice or guidance. Where possible reference information about the user, cancer types, and diagnostic protocols from your input. Consider also providing discussion of where the user's profile aligns or differs from the normal, and how situations or advice may change over time. Use only plain text, or simple HTML (bold, italic and lists ONLY). Explicitly include line breaks in the output."
"response": "string or null - The user-facing empathetic and educational narrative that introduces and summarizes the assessment.",
"overall_risk_score": "number or null - A holistic score from 0 (lowest possible risk across all cancer types) to 100 (critically high risk of any cancer in the short term). This should synthesize all risk factors into a single metric.",
}}
IMPORTANT:
- The `reasoning` field is mandatory for your internal monologue. You must put any and all reasoning you were asked to do in here. This is your internal monologue, and should be as detailed as possible.
- Do NOT include a `calculated_risk_scores` field in your response - this is populated programmatically from the RISK SCORES section.
- Focus your `llm_risk_interpretations` on explaining the CALCULATED scores, not generating new risk assessments.
- Do not add disclaimers; they are handled separately.
- Use null for optional fields that don't apply.
- Return ONLY the JSON object, nothing else.
- Ensure all required fields are included.