{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,13]],"date-time":"2026-10-13T18:17:05Z","timestamp":1791915425615,"version":"4.3.4"},"reference-count":39,"publisher":"Public Library of Science (PLoS)","issue":"9","license":[{"start":{"date-parts":[[2026,9,17]],"date-time":"2026-09-17T00:00:00Z","timestamp":1789603200000},"content-version":"vor","delay-in-days":0,"URL":"http:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100003710","name":"Korea Health Industry Development Institute","doi-asserted-by":"publisher","award":["RS-2024-00439677"],"award-info":[{"award-number":["RS-2024-00439677"]}],"id":[{"id":"10.13039\/501100003710","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["www.plosdigitalhealth.org"],"crossmark-restriction":false},"short-container-title":["PLOS Digit Health"],"abstract":"<jats:p>Large-scale clinical databases offer opportunities for medical research, but their complexity creates barriers to effective use. The Medical Information Mart for Intensive Care (MIMIC-IV), one of the world\u2019s largest open-source electronic health record databases, traditionally requires both SQL proficiency and clinical domain expertise. We introduce M3, a system that enables natural language querying of MIMIC-IV data through the Model Context Protocol. With a single command, M3 retrieves MIMIC-IV from PhysioNet, launches a local SQLite instance or connects to hosted BigQuery, and allows researchers to pose clinical questions in plain English. We evaluated M3 using samples from the EHRSQL 2024 benchmark with two language models. On one hundred answerable questions, the proprietary Claude Sonnet 4 achieved 94% accuracy and the open-weights gpt-oss-20B (deployable locally on consumer hardware) achieved 93%; on a matched sample of one hundred unanswerable questions, where correct behavior is to abstain rather than produce SQL, gpt-oss-20B correctly abstained on 69%. Both models translate natural language into SQL, execute queries against MIMIC-IV, and return structured results alongside the underlying query for verification. Error analysis revealed that most failures stemmed from complex temporal reasoning or ambiguous question phrasing rather than fundamental architectural limitations. The comparable performance of a smaller open-weights model demonstrates that privacy-preserving local deployment is viable for sensitive clinical data analysis. M3 lowers technical barriers to critical care data analysis and is designed with security measures including OAuth2 authentication, query validation, and audit logging.<\/jats:p>","DOI":"10.1371\/journal.pdig.0001671","type":"journal-article","created":{"date-parts":[[2026,9,17]],"date-time":"2026-09-17T17:21:33Z","timestamp":1789665693000},"page":"e0001671","update-policy":"https:\/\/doi.org\/10.1371\/journal.pdig.corrections_policy","source":"Crossref","is-referenced-by-count":2,"title":["M3: Conversational LLMs simplify secure clinical data access, understanding, and analysis"],"prefix":"10.1371","volume":"5","author":[{"ORCID":"https:\/\/orcid.org\/0009-0005-0479-7437","authenticated-orcid":true,"given":"Rafi","family":"Al Attrach","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0006-6951-8571","authenticated-orcid":true,"given":"Pedro","family":"Moreira","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0001-9255-7783","authenticated-orcid":true,"given":"Rajna","family":"Fani","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5561-6932","authenticated-orcid":true,"given":"Renato","family":"Umeton","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7207-6897","authenticated-orcid":true,"given":"Amelia","family":"Fiske","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6712-6626","authenticated-orcid":true,"given":"Leo Anthony","family":"Celi","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"340","published-online":{"date-parts":[[2026,9,17]]},"reference":[{"key":"pdig.0001671.ref001","doi-asserted-by":"crossref","unstructured":"Evans RS. Electronic health records: then, now, and in the future. Yearb Med Inform. 2016;Suppl 1(Suppl 1):S48-61. doi: 10.15265\/IYS-2016-s006 27199197","DOI":"10.15265\/IYS-2016-s006"},{"key":"pdig.0001671.ref002","unstructured":"STAT News. Generative AI tracker; 2025 [Cited 25 June 2025]. Available from: https:\/\/apps.statnews.com\/ai-tracker\/public\/index.html"},{"issue":"7969","key":"pdig.0001671.ref003","doi-asserted-by":"crossref","first-page":"357","DOI":"10.1038\/s41586-023-06160-y","article-title":"Health system-scale language models are all-purpose prediction engines","volume":"619","author":"LY Jiang","year":"2023","journal-title":"Nature"},{"issue":"4","key":"pdig.0001671.ref004","doi-asserted-by":"crossref","DOI":"10.1056\/AIcs2300191","article-title":"GPT-4 in a Cancer Center \u2014 Institute-wide deployment challenges and lessons learned","volume":"1","author":"R Umeton","year":"2024","journal-title":"NEJM AI"},{"key":"pdig.0001671.ref005","unstructured":"Anthropic. Model Context Protocol (MCP); 2024 [Cited 2025 June 7]. Available from: https:\/\/www.anthropic.com\/news\/model-context-protocol"},{"key":"pdig.0001671.ref006","author":"A Johnson","year":"2024"},{"issue":"23","key":"pdig.0001671.ref007","doi-asserted-by":"crossref","DOI":"10.1161\/01.CIR.101.23.e215","article-title":"PhysioBank, physiotoolkit, and physionet: components of a new research resource for complex physiologic signals","volume":"101","author":"AL Goldberger","year":"2000","journal-title":"Circulation"},{"key":"pdig.0001671.ref008","unstructured":"Lee G, et al. EHRSQL 2024 Dataset \u2013 MIMIC-IV Test Set. GitHub Repository. 2024 [Cited 2025 June 25]. Available from: https:\/\/github.com\/glee4810\/ehrsql-2024\/tree\/master\/data\/mimic_iv\/test"},{"key":"pdig.0001671.ref009","author":"A Johnson","year":"2023"},{"key":"pdig.0001671.ref010","unstructured":"Anthropic. Introducing Claude 4. 2025 [Cited 2025 June 25]. Available from: https:\/\/www.anthropic.com\/news\/claude-4"},{"key":"pdig.0001671.ref011","unstructured":"Lee G, et al. EHRSQL-2024 GitHub Repository. 2024 [Cited 2025 June 12]. Available from: https:\/\/github.com\/glee4810\/ehrsql-2024"},{"issue":"5","key":"pdig.0001671.ref012","doi-asserted-by":"crossref","first-page":"952","DOI":"10.1097\/CCM.0b013e31820a92c6","article-title":"Multiparameter intelligent monitoring in intensive care II: a public-access intensive care unit database","volume":"39","author":"M Saeed","year":"2011","journal-title":"Crit Care Med"},{"key":"pdig.0001671.ref013","unstructured":"Johnson AEW, Pollard TJ, Shen L, Lehman L w H, Feng M, Ghassemi M, et al. MIMIC-IV (version 2.2). 2022 [Cited 2025 May 30]. Available from: https:\/\/physionet.org\/content\/mimiciv\/2.2\/"},{"issue":"1","key":"pdig.0001671.ref014","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1038\/s41597-022-01899-x","article-title":"MIMIC-IV, a freely accessible electronic health record dataset","volume":"10","author":"AEW Johnson","year":"2023","journal-title":"Sci Data"},{"key":"pdig.0001671.ref015","doi-asserted-by":"crossref","unstructured":"Tian Y, Kummerfeld JK, Li TJ-J, Zhang T. SQLucid: grounding natural language database queries with interactive explanations. In: Proceedings of the 37th Annual ACM Symposium on User Interface Software and Technology; 2024. pp. 1\u201320. https:\/\/doi.org\/10.1145\/3654777.3676368","DOI":"10.1145\/3654777.3676368"},{"key":"pdig.0001671.ref016","unstructured":"HL7 International. HL7 FHIR Standard. Official HL7 FHIR Documentation. 2025 [Cited 2025 June 25]. Available from: https:\/\/www.hl7.org\/fhir\/"},{"issue":"4","key":"pdig.0001671.ref017","doi-asserted-by":"crossref","first-page":"718","DOI":"10.1093\/jamia\/ocad002","article-title":"MIMIC-IV on FHIR: converting a decade of in-patient data into an exchangeable, interoperable format","volume":"30","author":"AM Bennett","year":"2023","journal-title":"J Am Med Inform Assoc"},{"key":"pdig.0001671.ref018","unstructured":"OHDSI. Standardized data: the OMOP common data model. 2025 [Cited 2025 June 25]. Available from: https:\/\/www.ohdsi.org\/data-standardization\/"},{"key":"pdig.0001671.ref019","doi-asserted-by":"crossref","unstructured":"Wang P, Shi T, Reddy CK. Text-to-SQL generation for question answering on electronic medical records. In: Proceedings of The Web Conference 2020; 2020. pp. 350\u201361. https:\/\/doi.org\/10.1145\/3366423.3380120","DOI":"10.1145\/3366423.3380120"},{"key":"pdig.0001671.ref020","doi-asserted-by":"crossref","unstructured":"Lee G, Hwang H, Bae S, Kwon Y, Shin W, Yang S, et al. EHRSQL: a practical Text-To-SQL benchmark for electronic health records. In: Advances in Neural Information Processing Systems 35; 2022. pp. 15589\u2013601. https:\/\/doi.org\/10.52202\/068431-1134","DOI":"10.52202\/068431-1134"},{"key":"pdig.0001671.ref021","doi-asserted-by":"crossref","unstructured":"Xiong G, Jin Q, Lu Z, Zhang A. Benchmarking retrieval-augmented generation for medicine. arXiv. 2024. doi: arXiv:240213178","DOI":"10.18653\/v1\/2024.findings-acl.372"},{"key":"pdig.0001671.ref022","doi-asserted-by":"crossref","unstructured":"Li J, Hui B, Qu G, Yang J, Li B, Li B, et al. Can LLM already serve as a database interface? A big bench for large-scale database grounded text-to-SQLs. In: Advances in neural information processing systems 36; 2023. pp. 42330\u201357. https:\/\/doi.org\/10.52202\/075280-1835","DOI":"10.52202\/075280-1835"},{"key":"pdig.0001671.ref023","doi-asserted-by":"crossref","unstructured":"Yu T, Zhang R, Yang K, Yasunaga M, Wang D, Li Z, et al. Spider: a large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL Task. In: Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing; 2018. pp. 3911\u201321. https:\/\/doi.org\/10.18653\/v1\/d18-1425","DOI":"10.18653\/v1\/D18-1425"},{"key":"pdig.0001671.ref024","unstructured":"Zhong V, Xiong C, Socher R. Seq2SQL: generating structured queries from natural language using reinforcement learning. arXiv. 2017. https:\/\/arxiv.org\/abs\/1709.00103"},{"key":"pdig.0001671.ref025","unstructured":"Koretsky MJ, Willey M, Asija A, Bianchi O, Alvarado CX, Nayak T. BiomedSQL: text-to-SQL for scientific reasoning on biomedical knowledge bases. arXiv. https:\/\/arxiv.org\/abs\/250520321"},{"key":"pdig.0001671.ref026","doi-asserted-by":"crossref","unstructured":"Lee G, Kweon S, Bae S, Choi E. Overview of the EHRSQL 2024 shared task on reliable text-to-SQL modeling on electronic health records. In: Proceedings of the 6th Clinical Natural Language Processing Workshop; 2024. pp. 644\u201354. https:\/\/doi.org\/10.18653\/v1\/2024.clinicalnlp-1.62","DOI":"10.18653\/v1\/2024.clinicalnlp-1.62"},{"key":"pdig.0001671.ref027","unstructured":"Lee G, Chay W, Cho S, Choi E. TrustSQL: benchmarking text-to-SQL reliability with penalty-based scoring. arXiv. 2024. doi: arXiv:240315879"},{"key":"pdig.0001671.ref028","unstructured":"OWASP Foundation. SQL injection prevention cheat sheet. 2023 [Cited 2025 June 4] Available from: https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/SQL_Injection_Prevention_Cheat_Sheet.html"},{"key":"pdig.0001671.ref029","unstructured":"IntuitionLabs. Model Context Protocol (MCP) in Pharma. 2025 [Cited 2025 June 14]. Available from: https:\/\/intuitionlabs.ai\/articles\/model-context-protocol-mcp-in-pharma"},{"key":"pdig.0001671.ref030","unstructured":"SuperAGI. Future of industrial automation: trends and predictions for mcp server adoption in smart manufacturing. 2025 [Cited 2025 June 14] Available from: https:\/\/superagi.com\/future-of-industrial-automation-trends-and-predictions-for-mcp-server-adoption-in-smart-manufacturing\/"},{"key":"pdig.0001671.ref031","unstructured":"Anthropic. Claude Desktop Application. 2025 [Cited 2025 June 25]. Available from: https:\/\/claude.ai\/download"},{"key":"pdig.0001671.ref032","unstructured":"LM Studio. LM Studio. 2024 [Cited 1 October 2025]. Available from: https:\/\/lmstudio.ai\/"},{"key":"pdig.0001671.ref033","unstructured":"OpenAI. gpt-oss-120b & gpt-oss-20b model card. 2025. Available from: https:\/\/openai.com\/index\/introducing-gpt-oss\/"},{"key":"pdig.0001671.ref034","unstructured":"LM Studio. gpt-oss-20b-GGUF; 2025. Llama.cpp GGUF build of openai\/gpt-oss-20b, native MXFP4 quantization. Available from: https:\/\/huggingface.co\/lmstudio-community\/gpt-oss-20b-GGUF. 2025."},{"key":"pdig.0001671.ref035","doi-asserted-by":"crossref","unstructured":"Pourreza M, Rafiei D. Evaluating cross-domain text-to-SQL models and benchmarks. In: Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing; 2023. pp. 1601\u201311. https:\/\/doi.org\/10.18653\/v1\/2023.emnlp-main.99","DOI":"10.18653\/v1\/2023.emnlp-main.99"},{"key":"pdig.0001671.ref036","doi-asserted-by":"crossref","unstructured":"Min S, J M, Zettlemoyer L, Hajishirzi H. AmbigQA: answering ambiguous open-domain questions. In: Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP); 2020. pp. 9199\u2013212.","DOI":"10.18653\/v1\/2020.emnlp-main.466"},{"issue":"7972","key":"pdig.0001671.ref037","doi-asserted-by":"crossref","first-page":"172","DOI":"10.1038\/s41586-023-06291-2","article-title":"Large language models encode clinical knowledge","volume":"620","author":"K Singhal","year":"2023","journal-title":"Nature"},{"issue":"2","key":"pdig.0001671.ref038","doi-asserted-by":"crossref","first-page":"100205","DOI":"10.1016\/j.patter.2021.100205","article-title":"Algorithmic injustice: a relational ethics approach","volume":"2","author":"A Birhane","year":"2021","journal-title":"Patterns (N Y)"},{"issue":"6464","key":"pdig.0001671.ref039","doi-asserted-by":"crossref","first-page":"447","DOI":"10.1126\/science.aax2342","article-title":"Dissecting racial bias in an algorithm used to manage the health of populations","volume":"366","author":"Z Obermeyer","year":"2019","journal-title":"Science"}],"container-title":["PLOS Digital Health"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dx.plos.org\/10.1371\/journal.pdig.0001671","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,17]],"date-time":"2026-09-17T17:21:49Z","timestamp":1789665709000},"score":1,"resource":{"primary":{"URL":"https:\/\/dx.plos.org\/10.1371\/journal.pdig.0001671"}},"subtitle":[],"editor":[{"given":"Phat Kim","family":"Huynh","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"editor"}]}],"short-title":[],"issued":{"date-parts":[[2026,9,17]]},"references-count":39,"journal-issue":{"issue":"9","published-online":{"date-parts":[[2026,9,17]]}},"URL":"https:\/\/doi.org\/10.1371\/journal.pdig.0001671","relation":{},"ISSN":["2767-3170"],"issn-type":[{"value":"2767-3170","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,9,17]]}}}