RESEARCH PAPERS

Research on Medical Query Intent Recognition Based on LLM Retrieval Re-ranking and Query Optimization

  • Han Pu ,
  • Liu Senling
Expand
  • 1 School of Management, Nanjing University of Posts & Telecommunications, Nanjing 210003;
    2 Jiangsu Provincial Key Laboratory of Data Engineering and Knowledge Service, Nanjing 210023

Received date: 2025-08-20

  Revised date: 2026-01-29

  Online published: 2026-10-20

Supported by

This work is supported by the National Social Science Fund of China project titled “Research on Knowledge Organization Mode for Multimodal Healthcare Data” (Grant No. 22BTQ096).

Abstract

[Purpose/Significance] To solve problems such as semantic ambiguity and incomplete structure of user queries and improve the effectiveness of medical query intent recognition, an intent recognition method RRQ-LMIR based on LLM retrieval re-ranking and query optimization is proposed. [Method/Process] Firstly, a hybrid retrieval strategy is utilized to obtain candidate examples with semantics similar to the user’s original query from an external knowledge base. Then, structured prompt information is constructed to guide the LLM to re-rank the candidate results in terms of semantic relevance. Subsequently, based on the re-ranking results, the LLM is utilized to generate an optimized query with clearer semantics and a more complete structure. Finally, a fine-tuned deep learning model is adopted to classify the intentions of the initial query and the optimized query, and the final prediction result is obtained through an equal-weight fusion strategy. [Result/Conclusion] The experimental results show that the F1-score of the RRQ-LMIR method for medical query intent recognition constructed in this paper reaches 84.30%, which is 3.26% and 22.7% higher than those of the current mainstream deep learning model RoBERTa-wwm-ext and the large language model GPT-5, respectively. The method proposed in this paper effectively solves problems such as semantic ambiguity and incomplete structure, and improves the performance of medical query intent recognition.

Cite this article

Han Pu , Liu Senling . Research on Medical Query Intent Recognition Based on LLM Retrieval Re-ranking and Query Optimization[J]. Library and Information Service, 2026 , 70(21) : 60 -70 . DOI: 10.13266/j.issn.0252-3116.2026.21.005

References

