[Paper Review] APEER: Automatic Prompt Engineering Enhances Large Language Model Reranking
This paper presents APEER, an automatic prompt engineering algorithm that iteratively refines prompts for LLM-based passage reranking, achieving substantial gains over manual prompts and showing strong transferability across datasets and models.
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.
Motivation & Objective
- Motivation to reduce human effort in prompt design for zero-shot LLM reranking in information retrieval.
- Develop a self-contained automatic prompt engineering framework that adapts prompts via feedback and preference optimization.
- Demonstrate the effectiveness and transferability of the generated prompts across diverse datasets and model architectures.
Proposed method
- Iterative two-step prompt optimization: Feedback Optimization to refine the current prompt based on model responses and feedback; Preference Optimization to align refined prompts with high-performing prompts using positive/negative demonstrations.
- Initialize prompts with a positive set (based on SoTA manual prompts) and a negative set (poor-performing prompts) to guide the search.
- Construct training data from MS MARCO-style subsets by creating prompts with query–passage groups and corresponding relevance orders.
- Evaluate prompts using a fixed first-stage retriever (BM25) and a listwise reranking setup with various LLMs.
- Assess cross-model and cross-dataset transferability of generated prompts, and perform ablations on Preference Optimization and training data size.

Experimental results
Research questions
- RQ1How can automatic prompt engineering improve zero-shot LLM reranking for passage relevance ranking beyond manual prompts?
- RQ2Can prompts generated by automatic optimization transfer effectively across different datasets and model architectures?
- RQ3What is the contribution of feedback and preference optimization to the quality of prompts in reranking tasks.
Key findings
- APEER consistently improves over state-of-the-art manual prompts across GPT-4, LLaMA3, and Qwen2 models on MS MARCO-derived tasks (in-domain) and BEIR datasets (out-of-domain).
- On BEIR with eight tasks, APEER achieves an average nDCG@10 improvement of 5.29 over manual prompts for GPT-4, and notable gains for other models as well.
- Feedback Optimization provides local prompt improvements, while Preference Optimization aligns prompts toward high-quality exemplars, with ablation showing its effectiveness.
- Prompts generated by APEER transfer well across models (e.g., prompts trained on GPT-4 improve GPT-3.5 and LLaMA3-based systems) and across datasets (MS MARCO to BEIR).
- GPT-4 with APEER achieves the best overall performance among prompting methods, models, and datasets in the reported experiments.
- Ablation shows that Preference Optimization substantially contributes to prompt quality; increasing training data size generally improves performance, with a trade-off on cost.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.