摘要
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.关键词
检索增强生成/大语言模型/查询扩展/特征提取/提示词Key words
retrieval augmented generation/large language model/query extension/feature extraction/prompts分类
计算机与自动化