Predicting Hospital Readmission with Kumo RFM
October 14, 2025
Kevin Soderholm

Written by Kevin Soderholm, Data Scientist and KumoRFM Hackathon participant
In this technical blog post, Kevin shares how he built a Hospital Readmission Risk Assessment Application powered by KumoRFM. His project predicts patient readmission risk, identifies contributing factors, and generates AI-driven video explanations to support clinicians and patients alike. The prototype demonstrates how KumoRFM can transform complex healthcare data into real-time, actionable predictions, earning Kevin a top-ranking spot at our KumoRFM August Hackathon in San Francisco.
Abstract / Hook
Hospital readmission is one of the most expensive and stressful events in healthcare. Providers need to anticipate which patients are at greatest risk of returning soon after discharge, but the signals may be scattered across disparate data points, making prediction a difficult task for humans alone.
To help solve this problem, I built a prototype application that uses Kumo’s Relational Foundation Model (RFM) to:
- Predict readmission risk
- Explain contributing factors
- Generate empathetic patient-facing explanations via AI avatar videos
Introduction
Hospital readmissions within 30 days of discharge cost the U.S. healthcare system billions annually and contribute to poor patient health outcomes. Clinicians often lack predictive tools that combine all available patient data into clear, actionable insights at the point of discharge.
This project addresses that gap by creating a Hospital Readmission Risk Assessment Application. The tool helps:
- Clinicians: understand a patient’s risk of readmission and the most likely cause.
- Patients: receive a clear, empathetic explanation of their risk and next steps.
- Hospitals: reduce costly readmissions while improving patient outcomes.
My Approach with KumoRFM
Problem Definition
The key challenge was to model a patient’s likelihood of readmission using multiple, interconnected datasets including patient demographics, admission details, lab results, and medications.
Traditional ML models would require:
- Significant feature engineering
- Complex training pipelines
- Models tailored to narrow use cases
With KumoRFM, accurate predictions can be generated out of the box, in real time, and flexibly adapted to a variety of use cases and target definitions.
Architecture / Methodology
Data
For this project all data was synthetic. This was created via a python script that does the following:
- Generate synthetic patients with demographics and chronic conditions
- Simulate sequences of hospital admissions for each patient with diagnoses, admission type, length of stay, lab results, and medications based on real-world probability distributions.
- Assign a risk score per admission based on factors like age, chronic conditions, diagnoses, lab abnormalities, and medications
- Use risk score to determine probability and timing of subsequent admissions including unplanned readmissions
- Output linked relational tables (patients, admissions, labs, meds, diagnoses)
This created a realistic relational database for testing hospital readmission prediction pipelines.
Graph Construction
Creating a graph is simple with KumoRFM syntax:
- Specify column formats
- Define primary and foreign keys
- Define timestamps to be used for prediction
- Link tables via specified keys

Predictions
Users can dynamically select a timeframe between 1 and 30 days – a feature that sets KumoRFM apart from traditional ML workflows that have static prediction windows from past training.

Two predictions are run in real time with Kumo’s Predictive Query Language (PQL):
- Likelihood of readmission within X days
- Probability bucketed into low, moderate, high risk for easy interpretability
- Contributing factors identified (rule-based for now; future use of Kumo’s Explainability module)

- Most likely readmission diagnosis
- Triggered if risk level is high
- Provides most probable reason for readmission

Together, these predictions offer critical information to support clinician decision-making to mitigate the risk of readmission for the patient.

Script Generation
When a video explanation is requested, a python function executes:
- Package all patient info (demographics, admission details, labs, meds, predictions, contributing factors) into context into neatly organized JSON strings for context
- Build a detailed prompt with the context, instructions for content, tone, length, and guardrails
- Call OpenAI’s API (GPT-4) with the prompt to generate the script to be read by an AI avatar video
Video Creation
When the script is returned, another a python function executes:
- Call HeyGen’s API to with the script to create an AI avatar video
- Select avatar ID, voice ID, and talking speed
- Execute a looping function to check status of video creation and display to user
- Video displays in UI
In the video, a virtual clinician explains the patient’s readmission risk, their contributing factors in more detail with clear, easy to understand language, then outline the patient’s next steps based on their risk level.
UI
This prototype application was built with Streamlit – an open-source python framework that is ideal for prototypes and demos. I structured my UI to be clean and simple with a 5-step workflow from top to bottom:
- Verify Patient – Similar to existing hospital processes, requires the patient to verify their ID number and date of birth.
- Admission Overview – This contains all the relevant information about the patients visit including demographics, chronic conditions, diagnosis, length of stay, labs and medications.
- Get Prediction – Choose prediction window, view readmission risk level, potential readmission reasons, and contributing factors.
- Watch Video – A 1-2 minute AI avatar explains to the patient their risk level and contributing factors in more detail + next steps in clear plain language.
- Next Steps – Automated discharge workflow is triggered based on risk level:
- Low risk: continue normal discharge process
- Moderate risk: Schedule short-term follow-up appointment to monitor symptoms
- High risk: doctor is required to re-evaluate the case and potentially extend the patient’s length of stay.
This app was designed with names, logos, color schemes, and formatting that aligns with the industry and user experience expectations.

Ethical Considerations
Assist, not replace clinicians.
AI should augment healthcare to improve outcomes, not substitute or replace clinical judgement. If this app is seen as a cost-cutting tool without oversight, patients could have higher risk of poor outcomes.
Data Quality is everything. The old mantra garbage in, garbage out is exactly what happens to AI that is fed incorrect or incomplete data. A strict governance framework would be essential for high stakes use case like healthcare.
Conclusions
Solving the problem of early hospital readmission can save tremendous costs to the U.S. healthcare system and improve patient health outcomes. KumoRFM is a strong fit for this problem by providing a powerful prediction solution without requiring heavy feature engineering, complex pipelines, or significant overhead for hospitals to manage a suite of predictive models.
This project, powered by KumoRFM, connects relevant healthcare data, generates flexible, on-the-fly predictions, delivered in patient-friendly formats, driving benefits for clinicians, patients, and hospitals.
The same approach could extend to a variety of problems in healthcare, wherever complex relational data drives outcomes.