[1]王海涛,师杨坤.基于大语言模型的查询扩展方法研究[J].计算机技术与发展,2025,(03):148-155.[doi:10.20165/j.cnki.ISSN1673-629X.2024.0353]
 WANG Hai-tao,SHI Yang-kun.Research on Query Extension Method Based on Large Language Model[J].,2025,(03):148-155.[doi:10.20165/j.cnki.ISSN1673-629X.2024.0353]
点击复制

基于大语言模型的查询扩展方法研究()

《计算机技术与发展》[ISSN:1006-6977/CN:61-1281/TN]

卷:
期数:
2025年03期
页码:
148-155
栏目:
人工智能
出版日期:
2025-03-10

文章信息/Info

Title:
Research on Query Extension Method Based on Large Language Model
文章编号:
1673-629X(2025)03-0148-08
作者:
王海涛师杨坤
河南理工大学 计算机科学与技术学院,河南 焦作 454003
Author(s):
WANG Hai-taoSHI Yang-kun
School of Computer Science and Technology,Henan Polytechnic University,Jiaozuo 454003,China
关键词:
检索增强生成大语言模型查询扩展特征提取提示词
Keywords:
retrieval augmented generationlarge language modelquery extensionfeature extractionprompts
分类号:
TP391.1
DOI:
10.20165/j.cnki.ISSN1673-629X.2024.0353
摘要:
检索增强生成(Retrieval Augmented Generation,RAG)技术能够很好地缓解传统大语言模型的幻觉问题以及在处理实时动态知识问题上的时效性问题,但已有的方法在检索的准确率和召回率方面仍有待提升。 为了解决这一问题,提出了一种基于查询重写的方法 Query2Query,旨在对查询语句进行更深层次的特征挖掘,从而提高用户输入文本与知识库文本的语义对齐度。 该方法将大语言模型视为生成器,利用其生成能力将用户输入的原始查询根据预定义的提示词(prompt)进行改写,设计了一种 TAO(Task-Action-Objective)提示词框架,从任务、行为及目标三个方面规范提示词的输出,并使用“What”“How”“Why”三个疑问词对用户原始查询进行结构化重写,扩展原始查询语义丰富度,使得重写后的查询可以覆盖更多潜在的相关信息,从而提升检索的准确率,最终将模型输出视为相关性文档,联合原始查询送入生成模型得到最终结果。 在 TERC DL’19 和 TERC DL’20 数据集上对该框架进行评估,实验结果表明,该方法在检索任务中的准确率和召回率均有所提升。
Abstract:
Retrieval Augmented Generation (RAG) has proven effective in mitigating issues of hallucinations in traditional large language models (LLMs) and addressing challenges related to real-time knowledge processing. However,existing methods still face limitations in terms of retrieval precision and recall. To address these limitations,we propose a novel query-rewriting approach,Query2Query,aimed at deeper feature extraction from query statements to enhance semantic alignment between user inputs and knowledge base content. This ap-proach conceptualizes LLMs as generative agents,utilizing their generative capacity to rewrite users’ original queries based on predefined prompts. Specifically,we introduce the TAO ( Task - Action - Objective) prompting framework, which structures prompts along the dimensions of task,action, and objective. Furthermore, we leverage the " What " " How" and " Why" interrogatives to perform a structured rewrite of users’ original queries,enriching the semantic depth of the query and covering a broader range of potentially relevant information. This enriched rewriting process significantly enhances retrieval accuracy. The final model output is treated as relevance-weighted documents,which combined with the original query,is fed into a generation model to produce the final output. Evaluations on the TERC DL’19 and TERC DL’20 datasets demonstrate that this framework improves both precision and recall in retrieval tasks.

相似文献/References:

[1]孙晓晔,成彬*,王程.基于ChatGLM3-6B的方面级情感分析研究[J].计算机技术与发展,2025,(05):106.[doi:10.20165/j.cnki.ISSN1673-629X.2024.0391]
 SUN Xiao-ye,CHENG Bin*,WANG Cheng.Research on Aspect-based Sentiment Analysis Based on ChatGLM3-6B[J].,2025,(03):106.[doi:10.20165/j.cnki.ISSN1673-629X.2024.0391]
[2]曹茂俊,张光瀚.一种面向测井解释软件的代码自动生成方法[J].计算机技术与发展,2025,(05):111.[doi:10.20165/j.cnki.ISSN1673-629X.2025.0032]
 CAO Mao-jun,ZHANG Guang-han.An Automatic Code Generation Method for Logging Interpretation Software[J].,2025,(03):111.[doi:10.20165/j.cnki.ISSN1673-629X.2025.0032]
[3]解勉,陈刚,余晓晗.基于大语言模型的论文检索与分析方法研究[J].计算机技术与发展,2024,34(12):116.[doi:10.20165/j.cnki.ISSN1673-629X.2024.0236]
 XIE Mian,CHEN Gang,YU Xiao-han.Research on Retrieval and Analysis Methods of Papers Based on Large Language Models[J].,2024,34(03):116.[doi:10.20165/j.cnki.ISSN1673-629X.2024.0236]
[4]张又元,马新春,赵军.基于LLMs的危化品典型事故文本分类研究[J].计算机技术与发展,2025,(07):133.[doi:10.20165/j.cnki.ISSN1673-629X.2025.0054]
 ZHANG You-yuan,MA Xin-chun,ZHAO Jun.Research on Text Classification of Typical Hazardous Chemical Accidents Based on Large Language Models[J].,2025,(03):133.[doi:10.20165/j.cnki.ISSN1673-629X.2025.0054]
[5]鞠炜刚,汪鹏,王佳.基于大语言模型和RAG的持续交付智能问答系统[J].计算机技术与发展,2025,(02):107.[doi:10.20165/j.cnki.ISSN1673-629X.2024.0347]
 JU Wei-gang,WANG Peng,WANG Jia.Continuous Delivery Intelligent Question-answering System Based on Large Language Models and RAG[J].,2025,(03):107.[doi:10.20165/j.cnki.ISSN1673-629X.2024.0347]

更新日期/Last Update: 2025-03-10