Skip to main content
QUICK REVIEW

[论文解读] APEER: Automatic Prompt Engineering Enhances Large Language Model Reranking

Can Jin, Hongwu Peng|arXiv (Cornell University)|Jun 20, 2024
Topic Modeling被引用 14
一句话总结

本文提出 APEER,一种自动提示工程算法,能够迭代改进基于大语言模型的段落重新排序提示,相较于手动提示取得显著提升,并在不同数据集和模型之间展示出较强的迁移性。

ABSTRACT

Large Language Models (LLMs) have significantly enhanced Information Retrieval (IR) across various modules, such as reranking. Despite impressive performance, current zero-shot relevance ranking with LLMs heavily relies on human prompt engineering. Existing automatic prompt engineering algorithms primarily focus on language modeling and classification tasks, leaving the domain of IR, particularly reranking, underexplored. Directly applying current prompt engineering algorithms to relevance ranking is challenging due to the integration of query and long passage pairs in the input, where the ranking complexity surpasses classification tasks. To reduce human effort and unlock the potential of prompt optimization in reranking, we introduce a novel automatic prompt engineering algorithm named APEER. APEER iteratively generates refined prompts through feedback and preference optimization. Extensive experiments with four LLMs and ten datasets demonstrate the substantial performance improvement of APEER over existing state-of-the-art (SoTA) manual prompts. Furthermore, we find that the prompts generated by APEER exhibit better transferability across diverse tasks and LLMs.

研究动机与目标

  • 旨在减少信息检索中零-shot LLM 重排的提示设计人力投入。
  • 开发一个自包含的自动提示工程框架,通过反馈和偏好优化来自适应提示。
  • 展示所生成提示在多样数据集和模型架构中的有效性与可迁移性。

提出的方法

  • 迭代的两步提示优化:Feedback Optimization 基于模型响应和反馈来细化当前提示;Preference Optimization 使用正向/负向示例将细化后的提示对齐到高性能提示。
  • 用正向集(基于当前最佳手工提示 SoTA)和负向集(表现差的提示)初始化提示,以引导搜索。
  • 通过创建带有查询–段落组及相应相关性顺序的提示,从 MS MARCO 风格的子集构建训练数据。
  • 使用固定的一阶段检索器(BM25)和多种 LLM 的列表式重排序设置来评估提示。
  • 评估生成的提示在跨模型和跨数据集上的可迁移性,并对 Preference Optimization 与训练数据规模进行消融实验。
Figure 1: Performance overview of four prompting methods on GPT4, LLaMA3 (AI@Meta, 2024 ) and Qwen2 (qwe, 2024 ) models and BEIR datasets (Thakur et al., 2021 ) . The manual prompt is RankGPT (Sun et al., 2023 ) . Modifying the manual prompt with CoT and paraphrasing yields marginal gains.
Figure 1: Performance overview of four prompting methods on GPT4, LLaMA3 (AI@Meta, 2024 ) and Qwen2 (qwe, 2024 ) models and BEIR datasets (Thakur et al., 2021 ) . The manual prompt is RankGPT (Sun et al., 2023 ) . Modifying the manual prompt with CoT and paraphrasing yields marginal gains.

实验结果

研究问题

  • RQ1自动提示工程如何提升段落相关性排序的零-shot LLM 重新排序,超越手工提示?
  • RQ2通过自动优化生成的提示能否在不同数据集和模型架构之间实现有效迁移?
  • RQ3反馈优化与偏好优化对重排序任务中提示质量的贡献是什么?

主要发现

  • APEER 在基于 MS MARCO 的任务(域内)和 BEIR 数据集(域外)上,持续优于最先进的手工提示,适用于 GPT-4、LLaMA3 和 Qwen2 模型。
  • 在 BEIR 的八个任务上,APEER 相对于手工提示在 GPT-4 上平均 nDCG@10 提升 5.29,其他模型也有显著提升。
  • Feedback Optimization 提供局部的提示改进,而 Preference Optimization 将提示对齐到高质量的示例,消融实验显示其有效性。
  • APEER 生成的提示在模型之间具有良好的迁移性(例如,在 GPT-4 训练的提示可提升 GPT-3.5 与基于 LLaMA3 的系统)以及在数据集之间(MS MARCO 到 BEIR)。
  • 在所报道的实验中,使用 APEER 的 GPT-4 在提示方法、模型和数据集中实现了最佳整体性能。
  • 消融实验显示偏好优化对提示质量有实质性贡献;增加训练数据规模通常提升性能,但在成本方面存在权衡。
Figure 2: Overview of \ours . \ours iteratively refines prompts through two optimization steps. In Feedback Optimization, it refines the current prompt $p$ and creates a refined prompt $p^{\prime}$ based on feedback. In Preference Optimization, it further optimizes $p^{\prime}$ by learning preferenc
Figure 2: Overview of \ours . \ours iteratively refines prompts through two optimization steps. In Feedback Optimization, it refines the current prompt $p$ and creates a refined prompt $p^{\prime}$ based on feedback. In Preference Optimization, it further optimizes $p^{\prime}$ by learning preferenc

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。