DQ-LoRe: Dual Queries with Low Rank Approximation Re-ranking for In-Context Learning
SUN YAT-SEN UNIVERSITY · Sun Yat-sen University · The Chinese University of Hong Kong · University of Cambridge · Huawei Noah's Ark Lab · The University of Hong Kong · Hong Kong University of Science and Technology (Guangzhou) · SUN YAT-SEN UNIVERSITY, Tsinghua University · Huawei Technologies Co., Ltd. · The Hong Kong University of Science and Technology · Shenzhen MSU-BIT University · Sun Yat-sen University & MBZUAI
PDF 由论文原始站点提供,PaperCompass 不保存论文文件。
摘要
Recent advances in natural language processing, primarily propelled by Large Language Models (LLMs), have showcased their remarkable capabilities grounded in in-context learning. A promising avenue for guiding LLMs in intricate reasoning tasks involves the utilization of intermediate reasoning steps within the Chain-of-Thought (CoT) paradigm. Nevertheless, the central challenge lies in the effective selection of exemplars for facilitating in-context learning. In this study, we introduce a framework that leverages Dual Queries and Low-rank approximation Re-ranking (DQ-LoRe) to automatically select exemplars for in-context learning. Dual Queries first query LLM to obtain LLM-generated knowledge such as CoT, then query the retriever to obtain the final exemplars via both question and the knowledge. Moreover, for the second query, LoRe employs dimensionality reduction techniques to refine exemplar selection, ensuring close alignment with the input question's knowledge. Through extensive experiments, we demonstrate that DQ-LoRe significantly outperforms prior state-of-the-art methods in the automatic selection of exemplars for GPT-4, enhancing performance from 92.5\% to 94.2\%. Our comprehensive analysis further reveals that DQ-LoRe consistently outperforms retrieval-based approaches in terms of both performance and adaptability, especially in scenarios characterized by distribution shifts. DQ-LoRe pushes the boundaries of in-context learning and opens up new avenues for addressing complex reasoning challenges.