[1] SANGAIAH A K, REZAEI S, JAVADPOUR A, et al. Explainable AI in big data intelligence of community detection for digitalization e-healthcare services[J]. Applied soft computing, 2023, 136: 110119.
[2] DAI S, XU C, XU S, et al. Bias and unfairness in information retrieval systems: new challenges in the LLM era[C]//Proceedings of the 30th ACM SIGKDD conference on knowledge discovery and data mining. Barcelona: ACM, 2024: 6437-6447.
[3] ZHAO W X, LIU J, REN R, et al. Dense text retrieval based on pretrained language models: a survey[J]. ACM transactions on information systems, 2024, 42(4): 1-60.
[4] 谌文佳, 杨琳, 李金林.嵌入意图识别的医疗健康问答文本语义分类模型[J]. 数据分析与知识发现, 2025, 9(2): 26-38. (CHEN W J, YANG L, LI J L. Semantic classification model for healthcare Q&A texts with embedded intent recognition[J]. Data analysis and knowledge discovery, 2025, 9(2): 26-38.)
[5] ZHANG X, CAI F, HU X, et al. A contrastive learning-based task adaptation model for few-shot intent recognition[J]. Information processing & management, 2022, 59(3): 102863.
[6] ZHANG R, LUO S, PAN L, et al. Strengthened multiple correlation for multi-label few-shot intent detection[J]. Neurocomputing, 2023, 523(59): 191-198.
[7] 张乐, 陈岩松, 张雷瀚.融合大语言模型结构化信息和主题语法图的评论摘要生成方法[J]. 图书情报工作, 2025, 69(15): 75-87. (ZHANG L, CHEN Y S, ZHANG L H. A review summarization generation method integrating structured information of large language models and topic syntax graph[J]. Library and information service, 2025, 69(15): 75-87.)
[8] 夏立新, 龙存钰, 胡畔, 等.基于查询意图的细粒度图书分面检索研究[J]. 图书情报工作, 2024, 68(8): 122-132. (XIA L X, LONG C Y, HU P, et al. A study of fine-grained book-faceted retrieval based on query intent[J]. Library and information service, 2024, 68(8): 122-132)
[9] 赵一鸣, 潘沛, 毛进.基于任务知识融合与文本数据增强的医学信息查询意图强度识别研究[J]. 数据分析与知识发现, 2023, 7(2): 38-47. (ZHAO Y M, PAN P, MAO J. Recognizing intensity of medical query intentions based on task knowledge fusion and text data enhancement[J]. Data analysis and knowledge discovery, 2023, 7(2): 38-47.)
[10] NAHM U Y, MOONEY R J. Text mining with information extraction[C]//Proceedings of the AAAI 2002 spring symposium on mining answers from texts and knowledge bases. Stanford: The AAAI Press, 2002, 60-67.
[11] RAMANAND J, BHAVSAR K, PEDANEKAR N. Wishful thinking-finding suggestions and ’buy’ wishes from product reviews[C]//Proceedings of the NAACL HLT 2010 workshop on computational approaches to analysis and generation of emotion in text. Los Angeles: Association for Computational Linguistics, 2010: 54-61.
[12] 曹天甲, 程龙龙, 李世锋, 等.基于对比学习的临床领域意图识别算法研究[J]. 天津大学学报(自然科学与工程技术版), 2024, 57(8): 821-827. (CAO T J, CHENG L L, LI S F, et al. Contrastive learning-based algorithm for clinic intent recognition[J]. Journal of Tianjin University(science and technology), 2024, 57(8): 821-827.)
[13] 钱岳, 丁效, 刘挺, 等.聊天机器人中用户出行消费意图识别方法[J]. 中国科学:信息科学, 2017, 47(8): 997-1007. (QIAN Y, DING X, LIU T, et al. Identification method of user’s travel consumption intention in chatting robot[J]. Scientia sinica(informationis), 2017, 47(8): 997-1007.)
[14] HE C, CHEN S, HUANG S, et al. Using convolutional neural network with BERT for intent determination[C]//2019 International conference on asian language processing. Shanghai: IEEE, 2019: 65-70.
[15] ZHANG H, ZHANG Y, ZHAN L M, et al. Effectiveness of pre-training for few-shot intent classification[C]//Findings of the Association for Computational Linguistics: EMNLP 2021. Punta Cana: ACL, 2021: 1114-1120.
[16] PAN L, HANG C W, SIL A, et al. Improved text classification via contrastive adversarial training[C]//Proceedings of the AAAI conference on artificial intelligence. Palo Alto: AAAI Press, 2022, 36(10): 11130-11138.
[17] WANG Y, WANG S, LI Y, et al. Recognizing medical search query intent by few-shot learning[C]//Proceedings of the 45th international ACM SIGIR conference on research and development in information retrieval. Madrid: ACM, 2022: 502-512.
[18] 韩普, 李雄, 陈文祺, 等. AIGC驱动的医疗健康领域知识服务模式研究[J]. 现代情报, 1-18[2026-01-02]. https://link.cnki.net/urlid/22.1182.G3.20251118.1447.002. (HAO P, LI X, CHEN W Q, et al. Research on AIGC-driven knowledge service mode in the healthcare field[J/OL]. Journal of modern information, 1-18[2026-01-02]. https://link.cnki.net/urlid/22.1182.G3.20251118.1447.002.)
[19] SONG M, ZHENG M. A survey of query optimization in large language models[PP/OL]. [2026-09-21]. https://arxiv.org/html/2412.17558V1.
[20] WANG L, YANG N, WEI F. Query2doc: Query expansion with large language models[C]//Proceedings of the 2023 conference on empirical methods in natural language processing. Singapore: ACL, 2023: 9414-9423.
[21] GAO L, MA X, LIN J, et al. Precise zero-shot dense retrieval without relevance labels[C]//Proceedings of the 61st annual meeting of the Association for Computational Linguistics. Toronto: ACL, 2023: 1762-1777.
[22] ZHOU D, SCHÄRLI N, HOU L, et al. Least-to-most prompting enables complex reasoning in large language models[PP/OL]. [2026-09-21]. https://arxiv.org/html/2205.10625v3.
[23] ZHENG H S, MISHRA S, CHEN X, et al. Take a step back: evoking reasoning via abstraction in large language models[PP/OL]. [2026-09-21]. https://doi.org/10.48550/arXiv.2310.06117.
[24] KIM G, KIM S, JEON B, et al. Tree of clarifications: answering ambiguous questions with retrieval-augmented large language models[C]//Proceedings of the 2023 conference on empirical methods in natural language processing. Singapore: ACL, 2023: 996-1009.
[25] 杨峰, 赵悦言, 周文杰, 等.基于双层检索增强生成技术的红色资源数字叙事实现初探[J]. 情报理论与实践, 2025, 48(8): 196-205. (YANG F, ZHAO Y Y, ZHOU W J, et al. The initial exploration of red resource digital narratives based on dual-layer retrieval-augmented generation technology[J]. Information studies: theory & application, 2025, 48(8): 196-205.)
[26] 孟序阳, 王昊, 李远清, 等.基于细粒度知识图谱检索增强生成的提示学习研究[J]. 数据分析与知识发现, 2025, 9(9): 1-12. (MENG X Y, WANG H, LI Y Q, et al. Prompt learning based on retrieval-augmented generation with fine-grained knowledge graph[J]. Data analysis and knowledge discovery, 2025, 9(9): 1-12.)
[27] SHARIFYMOGHADDAM S, PRADEEP R, SLAVESCU A, et al. RankLLM: a python package for reranking with LLMs[C]//Proceedings of the 48th international ACM SIGIR conference on research and development in information retrieval. Padua: ACM, 2025: 3681-3690.
[28] ROBERTSON S, ZARAGOZA H. The probabilistic relevance framework: BM25 and beyond[J]. Foundations and trends® in information retrieval, 2009, 3(4): 333-389.
[29] JING L P, HUANG H K, SHI H B. Improved feature selection approach TFIDF in text mining[C]//Proceedings. international conference on machine learning and cybernetics. Beijing: IEEE, 2002, 2: 944-946.
[30] ZHAO W X, LIU J, REN R, et al. Dense text retrieval based on pretrained language models: a survey[J]. ACM transactions on information systems, 2024, 42(4): 1-60.
[31] DOAN N N, HÄRMÄ A, CELEBI R, et al. A hybrid retrieval approach for advancing retrieval-augmented generation systems[C]//Proceedings of the 7th international conference on natural language and speech processing. Trento: ACL, 2024: 397-409.
[32] 海佳丽, 汪润, 袁良志, 等.基于检索增强的中医药标准知识问答系统构建探索与实践[J]. 数据分析与知识发现, 2025, 9(7): 165-174. (HAI J L, WANG R, YUAN L Z, et al. Constructing a retrieval-augmented question-answering system for traditional Chinese medicine standards[J]. Data analysis and knowledge discovery, 2025, 9(7): 165-174.)
[33] ZHANG N, CHEN M, BI Z, et al. CBLUE: a Chinese biomedical language understanding evaluation benchmark[C]//Proceedings of the 60th annual meeting of the Association for Computational Linguistics. Dublin: ALC, 2022: 7888-7915.
[34] WANG G, DU Y, JIANG Y. LSPCL: label-specific supervised prototype contrastive learning for multi-label text classification[J]. Knowledge-based systems, 2025, 309: 112887.
[35] JOULIN A, GRAVE É, BOJANOWSKI P, et al. Bag of tricks for efficient text classification[C]//Proceedings of the 15th conference of the European Chapter of the Association for Computational Linguistics. Valencia: ACL, 2017: 427-431.
[36] LIU P, QIU X, HUANG X. Recurrent neural network for text classification with multi-task learning[C]//Proceedings of the twenty-fifth international joint conference on artificial intelligence. Vienna: IJCAI, 2016: 2873-2879.
[37] 王金政, 杨颖, 余本功.基于多头协同注意力机制的客户投诉文本分类模型[J]. 数据分析与知识发现, 2023, 7(1): 128-137. (WANG J Z, YANG Y, YU B G. Classifying customer complaints based on multi-head co-attention mechanism[J]. Data analysis and knowledge discovery, 2023, 7(1): 128-137.)
[38] HAO Y, USAMA M, YANG J, et al. Recurrent convolutional neural network based multimodal disease risk prediction[J]. Future generation computer systems, 2019, 92: 76-83.
[39] DEVLIN J, CHANG M W, LEE K, et al. Bert: pre-training of deep bidirectional transformers for language understanding[C]//Proceedings of the 2019 conference of the North American Chapter of the Association for Computational Linguistics: human language technologies. Minneapolis: ACL, 2019: 4171-4186.
[40] CUI Y, CHE W, LIU T, et al. Pre-training with whole word masking for Chinese BERT[J]. IEEE/ACM transactions on audio, speech, and language processing, 2021, 29: 3504-3514.
[41] YANG A, LI A, YANG B, et al. Qwen3 technical report[PP/OL]. [2026-09-21] https://doi.org/10.48550/arXiv.2505.09388.
[42] ZENG A, LV X, ZHENG Q, et al. GLM-4.5: agentic, reasoning, and coding (ARC) foundation models[PP/OL]. [2026-09-21]. https://arxiv.org/abs/2508.06471.
[43] ACHIAM J, ADLER S, AGARWAL S, et al. Gpt-4 technical report[PP/OL]. [2026-09-21]. https://arxiv.org/abs/2303.08774.
[44] GUO D, YANG D, ZHANG H, et al. DeepSeek-r1: incentivizing reasoning capability in llms via reinforcement learning[PP/OL]. [2026-09-21]. https://arxiv.org/abs/2501.12948.
[45] SINGH A, FRY A, PERELMAN A, et al. Openai gpt-5 system card[PP/OL]. [2026-09-21]. https://arxiv.org/abs/2601.03267.
Outlines

/

〈 〉