让医生用自然语言直接问病历数据,无需懂SQL。
M3: Conversational LLMs Simplify Secure Clinical Data Access, Understanding, and Analysis
- 用自然语言指令调用MIMIC-IV数据库,自动处理查询与执行。
- 开源模型gpt-oss-20B本地运行准确率达93%,闭源模型达94%。
- 支持私密部署,适合临床研究者和数据安全敏感场景。
大规模临床数据库为医学研究提供机遇,但其复杂性限制了使用效率。MIMIC-IV是全球最大的开源电子病历数据库之一,传统上需具备SQL技能和临床知识才能使用。本文提出M3系统,通过模型上下文协议实现对MIMIC-IV的自然语言查询。用户仅需一条命令,即可从PhysioNet获取MIMIC-IV数据,启动本地SQLite实例或连接托管的BigQuery,并以中文提问。在EHRSQL 2024基准测试中,闭源Claude Sonnet 4在100个可回答问题上准确率达94%,开源gpt-oss-20B(可在消费级硬件本地部署)达93%;在100个不可回答问题上,该模型正确拒绝生成查询的比例为69%。两模型均能将自然语言转化为SQL,在MIMIC-IV上执行并返回结构化结果及原始查询供验证。错误分析显示主要失败原因在于复杂的时间推理或问题表述模糊,而非架构缺陷。小规模开源模型表现接近闭源模型,证明隐私保护的本地部署在敏感临床数据分析中可行。M3降低技术门槛,集成OAuth2认证、查询验证与审计日志等安全机制。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。