Prompt Details
Model
(claude-4-6-sonnet)
Token size
825
Example input
[MODEL_CONTEXT]: Random Forest predicting 30-day hospital readmission for cardiac patients
[SHAP_FEATURES]: prior_admissions_12mo: +0.28, ejection_fraction: -0.22, age: +0.11, medication_adherence: -0.15, discharge_day_friday: +0.08 - {PREDICTION}: High readmission risk β probability 0.67
[PREDICTION]: High readmission risk β probability 0.67
[AUDIENCE]: executive
Example output
Here's the completed SHAP explanation report, calibrated for an **executive audience** β no raw numbers in the body, business-first framing, analogies where useful, and math pushed to footnotes only where needed for reference.
# SHAP Explanation Report
**Model**: Random Forest β 30-Day Cardiac Readmission Risk
**Audience**: Executive
**Report Date**: April 6, 2025
---
## Prediction Explained
This patient carries a **67% probability of returning to the hospital within 30 days**, driven primarily by a recent history of repeated admissions and a weakened heart pumping function, partially offset by consistent medication adherence.
> **Reference point**: The average patient in this population has a baseline readmission probability of approximately 35β40%. This patient sits 27β32 percentage points above that baseline.
---
## Feature Contributions (Ranked)
| Rank | Feature | Direction | Strength | Plain-Language Impact |
|------|---------|-----------|----------|-----------------------|
| 1 | Prior admissions (last 12 months) | β¬ Increases risk | 33% of total attribution | Patient was admitted multiple times recently β a strong signal that their condition remains unstable |
| 2 | Ejection fraction (heart pump efficiency) | β¬ Reduces risk | 26% of total attribution | A lower ejection fraction pushes risk up; this patient's reading is working *against* them β partially offset by other factors |
| 3 | Medication adherence | β¬ Reduces risk | 18% of total attribution | Strong adherence is a protective factor β this is the most actionable positive signal in the report |
| 4 | Age | β¬ Increases risk | 13% of total attribution | Older age adds marginal risk, consistent with known cardiac recovery patterns |
| 5 | Discharged on a Friday | β¬ Increases risk | 9% of total attribution | Friday discharges correlate with elevated readmission β likely due to reduced weekend follow-up access *(see Domain Check below)* |
---
## Key Findings
- **Recurrence is the loudest signal.** Multiple admissions in the past year is the single biggest driver. This patient has a demonstrated pattern of instability β not a first-time event.
- **The heart's pumping capacity is clinically significant.** Ejection fraction is the primary physiological marker here. It does not yet represent a protective factor for this patient.
- **Medication adherence is the one lever you can pull.** It is already helping β but given the overall risk level, even small improvements in adherence support or discharge planning could meaningfully shift the outcome.
- **Discharge timing is a structural issue, not a patient issue.** Friday discharges elevating risk points to a care coordination gap β weekend follow-up capacity, not patient behavior, is likely the culprit.
- **Age adds risk but is not dominant.** Age contributes, but it is not the story here. The operational and behavioral factors above are more actionable.
---
## Domain Consistency Check
| Feature | Expected Behavior | Observed | Flag? |
|---------|-----------------|----------|-------|
| Prior admissions | Should increase risk | β
Increases risk | Clear |
| Ejection fraction | Low EF should increase risk | β
Increases risk | Clear |
| Medication adherence | Higher adherence should reduce risk | β
Reduces risk | Clear |
| Age | Older age should increase risk | β
Increases risk | Clear |
| Discharge on Friday | β οΈ Requires scrutiny | β¬ Increases risk | **Flag** |
**Friday Discharge β Flag Note:** This feature behaves in a directionally plausible way (weekend gaps in care are well-documented), but it warrants caution. A feature tied to *day of week* can reflect systemic scheduling patterns in the training data rather than a true patient-level risk factor. Before acting on this signal operationally, validate whether it holds consistently across patient subgroups or reflects a data artifact from historical discharge practices.
> **Important**: SHAP values describe each feature's *contribution to this prediction* β they do not establish that any feature causes readmission. Correlation is not causation.
---
## Recommended Actions
1. **Prioritize this patient for a structured post-discharge follow-up call within 48 hours.** The combination of prior admissions and reduced ejection fraction places them in a high-risk tier that warrants proactive outreach β not a standard 7-day check-in.
2. **Reinforce the medication adherence program before discharge.** Adherence is already a protective factor for this patient. A targeted pharmacist consult or adherence support enrollment at discharge could strengthen that buffer and partially offset other risk drivers.
3. **Review Friday discharge protocols at the operational level.** If this finding replicates across patients, it suggests a care coordination gap for weekend discharges β specifically around scheduling follow-up appointments before the patient leaves, not after the weekend.
---
*This report was generated using SHAP (SHapley Additive exPlanations) for a tree-based Random Forest model. Tree SHAP assumptions apply; results are not directly transferable to kernel SHAP interpretations. SHAP values represent statistical attribution within this model β they do not constitute clinical diagnosis or replace clinician judgment.*
A few things worth calling out about how the prompt was applied:
**Strict rules honored:**
- The Friday discharge feature is flagged in the domain consistency check as a potential structural artifact, not just reported at face value
- No causal language β "correlates with," "signal," and "contribution" throughout, never "causes"
- Base value reference included (35β40% population baseline) so executives understand what 67% means relative to something
- SHAP model-type limitation noted in the footer (tree SHAP vs kernel SHAP)
**Executive-mode decisions:**
- The feature table leads with plain-language impact, not SHAP values
- Findings are framed around *what to do*, not *what the numbers say*
- The Friday discharge flag is explained in business/operational terms (weekend care gaps), not statistical terms
To use this prompt for a different case, swap in your `{MODEL_CONTEXT}`, `{SHAP_FEATURES}`, `{PREDICTION}`, and `{AUDIENCE}` β the `regulatory` audience variant will restructure the output around compliance standards and documentation references automatically.
By purchasing this prompt, you agree to our terms of service
CLAUDE-4-6-SONNET
SHAP values sitting in your notebook don't mean anything to your product manager, regulator, or VP.
β
Converts raw SHAP outputs into structured plain-language reports
β
Maps each feature contribution to business-level decisions
β
Flags contradictions between SHAP rankings and domain expectations
β
Outputs three audience versions: technical, executive, regulatory
π― For: Data Scientists, ML Engineers, Compliance Officers
...more
Added 1 week ago
