Related Experiment Video
Updated: Sep 5, 2026

Evidence-based Knowledge Synthesis and Hypothesis Validation: Navigating Biomedical Knowledge Bases via Explainable AI and Agentic Systems
Published on: June 13, 2025
Development and Validation of a Two-Stage NLP System Combining Rule-Based Extraction and LLM-Based Classification for
Kenji Fujita1, Marion Matheson2, Bhavya Valecha3
1Departments of Clinical Pharmacology and Aged Care, Kolling Institute, Faculty of Medicine and Health, The University of Sydney and the Northern Sydney Local Health District, St Leonards, NSW, Australia. kenji.fujita@sydney.edu.au.
Introduction:
Polypharmacy in older adults is associated with increased risks of adverse drug events and functional decline. Discharge summaries often contain deprescribing recommendations, but these are frequently overlooked due to documentation complexity.
Objective:
The aim of this study was to develop and validate a two-stage hybrid natural language processing (NLP) system combining rule-based extraction and large language model (LLM)-based classification for automated identification of deprescribing recommendations from discharge summaries.
Methods:
This retrospective cohort study included 850 discharge summaries from patients aged ≥ 65 years with hospitalisation for ≥ 48 h across six public hospitals in New South Wales, Australia. Model 1 (rule-based extraction) identified discharge medications and candidate sentences containing pre-defined deprescribing keywords. Model 2 (LLM-based classification) categorised candidate sentences into five categories, from which a binary outcome (deprescribing recommendation present versus absent) was derived using a pre-specified mapping. Data were split into training (80%) and test (20%) sets. Gold standard classifications were established by independent reviews, followed by adjudication of discrepancies.
Results:
Model 1 extracted 9631 discharge medications (median 11 per patient) and 1061 candidate sentences from 850 patients (median age 82.8 years). Model 2 achieved an F1 score of 0.91 and accuracy of 0.90 for the binary outcome in the test set (144 medications). Inter-rater reliability showed substantial agreement (Cohen's kappa 0.70). The most frequently identified medications recommended for deprescribing were antibiotics and opioids. The most common misclassification was incorrectly identifying actions completed during hospitalisation as post-discharge recommendations. The combined processing time averaged 12.6 seconds per discharge summary.
Conclusions:
A two-stage hybrid approach combining rule-based extraction and open-source LLM-based classification could identify deprescribing recommendations from discharge summaries, enabling cost-efficient, privacy-compliant local deployment.