HyQE:利用假设查询嵌入对上下文进行排序
HyQE: Ranking Contexts with Hypothetical Query Embeddings
AI总结:
HyQE提出一种无需微调LLM的可扩展上下文排序框架,通过让预训练LLM基于检索上下文生成假设查询,再计算其与用户查询的嵌入相似度来排序,在多个基准上提升了排序性能。
摘要:
在检索增强系统中,上下文排序技术通常被用来根据检索到的上下文与用户查询的相关性对其重新排序。一种标准方法是通过嵌入空间中上下文与查询之间的相似度来衡量这种相关性。然而,这种相似度往往无法捕捉到真正的相关性。另一种方法是使用大语言模型(LLM)对上下文进行排序。但是,当候选上下文数量增长而LLM的上下文窗口大小仍然受限时,这些方法可能会遇到可扩展性问题。此外,这些方法还需要使用领域特定数据对LLM进行微调。在这项工作中,我们引入了一个可扩展的排序框架,该框架结合了嵌入相似度和LLM的能力,而无需对LLM进行微调。我们的框架使用预训练的LLM基于检索到的上下文来假设用户查询,并根据假设查询与用户查询之间的相似度对上下文进行排序。我们的框架在推理时高效,并且与许多其他检索和排序技术兼容。实验结果表明,我们的方法在多个基准测试上提升了排序性能。完整的代码和数据可在 https://github.com/zwc662/hyqe 获取。
英文摘要:
In retrieval-augmented systems, context ranking techniques are commonly employed to reorder the retrieved contexts based on their relevance to a user query. A standard approach is to measure this relevance through the similarity between contexts and queries in the embedding space. However, such similarity often fails to capture the relevance. Alternatively, large language models (LLMs) have been used for ranking contexts. However, they can encounter scalability issues when the number of candidate contexts grows and the context window sizes of the LLMs remain constrained. Additionally, these approaches require fine-tuning LLMs with domain-specific data. In this work, we introduce a scalable ranking framework that combines embedding similarity and LLM capabilities without requiring LLM fine-tuning. Our framework uses a pre-trained LLM to hypothesize the user query based on the retrieved contexts and ranks the context based on the similarity between the hypothesized queries and the user query. Our framework is efficient at inference time and is compatible with many other retrieval and ranking techniques. Experimental results show that our method improves the ranking performance across multiple benchmarks. The complete code and data are available at https://github.com/zwc662/hyqe
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。