Large language model driven multicenter prediction and explainable risk attribution of acute kidney injury Authors: Lingyi Xu, Kun Yan, Zinuo Zhang, Hong Liang, Yangdong Ruan, Damin Xu, Linger Tang, Tao Zhao, Qingqing Zhou, Youlu Zhao, Yuhui Zhang, Fude Zhou, Guopeng Zhou, Zhao Yang, Xiaoli Chen, Yulan Shen, Yunlin Feng, Guisen Li, Li Wang, Jicheng Lv, Ping Wang, Xizi Zheng, Li Yang Published: 2026 ABSTRACT AbstractAcute kidney injury (AKI) represents a life-threatening condition among hospitalized patients, where early prediction enables prevention. Despite advances in existing models, clinical implementation remains hindered by excessive false positive rates (70%-94%) and lack of actionable clinical insights. We conduct a multi-center retrospective cohort study and develop a two-model large language model framework: AKI-PM (Prediction Model) for predicting AKI occurrence within 24 hours and AKI-RAM (Risk Attribution Model) for providing explainable risk attribution. Using a cohort of 140,637 hospital admissions across four geographically diverse Chinese hospitals, we demonstrate that AKI-PM achieves high predictive performance in internal validation (area under curve 0.95, positive predictive value 0.68) and maintains robust generalizability across external sites after few-shot (area under curve 0.92-0.96, positive predictive value 0.69-0.74). Crucially, AKI-RAM provides structured, clinically actionable risk explanations by distinguishing modifiable from non-modifiable factors and offering tailored recommendations. In a clinical evaluation of 200 cases from four independent hospitals by six nephrologists, AKI-RAM receives high scores across eight dimensions (Likert scale: 4.18-4.88) with moderate to good inter-rater reliability (intraclass correlation coefficients: 0.680-0.803). This integrated framework addresses critical limitations in AI-driven clinical prediction by combining accuracy with interpretability, offering a scalable solution for early AKI prevention in diverse healthcare settings.Subject terms: Acute kidney injury, Acute kidney injury, Preventive medicine, Machine learning Introduction Acute kidney injury (AKI) is a severe global health burden, affecting approximately 13.3 million patients and contributing to 1.7 million deaths annually1–4. With no effective treatments beyond supportive care5,6, prevention through early risk identification becomes critically important. This is especially significant as up to 30% of AKI cases are considered preventable through optimized fluid management, avoidance of nephrotoxic agents, and prompt treatment of underlying conditions7. Despite the importance of early AKI prevention, effective strategies remain challenging due to the wide distribution of cases across diverse clinical settings where initial risk assessment often relies on clinicians without specialized nephrology training2,8, underscoring the need for decision support tools. However, most previous AKI prediction models were developed in enriched populations with inherently higher baseline risk (e.g., ICU or cardiac surgery patients), limiting their generalizability to the broader inpatient population. Among the few models developed for general hospitalized patients, machine learning models, including our own prior work9, have achieved good discrimination [area under curve (AUC) values 0.88-0.96] but are constrained by low positive predictive values (PPV: 0.06-0.30)9–14, leading to frequent false alarms; and by the lack of capability to translate feature importance into actionable interventions. These limitations highlight the need for novel approaches that can improve predictive precision while providing interpretable, clinically actionable outputs. The emergence of large language models (LLMs) offers a promising alternative due to their ability to integrate and interpret unstructured text, structured data, and temporal sequences within electronic health records (EHR), enabling the detection of subtle, clinically relevant patterns that may elude traditional machine learning models15. Although LLMs have demonstrated encouraging results in predicting outcomes such as perioperative risk16, sepsis17, and postoperative mortality18, showing reduced false positives and improved generalizability through fine-tuning or few-shot, their adoption in medicine remains at an early stage. In the context of AKI prediction, research utilizing LLMs remains notably underdeveloped, with two published studies currently available: one examining AKI after cardiopulmonary bypass19 and the other exploring postoperative AKI in elderly patients20. The former represents a single-center study with a limited sample size, while the latter reported an accuracy ranging from 0.55 to 0.64. Opportunities, therefore, exist to incorporate pre-training strategies and to provide clinically interpretable explanations of risk factors, approaches not yet applied to AKI prediction that could substantially improve both model performance and clinical applicability. To bridge these gaps, this study aims to develop and validate an LLM-based framework that integrates two complementary models: one for real-time AKI prediction and the other for interpretable risk explanations. We hypothesize that by leveraging large-scale, clinical contextualized data from a diverse hospitalized population, the proposed framework will achieve superior predictive accuracy, offer actionable insights to support early intervention, and possess strong generalizability across clinical settings. Results Datasets characteristics As illustrated in Fig. 1, we developed AKI-PM to dynamically predict the risk of AKI within the next 24 h during hospitalization. This model was pre-trained using the AKICorpus dataset, which contains 4.26 billion tokens, and further fine-tuned with the AKILM-FT dataset (n = 47,750). The predictive performance was evaluated using both internal validation (n = 17,074) and external validation (n = 75,813) datasets. Overview of workflow. We developed two large-scale domain-adapted language models based on the Qwen2.5-7B architecture. The first model, Acute Kidney Injury - Prediction Model (AKI-PM), underwent pre-training on a 4.26-billion-token nephrologist specialized kidney-focused corpus (AKICorpus) and followed by fine-tuning. The AKICorpus consists of AKI-related evidence-based medicine guidelines (EBM-text), kidney-related PubMed publications (PUB-text), clinical data from MIMIC-IV and eICU databases (Public-Note), and a proprietary dataset of 47,750 admissions from Peking University First Hospital in China (EHR-Note). The second model, Acute Kidney Injury - Risk Attribution Model (AKI-RAM), was constructed through a combination of fine-tuning and alignment with clinical reasoning rationales by manually annotated from clinical experts (upper panel). We conducted evaluations in one in-distribution (ID) and three out-of-distribution (OOD) for internal and external validation. The discrimination of AKI-PM was assessed using a series of metrics, including area under the curve (AUC), accuracy (ACC), sensitivity, specificity, positive predictive value (PPV), and negative predictive value (NPV). And for further evaluation, subgroup analyses were performed by age, admission estimated glomerular filtration rate (eGFR), admission department and surgery type. To evaluate the capabilities of AKI-RAM in real-world medical scenarios, we established a comprehensive human evaluation framework including eight key dimensions (lower panel). Table 1 summarizes the demographics and outcomes of patients from the AKILM-FT dataset and the four validation datasets. The overall AKI incidence across all datasets was 4.8%, affecting 6780 patients, with 42.7% of these cases classified as AKI grades 2-3. The internal validation dataset exhibited an AKI incidence of 4.0%, comparable to that of the AKILM-FT dataset (3.6%). In contrast, among external validation datasets, the tertiary hospital (Sichuan) demonstrated a higher AKI incidence (6.8%) than the two local hospitals [Miyun (3.7%) and Taiyuan (6.2%)]. Demographic characteristics varied across external validation datasets, whereas the internal validation dataset exhibited a distribution similar to that of the AKILM-FT dataset. Patients from Sichuan exhibited more severe clinical conditions, as reflected in higher ICU admission rates (4.8%) and higher admission eGFR (88.5 ± 25.5). Conversely, patients from Miyun and Taiyuan were more frequently admitted to the Internal Medicine ward (61.4% and 71.1%, respectively) and underwent fewer surgical interventions (14.2% and 17.3%, respectively). Table 1Demographics and outcomes of patients from the fine-tuning and validation datasetsAKILM-FTInternal ValidationDatasetExternal ValidationDatasetsPKUFH (2018-2019)n = 47,750PKUFH (2020)n = 17,074Sichuann = 39,605Miyunn = 22,603Taiyuann = 13,605Age, y59.1 ± 16.359.7 ± 16.260.3 ± 17.266.7 ± 14.763.5 ± 15.9Female, n (%)20,845 (43.7)7450 (43.6)14,536 (36.7)8013 (35.5)5083 (37.4)Admission department Internal Medicine, n (%)19,684 (41.2)6848 (40.1)20,983 (53.0)13,885 (61.4)9667 (71.1) Surgical Ward, n (%)26,473 (55.4)9679 (56.7)16,722 (42.2)8359 (37.0)3489 (25.6) ICU, n (%)1593 (3.3)547 (3.2)1900 (4.8)359 (1.6)449 (3.3)Admission eGFR, ml/min/1.73 m284.6 ± 22.683.0 ± 23.088.5 ± 25.584.8 ± 24.183.7 ± 26.8Receiving surgery, n (%)17,066 (35.7)6742 (39.5)15,067 (38.0)3203 (14.2)2356 (17.3)Any AKI, n (%)1739 (3.6)682 (4.0)2681 (6.8)829 (3.7)849 (6.2) Stage ≥ 2, n (%)652 (1.4)274 (1.6)1185 (3.0)405 (1.8)376 (2.8) Stage 3, n (%)309 (0.6)151 (0.9)602 (1.5)177 (0.8)201 (1.5)Max Scr post AKI, μmol/L138.4 (100.7, 207.2)152.2 (108.2, 246.9)135.5 (93.9, 219.8)115.0 (76.0, 202.5)121.1 (76.0, 221.5)Timing of AKI post-admission, day8 (4, 16)8 (4, 15)7 (3, 12)7 (4, 12)7 (3, 14)RRT, n (%)*115 (6.6)48 (7.0)189 (7.0)4 (0.5)40 (4.7)Length of stay, day9.0 (6.0, 15.0)9.0 (6.0, 15.0)11.0 (7.0, 16.0)12.0 (9.0, 16.0)17.0 (12.0,26.0)Inpatient mortality, n (%)396 (0.8)181 (1.1)674 (1.7)809 (3.6)444 (3.3)* RRT is the percentage calculated within the AKI population.ICU intensive care unit; eGFR estimated glomerular filtration rate; AKI acute kidney injury; RRT renal replacement therapy; PKUFH Peking University First Hospital; Miyun: Miyun District Hospital; Taiyuan: Taiyuan Central Hospital; Sichuan: Sichuan Provincial People’s Hospital. Demographics and outcomes of patients from the fine-tuning and validation datasets * RRT is the percentage calculated within the AKI population. ICU intensive care unit; eGFR estimated glomerular filtration rate; AKI acute kidney injury; RRT renal replacement therapy; PKUFH Peking University First Hospital; Miyun: Miyun District Hospital; Taiyuan: Taiyuan Central Hospital; Sichuan: Sichuan Provincial People’s Hospital. Performance of AKI-PM on AKI Prediction in Overall Population In the internal validation cohort, AKI-PM achieved an accuracy of 0.91, with an AUC of 0.95, sensitivity of 0.79, specificity of 0.93, PPV of 0.68, and a negative predictive value (NPV) of 0.96. The average inference latency was 0.23 seconds. We compared AKI-PM with six leading LLMs, including both medically pre-trained models (MedFound-7B, MedReason-8B, HuatuoGPT-o1-7B) and general models (Deepseek-V3.1, QwQ-32B, Llama-3.1-8B). In zero-shot evaluation (Supplementary Fig. 1), four models (MedReason-8B, QwQ-32B, Deepseek-V3.1, and HuatuoGPT-o1-7B) exhibited marked performance imbalances, whereas AKI-PM outperformed the remaining three. To enable a more balanced comparison, we additionally fine-tuned four baseline models (MedFound-7B, MedReason-8B, HuatuoGPT-o1-7B, and Llama-3.1-8B) using the same task formulation and training split as AKI-PM. The larger models (Deepseek-V3.1 and QwQ-32B) were retained as zero-shot references only. Fine-tuning improved all applicable baselines, particularly in accuracy, specificity and PPV. Nevertheless, AKI-PM remained the best-performing model overall, with the strongest PPV (Fig. 2). Comparative performance of AKI-PM and other LLMs. Predictive performance comparison for dynamic AKI prediction within 24 h among three general open-access LLMs (Llama-3.1-8B, QwQ-32B, and Deepseek-V3.1), three medical open-access LLMs (HuatuoGPT-o1-7B, MedReason-8B, and MedFound-7B), and our AKI-PM in the internal validation dataset (n = 17,074). The MedFound-7B, MedReason-8B, HuatuoGPT-o1-7B, and Llama-3.1-8B were fine-tuned using the same AKI prediction task formulation and training split as AKI-PM. Deepseek-V3.1 and QwQ-32B were not fine-tuned due to computational constraints and are reported only as zero-shot reference comparisons. The model performance was assessed using AUC, accuracy, sensitivity, specificity, PPV, and NPV. AKI-PM: acute kidney injury - prediction model; LLM: large language model; AKI: acute kidney injury; AUC: area under the curve; PPV: positive predictive value; NPV: negative predictive value. External validation using a zero-shot approach across three independent datasets demonstrated robust generalizability (Table 2). AKI-PM consistently achieved accuracy of 0.82–0.88, AUC of 0.88–0.91, specificity of 0.84–0.93, and NPV of 0.92–0.95. However, site-specific variations were noted in sensitivity (decreased at Miyun: 0.59, and Taiyuan: 0.57), and PPV (decreased at Sichuan: 0.47). To enhance adaptability, we employed a few-shot strategy with minimal samples from each external site. This approach significantly enhanced model performance: the AUC and accuracy at Sichuan increased from 0.88 to 0.96 and from 0.82 to 0.92, respectively, while the sensitivity rose from 0.59 to 0.67 at Miyun and from 0.57 to 0.67 at Taiyuan. PPV also showed substantial gains, with a 57% relative improvement at Sichuan (0.47 to0.74), along with notable enhancements at Miyun (0.62 to 0.69) and Taiyuan (0.60 to0.73). Table 2The performance of AKI-PM in internal and external validation cohortsAUCAccuracySensitivitySpecificityPPVNPVwith zero shotPKUFH0.95 (0.94,0.95)0.91 (0.90,0.92)0.79 (0.78,0.83)0.93 (0.92,0.94)0.68 (0.65,0.70)0.96 (0.96,0.97)Miyun0.91 (0.90,0.92)0.88 (0.87,0.88)0.59 (0.57,0.61)0.93 (0.93,0.94)0.62 (0.60,0.65)0.92 (0.92,0.93)Taiyuan0.90 (0.89,0.90)0.87 (0.87,0.88)0.57 (0.54,0.60)0.93 (0.92,0.93)0.60 (0.58,0.63)0.92 (0.91,0.92)Sichuan0.88 (0.87,0.89)0.82 (0.82,0.83)0.75 (0.73,0.77)0.84 (0.83,0.85)0.47 (0.45,0.49)0.95 (0.94,0.95)with few shotMiyun0.92 (0.91,0.93)0.90 (0.89,0.90)0.67 (0.65,0.69)0.94 (0.94,0.95)0.69 (0.66,0.71)0.94 (0.93,0.94)Taiyuan0.94 (0.94,0.95)0.91 (0.90,0.91)0.67 (0.64,0.70)0.95 (0.95,0.96)0.73 (0.70,0.76)0.94 (0.93,0.94)Sichuan0.96 (0.95,0.96)0.92 (0.91,0.92)0.77 (0.75,0.79)0.95 (0.94,0.95)0.74 (0.72,0.76)0.96 (0.95,0.96)AKI-PM acute kidney injury - prediction model; AUC area under curve; PPV positive predictive value; NPV negative predictive value; PKUFH Peking University First Hospital; Miyun: Miyun District Hospital; Taiyuan: Taiyuan Central Hospital; Sichuan: Sichuan Provincial People’s Hospital. The performance of AKI-PM in internal and external validation cohorts AKI-PM acute kidney injury - prediction model; AUC area under curve; PPV positive predictive value; NPV negative predictive value; PKUFH Peking University First Hospital; Miyun: Miyun District Hospital; Taiyuan: Taiyuan Central Hospital; Sichuan: Sichuan Provincial People’s Hospital. Performance of AKI-PM on AKI Prediction in Sub-populations We evaluated AKI-PM (with few-shot) across subgroups stratified by age, admission eGFR, admission department, cardiac surgery, vascular interventions or angiographic procedures, and a combined high-risk cohort (Fig. 3 and Supplementary Table 5–8). Overall, the model showed robust performance in the combined high-risk cohort across internal and external validation, with minimal changes relative to the overall cohort: accuracy, specificity, and PPV showed slight decreases of 0.01-0.02, 0.01-0.02, and 0.01-0.04, respectively; sensitivity increased by 0.01-0.04; NPV remained nearly unchanged. Most subgroups, including age ≥ 75 years, cardiac surgery, vascular interventions or angiographic procedures, and admission eGFR < 60 mL/min/1.73 m2, showed similar patterns. However, the ICU subgroup exhibited attenuated performance compared with the overall cohort in both internal and external validations: accuracy declined by 0.11–0.17, sensitivity increased by 0.07–0.19, and specificity declined by 0.15–0.34. For PPV, we observed a decrease of 0.09 in internal validation and an increase of 0.01–0.11 in external validation. Performance of the AKI-PM for AKI prediction in sub-populations. Performance of AKI-PM for dynamic prediction of AKI within 24 h with few shot was assessed across sub-population, stratified by critical clinical factors: age (< 75 vs. ≥ 75 years), admission eGFR (< 60 vs. ≥ 60 ml/min/1.73 m²), admission department (medical, surgical, or ICU), cardiac surgery (yes vs. no), vascular interventions or angiographic procedures (yes vs. no), as well as high-risk cohort (including patients aged ≥ 75 years, or those undergoing cardiac surgery, vascular interventions or angiographic procedures, ICU admissions, or those with admission eGFR < 60 mL/min/1.73 m²). The performance was assessed using accuracy, sensitivity, specificity, PPV, and NPV. Panels (a, b, c, and d) show the results in PKUFH, Miyun, Taiyuan, and Sichuan, respectively. AKI-PM: acute kidney injury - prediction model; AKI: acute kidney injury; eGFR: estimated glomerular filtration rate; ICU: intensive care unit; PPV: positive predictive value; NPV: negative predictive value; PKUFH: Peking University First Hospital; Miyun: Miyun District Hospital; Taiyuan: Taiyuan Central Hospital; Sichuan: Sichuan Provincial People’s Hospital. Performance of AKI-RAM on Interpretable Risk Factors AKI-RAM was fine-tuned with the AKILM-FT dataset, and generated explainable risk attribution through a structured three-component reasoning sequence: non-modifiable risk factors, modifiable risk factors, and corresponding clinical recommendations. The non-modifiable risk factors for a representative patient included advanced age, pre-existing comorbidities, and prior cardiovascular surgery (Supplementary Fig. 2). Modifiable risk factors comprised insufficient fluid volume and new-onset infections. Corresponding clinical recommendations were specifically tailored based on these modifiable risk factors. To evaluate the real-world clinical utility of AKI-RAM, six nephrologists assessed its performance using a 0-5 Likert scale across eight clinical dimensions (Fig. 4). In the internal validation dataset, AKI-RAM achieved scores of 4.27 for medical case comprehension, 4.52 for guideline adherence, and 4.18 for clinical reasoning. For clinical decision support, it scored 4.55 for relevance of risk factors and 4.74 for acceptability of clinical recommendations. For risk control, it achieved scores of 4.87, 4.88 and 4.86 for mitigating the risks associated with unfaithful content, bias and unfairness, and the possibility of harm, respectively. Performance remained consistent across all three external validation cohorts. The inter-rater reliability among six nephrologists across eight dimensions (average-measures ICC) ranged from 0.680 to 0.803, indicating moderate to good agreement (Supplementary Table 12). Performance evaluation of the AKI-RAM for reasoning AKI risk factors. The ability of AKI-RAM to generate accurate, reliable, and guideline-adherence risk attributions was assessed by six nephrologists with more than 5 years of experience using a comprehensive human evaluation framework with eight key dimensions. Panels (a–d) show the results in PKUFH, Miyun, Taiyuan, and Sichuan, respectively. AKI-RAM: acute kidney injury - risk attribution model; AKI: acute kidney injury; PKUFH: Peking University First Hospital; Miyun: Miyun District Hospital; Taiyuan: Taiyuan Central Hospital; Sichuan: Sichuan Provincial People’s Hospital. Impact of training strategies on model performance AKI-PM, following pre-training and fine-tuning, achieved an AUC of 0.95, an accuracy of 0.91, and a PPV of 0.68, outperforming the model trained with fine-tuning alone, which attained an AUC of 0.93, an accuracy of 0.89, and a PPV of 0.62. Furthermore, representing time-series data as structured textual input improved predictive performance, yielding a 45% increase in accuracy (0.62 vs. 0.90), 59% increase in specificity (0.58 vs. 0.92) and 141% increase in PPV (0.27 vs. 0.65) compared to string-based representations (Supplementary Table 9). For clinical interpretability, AKI-RAM, incorporating both fine-tuning and alignment techniques, received substantially higher evaluation scores when compared to unaligned models relying solely on fine-tuning, as illustrated in Supplementary Fig. 3. Discussion Addressing the critical unmet need for accurate and clinically applicable intelligent tools in AKI prevention, this large-scale multi-center study developed and validated two specialized LLMs using EHR data from 140,637 inpatients across four geographically dispersed hospitals of different tiers. AKI-PM enables real-time predictions of AKI within a 24-hour window, while AKI-RAM generates interpretable, clinically meaningful risk explanations. Both models demonstrated robust and consistent performance across all validation cohorts. Notably, AKI-PM achieved significantly improved PPV over conventional machine learning models, effectively overcoming the long-standing challenge of high false alarm rates that has hindered clinical adoption. Simultaneously, AKI-RAM identified modifiable risk factors and provided clinical actionable insights, confirming its potential practical utility as a decision-support tool, particularly for non-specialist clinicians. While LLMs hold considerable promise for clinical prediction, their real-world integration faces critical challenges, including insufficient domain expertise, hallucination generation, the interpretability gap between algorithmic outputs and clinical reasoning, and inadequate evaluation frameworks21, all of which restrict practical clinical utility. To address the domain knowledge gap, which limits the clinical relevance of model outputs, we pre-trained a general LLM on a specialized kidney-focused corpus comprising 4.26 billion tokens derived from clinical guidelines, literature, and multi-center EHRs. To mitigate hallucination, a key barrier to trust, we introduced nephrology expert-guided reinforcement learning with DPO alignment applied to manually annotated datasets, significantly improving output faithfulness as validated through manual evaluation of unfaithful content. Recognizing that interpretability drives user adoption, as evidenced by an educational study showing that teachers exhibited significantly higher trust and acceptance of intelligent recommendations when provided with domain-driven explanation22, we designed a hierarchical prompting architecture that integrates a risk-stratification module that discerns non-modifiable and modifiable risk factors through attention-driven attribution, and a clinical advisory module that translates these insights into personalized and actionable recommendations. This design effectively bridges the gap between algorithmic outputs and clinically usable decisions. Finally, we established a comprehensive evaluation framework consisting of eight clinically-grounded assessment dimensions, each utilizing specialty-tailored metrics aligned with the intended use of our model. This approach creates a rigorous benchmark for validating model performance under real-world clinical conditions. Together, these methodologies form a robust foundation that ensured consistently high performance across internal and external validation cohorts. Despite advances in artificial intelligence for AKI prediction, many machine learning models, including our earlier real-time prediction model with high predictive performance9, suffer from high false positive rates (70%–94%), which contribute to alarm fatigue, reduce clinician trust, and limit real-world clinical applicability9–14. This challenge is underscored by a comprehensive scoping review of 44 qualitative studies, which identified misleading alerts as a major barrier to the adoption of clinical decision support systems23,24. To address this limitation, we turned to LLMs, capitalizing on their ability to capture complex contextual relationships and long-range dependencies within sequential EHR data. Subsequently, we developed AKI-PM, the specialized medical LLM tailored for AKI prediction in a general inpatient population. This model demonstrates strong discriminative performance, achieving AUCs of 0.88-0.95 without few-shot and 0.92–0.96 with few-shot learning, while simultaneously reducing false positive rates to 26.0%–32.0%, marking a substantial improvement in predictive precision. By providing reliable risk stratification with substantially reduced false alerts, AKI-PM enables early identification of patients at high risk for developing AKI and facilitates broader adoption by clinicians. The absence of actionable intervention strategies has long constrained the clinical utility of predictive models in patient care. Although risk prediction alerts alone have proven insufficient to improve patient outcomes25–27, their integration with targeted interventions has been shown to meaningfully reduce AKI incidence28. For instance, a stepped-wedge cluster randomized clinical trial involving 34 cardiologists and 7820 coronary procedures demonstrated that providing cardiologists with contrast volume optimization and hemodynamic-guided fluid targets for high-risk patients resulted in a significant reduction in AKI incidence (7.2% intervention vs. 8.6% control)28. In light of these findings, we developed AKI-RAM to bridge the critical gap between prediction and actionable care. Unlike conventional machine learning interpretation methods that merely highlight feature importance, our model generates specific risk explanations along with patient-tailored recommendations. This functionality not only enhances clinicians’ comprehension and trust in predictions but also supports individualized interventions-an advantage particularly critical in developing countries where AKI is predominantly attributable to modifiable factors such as nephrotoxic medications and hypoperfusion. This stands in contrast to developed countries, where AKI more frequently results from complex, less preventable conditions like sepsis and multi-organ failure. Furthermore, the scarcity of nephrology expertise and persistent gaps in AKI prevention in these environments make them particularly amenable to artificial intelligence assisted early prediction and proactive care strategies, which have demonstrated significant benefits when implemented in a timely manner28–30. The generalizability of AKI prediction models is critical for their real-world utility, yet remains substantially constrained by performance degradation when applied across heterogeneous populations and healthcare institutions31. Accordingly, an LLM-based approach that leverages zero-shot and few-shot capabilities was therefore developed. Validated across four geographically and institutionally distinct hospitals-encompassing varied AKI incidences, severity distributions, and clinical unit characteristics-our model maintained consistent and acceptable discriminative performance under zero-shot conditions, with further performance improvements achieved through few-shot using limited hospital-specific samples. This adaptable and efficient design enables robust generalization across diverse clinical environments while providing a resource-conscious strategy for site-specific customization, eliminating the need for large-scale data collection or dedicated computational resources. These capabilities are especially crucial in resource-limited settings, providing a scalable and pragmatic strategy to reduce the AKI burden through early detection and timely intervention. Our study offers several distinct strengths. First, this study introduces a medical LLM designed for real-time AKI prediction among general inpatients, developed and validated on multi-center cohorts comprising 140,637 patients from four geographically diverse hospitals. Second, our technical approach integrates kidney-specific pre-training, expert-guided reinforcement learning, and a hierarchical prompting architecture to overcome critical limitations of LLMs. Moreover, compared with simple string concatenation, our structured textual input representation better aligns longitudinal EHR data with LLMs, preserving temporal and cross-variable relationships and thus improving predictive performance. Third, our dual-model framework achieves superior discrimination with substantially reduced false positive rates, while also providing interpretable risk stratification and clinically actionable recommendations, thereby bridging the gap between prediction and decision making. For real-world deployment, the system operates in two stages: AKI-PM identifies patients at high risk of AKI within 24 h and triggers an alert with an average identification latency of 0.23 s; AKI-RAM then generates modifiable risk factors and clinical recommendations for those alerted patients. Finally, our models demonstrate robust cross-institutional generalizability and support efficient adaptation through few-shot, offering a resource-conscious and readily deployable solution for implementing tailored AKI prediction tools across diverse healthcare environments. Nevertheless, several limitations should be acknowledged. Although AKI-PM substantially reduced false positive rates while preserving robust discrimination, further reduction remains desirable. The performance of AKI-PM is less robust in ICU settings, likely reflecting the greater clinical complexity of critical illness and the fact that domain pre-training alone does not fully capture case mix. Future work should therefore prioritize context-aware adaptation (e.g., ICU-specific fine-tuning) to improve accuracy and reliability in critically ill patients. In addition, the risk factor explanations were clinically validated by nephrologists; however, further randomized controlled trials are required to assess the impact of model-guided interventions on patient outcomes. Finally, our current AKI-RAM offers evidence-based temporal insights for modifiable factors rather than directly quantifying their individual contributions as numerical weights. In conclusion, this study developed and validated two LLMs: AKI-PM for AKI prediction and AKI-RAM for interpretable risk analysis. Through the integration of domain-specific pre-training, expert-guided reinforcement learning, and a hierarchical prompting architecture, the models achieved strong discrimination with substantially reduced false positives while providing clinically actionable insights. Furthermore, they demonstrated consistent generalizability across diverse clinical settings and support resource-conscious adaptation through minimal data requirements. This work effectively bridges predictive analytics and practical clinical decision-making, offering a scalable solution for AKI prevention. Future efforts should focus on real-world implementation and prospective validation of clinical utility. Methods Study design This study was conducted and reported following the Transparent Reporting of a Multivariable Prediction Model for Individual Prognosis or Diagnosis-Large Language Model (TRIPOD-LLM) guideline for the pre-training and fine-tuning of LLMs32 (Supplementary Table 13). We developed two large-scale domain-adapted language models based on the Qwen2.5-7B architecture, designed for complementary clinical tasks: dynamic prediction of AKI within 24 h and interpretable risk factor attribution among AKI patients. The first model, AKI-PM (Acute Kidney Injury - Prediction Model), underwent pre-training followed by supervised fine-tuning. The second model, AKI-RAM (Acute Kidney Injury - Risk Attribution Model), was developed through a combination of fine-tuning and alignment techniques. To evaluate performance, we employed quantitative discrimination metrics for AKI-PM, while AKI-RAM underwent rigorous human evaluation to assess its capabilities. An overview of the study design is presented in Fig. 1. The protocol for the present analysis was approved by the Research Ethics Committee of Peking University First Hospital (approval number 2025-1310), Sichuan Provincial People’s Hospital (approval number 2026[208]), Beijing Miyun District Hospital (approval number 2026[005-001]), and Taiyuan Central Hospital (approval number 2026008). No directly identifiable patient information is reported in the manuscript, figures, tables or Supplementary Information. Individual-level data are presented only in aggregate form. The requirement for patient-informed consent was waived due to the retrospective nature of the study, which only involved the collection of existing and de-identified medical data. Datasets Three strategically curated datasets were used for comprehensive model development and evaluation. For the pre-training of AKI-PM, a specialized kidney-focused corpus (AKICorpus) was established from four sources: 133 AKI-related evidence-based medicine guidelines (EBM-text), 4419 kidney-related PubMed publications (PUB-text), clinical data from MIMIC-IV and eICU databases exceeding 200,000 admissions (Public-Note), and a proprietary dataset of 47,750 admissions from Peking University First Hospital (PKUFH) in China (EHR-Note). The fine-tuning of both AKI-PM and AKI-RAM leveraged the AKILM-FT dataset comprising 47,750 admissions from PKUFH, which included baseline demographics, comorbidities, and dynamic medical data collected at 6 h intervals. The selection process of patients was shown in Fig.5. In addition, a manually curated dataset of 600 expert-annotated demonstrations, where three nephrologists identified and categorized AKI risk factors while formulating personalized clinical recommendations, facilitated alignment of AKI-RAM with clinical reasoning. The selection process for the fine-tuning dataset in Peking University First Hospital. SCr, serum creatinine; AKI, acute kidney injury. Model performance was rigorously assessed using both in-distribution testing (internal validation dataset: 17,074 admissions from the same source as the AKILM-FT dataset) and out-of-distribution testing (external validation datasets: 75,813 admissions from three independent hospitals, including Sichuan Provincial People’s Hospital [Sichuan], Miyun District Hospital [Miyun], and Taiyuan Central Hospital [Taiyuan]), ensuring robust evaluation across diverse clinical settings. All data from PKUFH, Sichuan, Miyun, and Taiyuan hospitals were derived from a previously established multi‑center database9. The selection process of patients was shown in Fig.6, and detailed information of datasets are provided in the Supplementary Methods and Supplementary Table 1. The selection process for validation datasets in the four independent hospitals. Panel (a) shows the selection process for the internal validation in Peking University First Hospital; Panel (b–d) shows the selection process for the external validation in Sichuan Provincial People’s Hospital, Beijing Miyun District Hospital, and Taiyuan Center Hospital, respectively. SCr, serum creatinine; AKI, acute kidney injury. Model development AKI-PM, designed for dynamic prediction of AKI within 24 h, employs a role-driven prompting framework (Supplementary Methods) that reformulates AKI prediction as a binary text generation task. AKI diagnosis followed the KDIGO clinical practice guidelines33, using serum creatinine based criteria, with details consistent with our previous study9. The training process was divided into two stages: continued pre-training on AKICorpus to input nephrology-specific knowledge, and fine-tuning on the 6-hour dynamic time-series dataset (AKILM-FT) to optimize predictive performance. Detailed training hyperparameters are listed in Supplementary Table 2. AKI-RAM implements a multi-dimensional attribution analysis approach. Using a hierarchical prompt design, it identifies non-modifiable and modifiable risk factors and generates integrated clinical recommendations (Supplementary Methods). To mitigate the cost of expert annotations, we adopted a semi-supervised data construction strategy in which evaluation data were automatically pre-annotated and subsequently refined by clinicians. Training involved two phases: supervised fine-tuning on the positive samples from AKILM-FT to generate structured attribution outputs (categorizing risk factors and integrated clinical recommendations) based on clinical case descriptions, followed by alignment via Direct Preference Optimization (DPO). The DPO phase used a preference dataset containing expert-verified chosen responses and rejected responses from the baseline DeepSeek-R1 model, improving alignment with domain expertise, clinical plausibility, and nephrologist preferences. Identity Preference Optimization (IPO) loss34, as implemented in LLaMA-Factory35, was applied during DPO. Evaluation The predictive performance of AKI-PM was rigorously evaluated against multiple open-access LLMs. Considering practical deployment constraints and data security requirements, the study selected smaller-scale open-access LLMs for comparison, including Llama-3.1-8B, QwQ-32B, Deepseek-V3.1, and medical-specific models (HuatuoGPT-o1-7B, MedReason-8B, and MedFound-7B) known for superior clinical task performance. To ensure a more balanced comparison, we additionally fine-tuned four open-access baseline LLMs (MedFound-7B, MedReason-8B, HuatuoGPT-o1-7B, and Llama-3.1-8B) using the same AKI prediction task formulation and training split as AKI-PM. Larger models (Deepseek-V3.1 and QwQ-32B) were not fine-tuned because of computational constraints and were retained only for zero-shot reference comparison. Details of these LLMs are provided in Supplementary Table 3. Comprehensive assessment metrics included AUC, accuracy, sensitivity, specificity, PPV, NPV, and inference latency. The evaluation extended from internal validation to external datasets, and predefined subgroup analyses were performed, stratified by critical clinical factors: age (< 75 vs. ≥ 75 years), admission estimated glomerular filtration rate (eGFR; < 60 vs. ≥ 60 ml/min/1.73 m²), admission department (medical, surgical, or ICU), cardiac surgery (yes vs. no), vascular interventions or angiographic procedures (yes vs. no), and a combined high-risk cohort (defines as patients aged ≥ 75 years, or those undergoing cardiac surgery, vascular interventions or angiographic procedures, or ICU admission, or with admission eGFR < 60 mL/min/1.73 m²). To evaluate the real-world clinical utility of AKI-RAM, we developed a comprehensive human evaluation framework based on the CLEVER framework36 that transcended traditional natural language generation metrics (BLEU, ROUGE), which inadequately reflect explainable risk factor attribution capabilities. This framework integrated the model’s functional objectives with the CLEVER framework across eight dimensions: medical case comprehension, guideline adherence, clinical reasoning, risk factor relevance, recommendation acceptability, unfaithful content, bias and unfairness, and possibility of harm. Evaluation was performed by six experienced nephrologists (each with > 5 years of clinical experience) using a 0–5 Likert scale on 200 cases drawn from both the internal and external validation datasets. The panel comprised three experts from an academic hospital and three from two independent local hospitals. Inter-rater reliability across six assessors was quantified using intraclass correlation coefficients (ICCs) across eight dimensions. ICCs were calculated in SPSS using a two-way random-effects model with absolute agreement and average measures. Model outputs with and without alignment were compared to assess real-world clinical applicability (see Supplementary Methods for details). Figures were generated by Graphpad Prism version 9.4.1 and R version 4.2.2. Few-shot setting For few-shot adaptation at each external center, we randomly sampled 1000 cases without class rebalancing to preserve the original AKI/non-AKI prevalence, and performed LoRA-based37 fine-tuning in LLaMA-Factory35 to update model weights without additional prompting or post hoc calibration. Detailed hyperparameters and training configurations have been added to Supplementary Table 4. To assess sample efficiency, a gradient experiment was conducted using adaptation sets of 10, 100, 200, 500, and 1000 samples (Supplementary Table 11). The model was subsequently evaluated on the remaining test data after removing these samples. This few-shot strategy allowed the model to adjust to site-specific data distributions while retaining knowledge from the large-scale pre-training and fine-tuning phases. Statistics and reproducibility No statistical methods were used to predetermine sample size. The sample sizes were determined based on the total available retrospective cohorts meeting the inclusion criteria across the four participating centers to maximize statistical power. No data were excluded from the final analyses once inclusion and exclusion criteria (described in the Supplementary Methods) were applied. Randomization was not applicable because this was an observational, retrospective cohort study of existing hospital admissions. The investigators were not blinded to allocation during the retrospective analysis and clinical outcome assessment, as AKI outcomes were determined based on KDIGO criteria. Reporting summary Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article. Supplementary information Supplementary information Reporting Summary Transparent Peer Review file Source data Source Data