OncoRAG: graph-based retrieval enabling clinical phenotyping from oncology notes using local mid-size language models - Patrick Salome; Maximilian Knoll; David Walz; Nicolò Cogno; Aylin S. Dedeoglu; Aimee Letong Qi; Steven J. Isakoff; Amir Abdollahi; Rachel B. Jimenez; Danielle S. Bitterman; Harald Paganetti; Ibrahim Chamseddine (npj Digital Medicine, 2026)
Abstract Oncology notes contain the richest clinical detail, yet they remain largely inaccessible at scale because extracting structured phenotypes requires either substantial language model infrastructure, curated training data, or cloud computing under regulatory constraints. We developed OncoRAG, combining ontology enrichment, knowledge graph construction, graph-diffusion reranking, and structured prompting with a locally deployed 14B-parameter language model without model weight fine-tuning. Applied to three cohorts—triple-negative breast cancer (TNBC; 104 patients, 42 features; primary development), recurrent high-grade glioma (RiCi; 191 patients, 19 features; cross-lingual and cross-disease evaluation with cohort-specific configuration), and MIMIC-IV (100 patients, 10 features; limited external evaluation on overlapping features)—OncoRAG achieved F1 scores of 0.80, 0.79, and 0.84, improving over direct large language model (LLM) prompting and naive retrieval-augmented generation (RAG) baselines by 0.19–0.22 and 0.17–0.19 F1, and outperforming direct prompting with a 5× larger 70B model by 0.09–0.10 F1. In an exploratory survival analysis (12 events), both feature sets showed close point estimates of the C-index (0.77 vs 0.76), but equivalence cannot be statistically confirmed given the limited event count. OncoRAG enables accurate clinical phenotyping from multilingual oncology notes using a locally deployable mid-size model, without model weight fine-tuning or external data sharing.