AdaRewriter: Unleashing the Power of Prompting-based Conversational Query Reformulation via Test-Time Adaptation

Yilong Lai, Jialong Wu, Zhenglin Wang, Deyu ZhouarXiv 2025 · DOI

Introduction

In conversational search, user queries are frequently underspecified, relying heavily on the preceding dialogue context. These queries often contain anaphora (e.g., "Does it have a high school?") or ellipsis, where crucial details are omitted. To enable effective document retrieval, systems must perform Conversational Query Reformulation (CQR)—the process of transforming a context-dependent turn into a standalone, decontextualized search query.

While Large Language Models (LLMs) have shown significant promise in CQR through prompting, a substantial performance gap remains. Research indicates that if an LLM generates multiple candidate reformulations (a "Best-of-N" approach), the "Oracle" performance—the best possible version within that set—far exceeds the quality of the single candidate typically selected by the model. Current strategies, such as Supervised Fine-Tuning (SFT) or simple majority voting (Self-Consistency), often fail to bridge this gap. This paper introduces AdaRewriter, a framework designed to capture this latent potential through test-time adaptation.

The AdaRewriter Framework

AdaRewriter shifts the focus from training-time optimization to inference-time selection. It treats query reformulation as a ranking problem, utilizing a lightweight reward model to identify the most effective search query from a pool of candidates. The framework operates in three distinct phases:

  1. Candidate Generation: A "vanilla" LLM (ranging from open-source models like Llama 3 to black-box APIs like GPT-4o) generates $N$ diverse reformulation candidates for a given conversation turn.
  2. Outcome-Supervised Reward Model: Rather than training on human-written "gold" rewrites—which are expensive to collect and may not be optimal for specific search algorithms—the authors employ an outcome-supervised approach. A DeBERTa-v3-base model is trained using Contrastive Ranking Loss to rank candidates based on their actual retrieval performance (measured by a fusion of sparse BM25 and dense ANCE retrieval scores).
  3. Test-Time Selection: During inference, the reward model scores all $N$ candidates. The system selects the highest-scoring candidate to be dispatched to the search engine.

This "plug-and-play" architecture is particularly valuable for enhancing commercial, black-box LLMs where internal weights cannot be modified.

Experimental Setup and Datasets

The efficacy of AdaRewriter was evaluated across five major conversational search benchmarks:

  • TopiOCQA: A dataset characterized by frequent topic-switching.
  • QReCC: A large-scale dataset containing approximately 14,000 conversations.
  • TREC CAsT (2019, 2020, 2021): These benchmarks were utilized for zero-shot evaluation to determine the reward model's ability to generalize to unseen domains.

Key Insights and Results

Performance Breakthroughs

AdaRewriter achieves state-of-the-art results by effectively navigating the training-inference gap. On the TopiOCQA dataset using sparse retrieval, AdaRewriter (with $N=16$) achieved an MRR of 30.7, significantly outperforming the previous leading ensemble method, LLM4CS, which scored 24.5.

Furthermore, the framework demonstrates a "boosting" effect on high-performing models. When applied to GPT-4o-mini, AdaRewriter improved Recall@10 from 48.2 to 51.4 in sparse retrieval and from 58.0 to 63.0 in dense retrieval settings.

Generalization and Robustness

One of the most compelling findings is the model's zero-shot success. Even when trained on a specific dataset, the reward model consistently outperformed baselines on the TREC CAsT benchmarks. This suggests that the model learns generalizable traits of "effective search queries" rather than just memorizing dataset-specific patterns.

Additionally, AdaRewriter exhibits superior robustness in long dialogues. While standard CQR performance typically decays as a conversation progresses, AdaRewriter maintains higher accuracy in later turns compared to existing ensemble methods.

The Importance of Context

Ablation studies highlighted that the reward model's performance improves significantly when it is provided with the entire conversation history during the scoring phase. This indicates that the model is not merely evaluating the grammatical correctness of a rewrite, but is actively assessing its alignment with the user's underlying intent.

Limitations and Future Directions

While AdaRewriter provides a significant performance boost, it introduces computational overhead. The primary bottleneck is latency, as calling an LLM 16 times per query is resource-intensive.

Future work aims to mitigate this through:

  • Inference Acceleration: Implementing techniques like speculative decoding to speed up candidate generation.
  • Dynamic Resource Allocation: Developing "difficulty-aware" scaling, where the system generates many candidates for ambiguous queries but relies on a single pass for straightforward ones, optimizing the balance between cost and performance.

Summary updated

BibTeX
@misc{lai2025adarewriter,
  author = {Yilong Lai and Jialong Wu and Zhenglin Wang and Deyu Zhou},
  title = {{AdaRewriter: Unleashing the Power of Prompting-based Conversational Query Reformulation via Test-Time Adaptation}},
  year = {2025},
  eprint = {2506.01381},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.01381},
}
Figure