🤖 AI Summary
This study addresses the longstanding limitations of manual feature engineering in electronic health records (EHR) for heart failure, which suffers from low automation, poor maintainability, and lack of traceable clinical evidence. To overcome these challenges, the authors propose nMAS—a novel multi-agent system that integrates clinical guidelines and evidence-based rules into the feature engineering pipeline. For the first time, a multi-agent architecture is deeply embedded within this workflow to enable automated generation, scoring aggregation, and fully auditable provenance of structured heart failure features. Built upon the Nimblemind multi-agent framework and augmented with a rule engine and a constrained large language model (LLM) auditing mechanism, nMAS generated 202 features from 500 simulated patients, achieving AUROCs of 0.963 and 0.910 for HFrEF and HFpEF phenotype identification, respectively, with LLM-assessed evidence support reaching 81.5%.
📝 Abstract
Electronic health record (EHR) feature engineering is a major bottleneck in clinical research and AI, accounting for 39-45% of data scientists' workload. This is especially pronounced in heart failure, which affects an estimated 6.7 million U.S. adults and requires integrating fragmented EHR data with disease-specific, guideline-based clinical reasoning. Existing rule-based and large language model (LLM)-based approaches offer only partial automation with limited maintainability and evidence traceability. We developed the Nimblemind Multi-Agent System (nMAS), an evidence-linked, rubric-grounded pipeline for automated heart-failure feature engineering, and evaluated it on 500 dummy patient records from nine EHR source tables. nMAS generated 132 structured and 70 rubric-scored aggregated features, verified for structural integrity, rubric compliance, and provenance, and audited by a restricted LLM. Adding the aggregated features improved held-out AUROC from 0.895 to 0.963 for HFrEF and 0.870 to 0.910 for HFpEF phenotyping, and an independent LLM-based rubric assessment of evidence support and methodological soundness scored the features at 81.5% of maximum points. These results demonstrate the feasibility of automated, auditable feature engineering for complex cardiovascular EHR data, though evaluation was limited to a single-institution cohort and external validation is needed.