ARTICLE

Volume 3,Issue 7

Cite this article
3
Download
25
Citations
141
Views
14 January 2026

HealSQL:一个通过类强化学习范式自我优化的医疗
领域Text-to-SQL 系统

思涵 李1 妍雪 陈1 璐华 曹2 文枫 沈3 雨浩 张3 世杰 盖3 晨阳 宋3 欢 王2
Show Less
1 上海理工大学公利医院医疗技术学院, 中国
2 上海健康医学院附属浦东公利医院, 中国
3 上海第二工业大学计算机与信息工程学院, 中国
TACS 2026 , 3(1), 102–108; https://doi.org/10.61369/TACS.2026010003
© 2026 by the Author(s). Licensee Art and Technology, USA. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution -Noncommercial 4.0 International License (CC BY-NC 4.0) ( https://creativecommons.org/licenses/by-nc/4.0/ )
Abstract

随着医疗信息化加速,海量数据为临床研究提供了巨大机遇,但非技术专家面临着复杂的数据查询鸿沟。为解决此问题,Text-to-SQL 技术应运而生,但在处理专业医疗术语和复杂临床逻辑时,其准确性与鲁棒性仍面临严峻挑战。本文提出并实现了一个名为“HealSQL”的 Text-to-SQL 系统,其核心愿景是赋予数据库系统以“自我诊断与愈合”的能力。首先,本研究构建了一个彻底解耦的、由外部知识库驱动的架构,将业务逻辑与通用查询引擎分离。其次,最关键的创新是设计了一个基于类强化学习(Reinforcement Learning-like)范式的自动化自愈闭环。在该闭环中,AI 测试代理模拟“病原体”生成对抗性问题,测试套件作为“诊断器”捕捉系统缺陷,AI 优化器则针对失败案例“对症下药”,生成知识库“补丁”以修复认知漏洞。这种方法使系统能够持续从错误中“康复”并建立对类似错误的“免疫机制”。实验证明,经过几轮自动化进化,系统在处理复杂临床查询上的准确率显著提升,验证了该“自愈”框架的有效性。

Keywords
大语言模型
检索增强生成
强化学习
数据库查询
References

[1] Ahmed, F., Ahasan, M.M., Monon, J.S., Wahed, M., Amin, A., Rahman, A.K., & Ali, A.A. (2025). BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation.arXiv:2511.04153
[2] Li, Q., Pan, M., Xiong, K., Su, G., Shen, Z., Liu, Y., Sun, B., Peng, H., & Zhang, X. (2025). RAGFort: Dual-Path Defense Against Proprietary Knowledge Base Extraction in Retrieval-Augmented Generation. arXiv:2511.10128.
[3]Cuconasu F, Trappolini G, Siciliano F, et al. The power of noise: Redefining retrieval for rag systems[C]//Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval. 2024: 719-729.
[4] Pandey, H.M., Gupta, A., Sarkar, S., Tomer, M., Johannes, S., & Gong, Y. (2025). GEMMA-SQL: A Novel Text-to-SQL Model Based on Large Language Models.arXiv:2511.04710
[5] Nam D, Macvean A, Hellendoorn V, et al. Using an llm to help with code understanding[C]//Proceedings of the IEEE/ACM 46th International Conference on Software Engineering. 2024: 1-13.
[6] Zhou H, Hu C, Yuan Y, et al. Large language model (llm) for telecommunications: A comprehensive survey on principles, key techniques, and opportunities[J]. IEEE Communications Surveys & Tutorials, 2024.
[7] 刘彦宏, 崔永瑞. 基于 Word2Vec 模型与 RAG 框架的医疗检索增强生成算法[J]. Artificial Intelligence and Robotics Research, 2024, 13: 479.
[8] 刘浩然. 基于检索增强生成与软提示优化的大模型开放域问答方法[J]. Modeling and Simulation, 2025, 14: 901.
[9] Li B, Xu Z, Xie R. Language Drift in Multilingual Retrieval-Augmented Generation: Characterization and Decoding-Time Mitigation[EB/OL]. arXiv:2511.09984, 2025.
[10]Arslan M, Ghanem H, Munawar S, et al. A Survey on RAG with LLMs[J]. Procedia computer science, 2024, 246: 3781-3790.
[11]Cuconasu F, Trappolini G, Siciliano F, et al. The power of noise: Redefining retrieval for rag systems[C]//Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval. 2024: 719-729.
[12] 杨涛, 余颖, 万亚平. “智能健康与医疗” 专辑+ DiaRAG: 面向糖尿病领域的智能问答系统[J]. 工程科学学报.
[13]Zhou H, Hu C, Yuan Y, et al. Large language model (llm) for telecommunications: A comprehensive survey on principles, key techniques, and opportunities[J]. IEEE Communications Surveys & Tutorials, 2024.
[14]Pan J J, Wang J, Li G. Vector database management techniques and systems[C]//Companion of the 2024 International Conference on Management of Data. 2024: 597-604.
[15]Taipalus T. Vector database management systems: Fundamental concepts, use-cases, and current challenges[J]. Cognitive Systems Research, 2024, 85: 101216.
[16]Bradley Brown, Jordan Juravsky, Ryan Ehrlich, Ronald Clark, Quoc V Le, Christopher Ré, and Azalia Mirhoseini. 2024. Large language monkeys: Scalinginference compute with repeated sampling.arXiv:2407.21787.
[17] 李洲, 王星捷, 韩楠, 等. 多域人机交互场景下中文 SQL 生成算法[J]. 重庆理工大学学报 ( 自然科学), 2025, 39(6): 100-107.
[18]Qin B, Hui B, Wang L, et al. A survey on text-to-sql parsing: Concepts, methods, and future directions[J]. arXiv preprint arXiv:2208.13629, 2022.
[19]Kanburo lu A B, Tek F B. Text-to-SQL: A methodical review of challenges and models[J]. Turkish Journal of Electrical Engineering and Computer Sciences, 2024,32(3): 403-419.
[20]Sivasothy S, Barnett S, Kurniawan S, et al. RAGProbe: An automated approach for evaluating RAG applications[J]. arXiv preprint arXiv:2409.19019, 2024.
[21]Fatehkia M, Lucas J K, Chawla S. T-RAG: lessons from the LLM trenches[J]. arXiv preprint arXiv:2402.07483, 2024.
[22]Jiao, Y., Ren, T., Gao, Y., He, Z., Jing, Y., Zhang, K., & Wang, X.S. (2025). ORANGE: An Online Reflection ANd GEneration framework with Domain Knowledge for Text-to-SQL.arXiv:2511.00985
[23] Xu, Z., Xia, S., Yue, C., Chai, J., Tian, M., Wang, X., Lin, W., Li, H., & Yin, G. (2025). MTIR-SQL: Multi-turn Tool-Integrated Reasoning Reinforcement Learning for Text-to-SQL.arXiv:2510.25510
[24]Luo, W., Guan, W., Yao, Y., Pan, Y., Wang, F., Yu, Z., Wen, Z., Chen, L., & Zhuang, Y. (2025). Falcon: A Comprehensive Chinese Text-to-SQL Benchmark for Enterprise-Grade Evaluation.arXiv:2510.24762.

Share
Back to top