{
  "abstract": "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’s 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. Author summary: Clinical databases like MIMIC-IV contain detailed patient records that could advance medical knowledge, but analyzing them requires specialized programming skills and understanding of clinical workflows. We developed M3, a tool that lets researchers ask questions about MIMIC-IV data in everyday language instead of writing complex database queries. We tested M3 with two different artificial intelligence models: a commercial model (Claude Sonnet 4) and an open-weights model (gpt-oss-20B) that can run locally on a laptop. Both models answered 93–94% of clinical questions correctly by automatically generating and executing appropriate database queries. When errors occurred, they usually involved questions with multiple valid interpretations or complex time-based logic. The similar performance of the smaller, open-weights model means that researchers concerned about data privacy can analyze clinical information on their own computers without sending queries to external servers. M3 makes clinical data analysis accessible to more researchers while maintaining security protections required for medical information.",
  "abstract_shown": true,
  "affiliations": [
    "Laboratory for Computational Physiology, Massachusetts Institute of Technology, Cambridge, Massachusetts, United States of America",
    "Department of Computer Science, Technical University of Munich, Munich, Germany",
    "Department of Engineering, Universitat Pompeu Fabra, Barcelona, Spain",
    "Office of Data Science, St. Jude Children’s Research Hospital, Memphis, Tennessee, United States of America",
    "Beth Israel Deaconess Medical Center, Boston, Massachusetts, United States of America",
    "Department of Biostatistics, Harvard T.H. Chan School of Public Health, Boston, Massachusetts, United States of America"
  ],
  "article_type": "Research Article",
  "arxiv": null,
  "author_total": 6,
  "authors": [
    {
      "affs": [
        0
      ],
      "name": "Rafi Al Attrach"
    },
    {
      "affs": [
        1
      ],
      "name": "Pedro Moreira"
    },
    {
      "affs": [
        2
      ],
      "name": "Rajna Fani"
    },
    {
      "affs": [
        3
      ],
      "name": "Renato Umeton"
    },
    {
      "affs": [
        4
      ],
      "name": "Amelia Fiske"
    },
    {
      "affs": [
        5
      ],
      "name": "Leo Anthony Celi"
    }
  ],
  "bibtex": "https://research.draconitic.com/paper/frsyyj1acah2w.bib",
  "cited_by": 1,
  "doi": "10.1371/journal.pdig.0001671",
  "fulltext_url": "https://journals.plos.org/digitalhealth/article?id=10.1371/journal.pdig.0001671",
  "id": "frsyyj1acah2w",
  "issns": [
    "2767-3170"
  ],
  "landing_url": "https://journals.plos.org/digitalhealth/article?id=10.1371/journal.pdig.0001671",
  "language": null,
  "licence": "CC-BY-4.0",
  "licence_label": "CC BY 4.0",
  "licence_source": "journal",
  "licence_url": "https://creativecommons.org/licenses/by/4.0/",
  "metadata_licence": null,
  "native_subjects": [
    [
      "openalex",
      "1702|Machine Learning in Healthcare"
    ],
    [
      "plos",
      "/Biology and life sciences/Bioengineering/Biotechnology/Biomimetics"
    ],
    [
      "plos",
      "/Biology and life sciences/Neuroscience/Cognitive science/Cognitive psychology/Language"
    ],
    [
      "plos",
      "/Biology and life sciences/Psychology/Behavior/Imitation"
    ],
    [
      "plos",
      "/Biology and life sciences/Psychology/Cognitive psychology/Language"
    ],
    [
      "plos",
      "/Computer and information sciences/Information technology/Databases"
    ],
    [
      "plos",
      "/Engineering and technology/Bioengineering/Biotechnology/Biomimetics"
    ],
    [
      "plos",
      "/Engineering and technology/Civil engineering/Architectural engineering"
    ],
    [
      "plos",
      "/Medicine and health sciences"
    ],
    [
      "plos",
      "/Research and analysis methods/Database and informatics methods/Database searching"
    ],
    [
      "plos",
      "/Social sciences/Linguistics/Languages/Natural language"
    ],
    [
      "plos",
      "/Social sciences/Psychology/Behavior/Imitation"
    ],
    [
      "plos",
      "/Social sciences/Psychology/Cognitive psychology/Language"
    ]
  ],
  "openalex": "W7213442772",
  "pdf_url": "https://journals.plos.org/digitalhealth/article/file?id=10.1371/journal.pdig.0001671&type=printable",
  "pmcid": null,
  "pmid": null,
  "published": "2026-09-17",
  "publisher": "Public Library of Science",
  "ris": "https://research.draconitic.com/paper/frsyyj1acah2w.ris",
  "sources": [
    {
      "first_seen": "2026-10-30T12:17:49Z",
      "native_id": "10.1371/journal.pdig.0001671",
      "source": "plos",
      "url": "https://journals.plos.org/digitalhealth/article?id=10.1371/journal.pdig.0001671"
    }
  ],
  "subjects": [
    {
      "field": "biology",
      "origin": "plos:neuroscience",
      "subfield": "neuroscience"
    },
    {
      "field": "biology",
      "origin": "plos:biotechnology",
      "subfield": "systems-synthetic"
    }
  ],
  "title": "M3: Conversational LLMs simplify secure clinical data access, understanding, and analysis",
  "title_text": "M3: Conversational LLMs simplify secure clinical data access, understanding, and analysis",
  "type": "peer-reviewed",
  "updated_at": "2026-10-30T12:17:49Z",
  "url": "https://research.draconitic.com/paper/frsyyj1acah2w",
  "venue": "PLOS Digital Health",
  "versions": []
}