面向医疗大模型检索增强生成的循证装箱上下文调度算法
Evidence-Based Packing Context Scheduling Algorithm for Retrieval-Augmented Generation in Medical Large Language Models
DOI: 10.12677/mos.2026.155082, PDF,   
作者: 田行健:北京建筑大学理学院,北京;王俊翔:中国科学院计算技术研究所,北京;张 勉*:北京建筑大学智能科学与技术学院,北京
关键词: 医疗大模型检索增强生成(RAG)上下文调度多重选择背包问题(MCKP)循证医学Medical Large Language Models (LLMs) Retrieval-Augmented Generation (RAG) Context Scheduling Multiple Choice Knapsack Problem (MCKP) Evidence-Based Medicine (EBM)
摘要: 在医疗大模型辅助诊断场景中,检索增强生成(RAG)技术被广泛用于融合多模态患者数据。然而,受限于大语言模型(LLM)的上下文窗口,传统截断或均匀压缩策略易导致关键的高临床价值信息(如过敏史)丢失,引发医疗安全隐患。针对此痛点,本文提出一种基于循证医学(EBM)的装箱调度算法(EBM-Pack)。该算法将运筹学中的多重选择背包问题(MCKP)引入上下文调度,首先通过预分类器为不同模态特征赋予基于诊断客观性的临床权重,并允许高危特征扩展出“全量”与“保真压缩”互斥状态;随后采用带互斥检查的线性贪心算法实现全局效用最大化。实验结果表明,在200道MedQA题目的溢出场景及256 Token极限窗口下,EBM-Pack的高危证据保留率(RRCE)达98.4%,端到端诊断准确率较基线提升18.5个百分点。此外,多LLM泛化实验证实了该算法在异构模型上的稳定性;在高信噪比(N = 200)环境与消融实验中,算法展现出优异的抗噪鲁棒性与参数寻优机制的有效性,为医疗大模型的安全落地提供了可靠方案。
Abstract: In the context of medical large language model (LLM) assisted diagnosis, Retrieval-Augmented Generation (RAG) is widely employed to integrate multimodal patient data. However, constrained by the limited context window of LLMs, traditional truncation or uniform compression strategies often lead to the loss of critical, high-clinical-value information (such as allergy histories), thereby posing significant medical safety risks. To address this critical issue, this paper proposes an Evidence-Based Medicine (EBM) packing scheduling algorithm, termed EBM-Pack. This algorithm introduces the Multiple Choice Knapsack Problem (MCKP) from operations research into context scheduling. It first utilizes a pre-classifier to assign clinical weights to different modality features based on diagnostic objectivity, allowing high-risk features to expand into mutually exclusive states: “full-text” and “high-fidelity compression”. Subsequently, a linear greedy algorithm with mutual exclusion checking is employed to maximize the global clinical utility. Experimental results demonstrate that in an overflow scenario involving 200 MedQA questions with an extreme window limit of 256 tokens, EBM-Pack achieves a Retention Rate of Critical Evidence (RRCE) of 98.4% and improves end-to-end diagnostic accuracy by 18.5 percentage points compared to baseline methods. Furthermore, multi-LLM generalization experiments confirm the algorithm’s stability across heterogeneous models. In high noise-to-signal ratio environments (N = 200) and ablation studies, the algorithm exhibits excellent noise robustness and validates the effectiveness of its parameter optimization mechanism, providing a reliable solution for the safe deployment of medical LLMs.
文章引用:田行健, 王俊翔, 张勉. 面向医疗大模型检索增强生成的循证装箱上下文调度算法[J]. 建模与仿真, 2026, 15(5): 185-196. https://doi.org/10.12677/mos.2026.155082

参考文献

[1] Esteva, A., Kuprel, B., Novoa, R.A., Ko, J., Swetter, S.M., Blau, H.M., et al. (2017) Dermatologist-Level Classification of Skin Cancer with Deep Neural Networks. Nature, 542, 115-118. [Google Scholar] [CrossRef] [PubMed]
[2] Lewis, P., Perez, E., Piktus, A., et al. (2020) Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Advances in Neural Information Processing Systems, 33, 9459-9474.
[3] Xiong, G., Jin, Q., Lu, Z. and Zhang, A. (2024) Benchmarking Retrieval-Augmented Generation for Medicine. Findings of the Association for Computational Linguistics ACL 2024, Bangkok, 11-16 August 2024, 6233-6251. [Google Scholar] [CrossRef
[4] Yue, Z., Wang, Y., Chen, Y., et al. (2024) RankRAG: Unifying Context Ranking with Retrieval-Augmented Generation in LLMs. Advances in Neural Information Processing Systems, 37, 121156-121184. [Google Scholar] [CrossRef
[5] Xu, F., Shi, W. and Choi, E. (2024) RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentation. The Twelfth International Conference on Learning Representations (ICLR 2024), Vienna, 7-11 May 2024.
https://openreview.net/forum?id=mlJLVigNHp
[6] Peng, C., Wang, B., Long, Z. and Sheng, J. (2025) AdaGReS: Adaptive Greedy Context Selection via Redundancy-Aware Scoring for Token-Budgeted RAG. arXiv:2512.25052.
[7] Cao, L., Chen, Q. and Guo, Y. (2026) EHR-RAG: Bridging Long-Horizon Structured Electronic Health Records and Large Language Models via Enhanced Retrieval-Augmented Generation. arXiv:2601.21340.
[8] Nath, S., et al. (2025) Less Context, Same Performance: A RAG Framework for Resource-Efficient LLM-Based Clinical NLP. arXiv:2505.20320.
[9] Sun, M., Zhao, S., Chen, J., Wang, H. and Qin, B. (2025) META-RAG: Meta-Analysis-Inspired Evidence-Re-Ranking Method for Retrieval-Augmented Generation in Evidence-Based Medicine. arXiv:2510.24003.
[10] Jin, D., Pan, E., Oufattole, N., et al. (2020) What Disease Does This Patient Have? A Large-Scale Open Domain Question Answering Dataset from Medical Exams. arXiv:2009.13081.