A Privacy-Preserving Zero-Code Conversational Statistical Analysis System for Clinical Research Using Agentic AI and Local R Execution
Yang, S.; Chen, V. L.; Ng, W. H.; Zhang, S.; Qiu, S.; Zhu, J.; Hsieh, T. Y.-J.; Ji, F.; Yeo, Y. H.
Show abstract
Background Clinical data analysis typically requires statistical programming skills, whereas cloud-based artificial intelligence (AI) agents risk exposing sensitive patient records. We developed and functionally validated a privacy-preserving, zero-code conversational statistical analysis framework that translates natural-language clinical research requests into executable R workflows while strictly retaining raw patient data within local computing environments. Methods Orchestrated by the n8n engine, the system integrates the DeepSeek-Reasoner model with a Pinecone vector database for retrieval-augmented generation (RAG), grounding statistical selection in curated biostatistical guidance and R templates. Core functionalities include data schema perception, interactive data cleaning, requirements refinement, and local R code execution via a controlled command-line interface. System performance was evaluated by replicating a published prognostic model study on metabolic dysfunction-associated steatotic liver disease (MASLD). Findings All core analytical workflows, including data cleaning, multivariable Cox proportional hazards modeling, model diagnostics, and publication-ready tables and figures (e.g., baseline characteristics, Schoenfeld residuals, receiver operating characteristic curves, and forest plots), were executed solely through natural-language dialogues without manual coding. The external large language model actively clarified analytical prompts while receiving zero row-level patient data. Interpretation Decoupling remote cloud reasoning from local code execution lowers the technical threshold for clinicians conducting data-driven research while safeguarding data privacy. This architecture provides a practical, scalable, and reproducible framework for converting natural-language clinical questions into executable statistical workflows. Funding National Natural Science Foundation of China (82473291), Shaanxi Province "Three Qin Scholars" Innovation Team Project (2023001), and Fundamental Research Funds for the Central Universities (xtr062023003).
Matching journals
The top 5 journals account for 50% of the predicted probability mass.
Similar papers in this journal
Similar papers in this journal
- Zero Shot Health Trajectory Prediction Using Transformer 93%
- Enhancing Privacy-Preserving Deployable Large Language Models for Perioperative Complication Detection: A Targeted Strategy with LoRA Fine-tuning 93%
- Aggregating Multiple Real-World Data Sources using a Patient-Centered Health Data Sharing Platform: an 8-week Cohort Study among Patients Undergoing Bariatric Surgery or Catheter Ablation of Atrial Fibrillation 92%
Similar papers in this journal
Similar papers in this journal
- Application of Generative Artificial Intelligence to Utilise Unstructured Clinical Data for Acceleration of Inflammatory Bowel Disease Research 91%
- SalivaDirect: A simplified and flexible platform to enhance SARS-CoV-2 testing capacity 89%
- The Medical Action Ontology: A Tool for Annotating and Analyzing Treatments and Clinical Management of Human Disease 88%
Similar papers in this journal
- Achieving Inclusive Healthcare through Integrating Education and Research with AI and Personalized Curricula 93%
- Pretrained Patient Trajectories for Adverse Drug Event Prediction Using Common Data Model-based Electronic Health Records 92%
- Extraction of Crohn's Disease Clinical Phenotypes from Clinical Text Using Natural Language Processing 91%
"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.