Rewriting Conversational Utterances with Instructed Large Language Models

Elnara Galimzhanova, Cristina Ioana Muntean, Franco Maria Nardini, Raffaele Perego, Guido Rocchietti · DOI

Abstract

Many recent studies have shown the ability of large language models (LLMs) to achieve state-of-the-art performance on many NLP tasks, such as question answering, text summarization, coding, and translation. In some cases, the results provided by LLMs are on par with those of human experts. These models' most disruptive innovation is their ability to perform tasks via zero-shot or few-shot prompting. This capability has been successfully exploited to train instructed LLMs, where reinforcement learning with human feedback is used to guide the model to follow the user's requests directly. In this paper, we investigate the ability of instructed LLMs to improve conversational search effectiveness by rewriting user questions in a conversational setting. We study which prompts provide the most informative rewritten utterances that lead to the best retrieval performance. Reproducible experiments are conducted on publicly-available TREC CAST datasets. The results show that rewriting conversational utterances with instructed LLMs achieves significant improvements of up to 25.2% in MRR, 31.7% in Precision@1, 27% in NDCG@3, and 11.5% in Recall@500 over state-of-the-art techniques.

Introduction: The Challenge of Ambiguity

In natural conversation, humans are efficient but inherently ambiguous. We frequently use pronouns ("How do I fix it?"), omit context ("What about the other one?"), and shift topics abruptly. While a human listener follows these cues easily by leveraging the shared conversational history, standard Information Retrieval (IR) systems struggle.

Traditional search engines expect "de-contextualized" queries—full, standalone sentences containing all necessary keywords. The core challenge in Conversational Search is bridging this gap: transforming a short, context-dependent utterance into a high-performing search query without losing the user's intent. Previous attempts to solve this used specialized neural models like Bi-LSTMs or fine-tuned GPT-2, but these often struggled with complex topic shifts or required massive amounts of labeled training data.

Methodology: Instructed LLMs as Rewriters

This research investigates using an instructed LLM (gpt-3.5-turbo) as a zero-shot or few-shot query rewriter. Rather than training a new model from scratch, the authors designed a two-stage retrieval pipeline that leverages the broad linguistic knowledge of LLMs.

The Prompting Framework

The rewriting process is governed by a structured prompt that provides the LLM with the necessary scope, examples, and context to generate a self-explanatory query.

The prompting framework used to guide the LLM in rewriting user utterances, showing the flow from system input to the final rewritten query.

The authors tested five distinct prompt templates (P1-P5) to determine which strategy yields the most effective search terms:

  • P1: Includes previous questions and the answers generated for them.
  • P2: Explicitly instructs the model to "add keywords for a retrieval system."
  • P3: Focuses on generating concise, context-free forms.
  • P4: Employs a "few-shot" approach using eight manual examples within the prompt.
  • P5: Instructs the model to follow the pattern of previous interactions.

Two-Stage Retrieval Pipeline

  1. Query Rewriting: The LLM receives the current user utterance plus the conversation history and generates a rewritten query.
  2. First-Stage Retrieval: The rewritten query is sent to a standard retriever (DPH weighting model) to pull the top 1,000 documents.
  3. Second-Stage Reranking: A powerful MonoT5 reranker re-orders these documents to ensure the most relevant results appear at the top of the list.

Experimental Setup and Datasets

The study utilized the TREC Conversational Assistance Track (CAsT) datasets from 2019 and 2020.

  • CAsT 2019: Consists of 20 conversations with an average of 10 turns each.
  • CAsT 2020: A more challenging dataset featuring 25 conversations with frequent topic shifts and a heavier reliance on information found in previous answers.
  • Collection: The retrieval pool included over 38 million passages from TREC CAR, MS-MARCO, and the Washington Post.

Key Results and Insights

The LLM-based approach demonstrated substantial improvements over previous state-of-the-art (SOTA) specialized models like QuReTeC and CQR.

Comparative performance of different prompt strategies (P1-P5) against manual and original baselines on TREC CAsT 2019 and 2020 datasets.

Performance Gains

As shown in the results table, the improvements were significant across all primary metrics:

  • MRR (Mean Reciprocal Rank): Improved by up to 25.2%.
  • Precision@1: Increased by 31.7%, indicating the top result was significantly more likely to be correct.
  • NDCG@3: Improved by 27%.
  • Recall@500: Increased by 11.5%.

Critical Findings

  • Answers as Context: A major finding was the success of Prompt P1. Unlike traditional methods that only consider previous questions, P1 includes previous answers. In the CAsT 2020 dataset, the information required to clarify a new question was often found in the answer to the preceding turn. LLMs proved uniquely capable of extracting this "hidden" context.
  • LLMs vs. Specialized Models: General-purpose instructed LLMs outperformed models specifically trained for query rewriting. This suggests that broad linguistic understanding is more valuable for resolving human ambiguity than narrow training on search-specific datasets.
  • The Value of Verbosity: While human-written "gold standard" rewrites are typically concise, LLM rewrites tend to be more verbose. Interestingly, this descriptive nature often helped the search engine find better matches than the human-curated versions.

Limitations and Future Work

While effective, the use of massive LLMs for every conversational turn introduces challenges regarding latency and cost. The authors suggest that future work could involve using high-quality LLM rewrites as synthetic training data to "distill" this knowledge into smaller, faster, and more cost-effective models.

Additionally, the study noted prompt sensitivity, where minor wording changes can impact performance. Future research will focus on automating prompt optimization and testing these methods in live environments with real-world users to move beyond benchmark datasets.

Summary updated

BibTeX
@inproceedings{galimzhanova2023rewriting,
  author = {Elnara Galimzhanova and Cristina Ioana Muntean and Franco Maria Nardini and Raffaele Perego and Guido Rocchietti},
  title = {{Rewriting Conversational Utterances with Instructed Large Language Models}},
  booktitle = {WI/IAT},
  year = {2023},
  doi = {10.1109/wi-iat59888.2023.00014},
}
Figure