<?xml version="1.1" encoding="utf-8"?>
<article xsi:noNamespaceSchemaLocation="http://jats.nlm.nih.gov/publishing/1.1/xsd/JATS-journalpublishing1-mathml3.xsd" dtd-version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><front><journal-meta><journal-id journal-id-type="publisher-id">TACS</journal-id><journal-title-group><journal-title>Technology and Application of Computer Science</journal-title></journal-title-group><issn>2998-8926</issn><eissn>2998-8934</eissn><publisher><publisher-name>Art and Technology</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.61369/TACS.2026010003</article-id><article-categories><subj-group subj-group-type="heading"><subject>Article</subject></subj-group></article-categories><title>HealSQL：一个通过类强化学习范式自我优化的医疗
领域Text-to-SQL 系统</title><url>https://artdesignp.com/journal/TACS/3/1/10.61369/TACS.2026010003</url><author>李思涵,陈妍雪,曹璐华,沈文枫,张雨浩,盖世杰,宋晨阳,王欢</author><pub-date pub-type="publication-year"><year>2026</year></pub-date><volume>3</volume><issue>1</issue><history><date date-type="pub"><published-time>2026-01-14</published-time></date></history><abstract>随着医疗信息化加速，海量数据为临床研究提供了巨大机遇，但非技术专家面临着复杂的数据查询鸿沟。为解决此问题，Text-to-SQL 技术应运而生，但在处理专业医疗术语和复杂临床逻辑时，其准确性与鲁棒性仍面临严峻挑战。本文提出并实现了一个名为&amp;ldquo;HealSQL&amp;rdquo;的 Text-to-SQL 系统，其核心愿景是赋予数据库系统以&amp;ldquo;自我诊断与愈合&amp;rdquo;的能力。首先，本研究构建了一个彻底解耦的、由外部知识库驱动的架构，将业务逻辑与通用查询引擎分离。其次，最关键的创新是设计了一个基于类强化学习（Reinforcement Learning-like）范式的自动化自愈闭环。在该闭环中，AI 测试代理模拟&amp;ldquo;病原体&amp;rdquo;生成对抗性问题，测试套件作为&amp;ldquo;诊断器&amp;rdquo;捕捉系统缺陷，AI 优化器则针对失败案例&amp;ldquo;对症下药&amp;rdquo;，生成知识库&amp;ldquo;补丁&amp;rdquo;以修复认知漏洞。这种方法使系统能够持续从错误中&amp;ldquo;康复&amp;rdquo;并建立对类似错误的&amp;ldquo;免疫机制&amp;rdquo;。实验证明，经过几轮自动化进化，系统在处理复杂临床查询上的准确率显著提升，验证了该&amp;ldquo;自愈&amp;rdquo;框架的有效性。</abstract><keywords>大语言模型,检索增强生成,强化学习,数据库查询</keywords></article-meta></front><body/><back><ref-list><ref id="B1" content-type="article"><label>1</label><element-citation publication-type="journal"><p>[1] Ahmed, F., Ahasan, M.M., Monon, J.S., Wahed, M., Amin, A., Rahman, A.K., &amp;amp; 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., &amp;amp; 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., &amp;amp; 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 &amp;amp; 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] 杨涛, 余颖, 万亚平. &amp;ldquo;智能健康与医疗&amp;rdquo; 专辑+ 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 &amp;amp; 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&amp;eacute;, 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., &amp;amp; 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., &amp;amp; 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., &amp;amp; Zhuang, Y. (2025). Falcon: A Comprehensive Chinese Text-to-SQL Benchmark for Enterprise-Grade Evaluation.arXiv:2510.24762.</p><pub-id pub-id-type="doi"/></element-citation></ref></ref-list></back></article>
