🤖 AI Summary
Direct application of large language models (LLMs) to clinical diagnosis is susceptible to prompt sensitivity, narrative ordering effects, and the risk of generating plausible yet erroneous outputs, while conventional structured models struggle to integrate into predominantly free-text clinical workflows. To address these challenges, this work proposes ClaMPAPP, a novel hybrid architecture that decouples natural language understanding from diagnostic reasoning by employing an LLM as a natural language interface and a machine learning model as the predictor. Specifically, the LLM extracts structured features from clinical narratives, which are then validated through deterministic logical checks before being fed into an XGBoost classifier for appendicitis risk prediction. Evaluated on two independent pediatric cohorts, ClaMPAPP achieves superior performance in both internal and external validation, significantly reducing missed diagnoses and demonstrating greater stability, robustness, and auditability compared to end-to-end LLM approaches.
📝 Abstract
Large language models (LLMs) can make clinical decision support more accessible by interpreting free-text documentation, but their direct use as diagnostic engines is limited by sensitivity to prompts, information order, and plausible but incorrect outputs. Structured machine-learning models offer more stable risk prediction, yet they require tabular inputs that are difficult to integrate with narrative clinical workflows. We present ClaMPAPP (Clinical Language-assisted Machine-learning Pipeline for Appendicitis), a hybrid system that uses an LLM as an interface rather than as the final decision-maker. ClaMPAPP extracts schema-constrained clinical features from note-like narratives, applies deterministic plausibility checks, and passes validated features to an XGBoost classifier trained on clinical, laboratory, and ultrasound variables. We evaluated ClaMPAPP on two independent pediatric appendicitis cohorts from German hospitals and compared it with end-to-end LLM baselines, including open-source and proprietary models. To preserve ground truth while testing free-text input, narratives were generated from structured electronic health records through template rendering and constrained LLM rewriting, with additional sentence-order permutation to assess positional robustness. ClaMPAPP achieved the strongest overall diagnostic performance in both internal and external validation while minimizing missed appendicitis cases, the key safety concern in acute triage. End-to-end LLMs showed unstable sensitivity-specificity trade-offs and greater degradation under narrative reordering. These results support an LLM-as-interface, ML-as-predictor design that separates natural-language usability from predictive inference and provides a more auditable pathway for clinical decision support.