Large Language Models Know Your Contextual Search Intent: A Prompting Framework for Conversational Search

Kelong Mao, Zhicheng Dou, Fengran Mo, Jiewen Hou, Haonan Chen, Hongjin Qian

Conversational search presents a unique challenge for traditional information retrieval systems. Unlike standalone keyword queries, multi-turn dialogues are riddled with context-dependent language, such as pronouns or omitted information. This paper, presented at EMNLP 2023, introduces LLM4CS, a prompting framework that leverages Large Language Models (LLMs) to act as sophisticated "search intent interpreters."

The Challenge of Conversational Intent

Traditional approaches to conversational search typically rely on Conversational Query Rewriting (CQR) to de-contextualize queries or Conversational Dense Retrieval (CDR) to encode history into vectors. However, these models often struggle with the "long-tail" nature of human dialogue and complex dependencies across many turns. LLM4CS addresses this by using the zero-shot and few-shot capabilities of LLMs like GPT-3.5 to better understand user intent.

The LLM4CS Framework

The framework consists of a multi-stage pipeline designed to transform a conversational context into a robust search vector.

The LLM4CS architecture illustrating the flow from context to search intent vector.

Tailored Prompting Strategies

The researchers explored three primary prompting methods:

  • Rewriting (REW): The LLM generates a standalone version of the conversational query.
  • Rewriting-Then-Response (RTR): A two-step process where the LLM first rewrites the query and then generates a hypothetical response.
  • Rewriting-And-Response (RAR): The LLM generates both the rewrite and the response in a single pass.

A key finding was that generating hypothetical responses—even if they contain hallucinations—acts as "search gold." These responses provide semantic expansion, helping the retriever find documents that resemble the "answer" the user is looking for.

Chain-of-Thought and Aggregation

To further refine accuracy, Chain-of-Thought (CoT) prompting was employed, requiring the LLM to explain its reasoning before providing a rewrite. Additionally, to mitigate LLM inconsistency, the framework generates $N$ versions of outputs and aggregates them using methods like MaxProb, Self-Consistency (SC), or Mean (averaging intent vectors).

Experimental Results

LLM4CS was evaluated on the TREC Conversational Assistance Track (CAsT) benchmarks (2019, 2020, and 2021). The framework achieved a new state-of-the-art, particularly on the more complex CAsT-20 and CAsT-21 datasets.

Performance comparison (NDCG@3) across different prompting and aggregation methods on CAsT-20 and CAsT-21.

On CAsT-20, LLM4CS reached an NDCG@3 of 0.455, a significant jump from the previous SOTA of 0.350 and even surpassing human-written rewrites (0.422). The "Mean" aggregation method consistently proved most robust, effectively filtering out individual model errors.

Insights and Future Directions

The study revealed that LLMs can be more effective than humans at including technical keywords necessary for retrieval systems. While CoT significantly improved simple rewrites, its impact was less critical when hypothetical responses were already present.

Despite these gains, challenges remain regarding latency and cost due to multiple LLM calls. Future work aims to distill the knowledge from these complex prompts into smaller, more efficient models suitable for real-time production environments.

Summary updated

BibTeX
@inproceedings{mao2023large,
  author = {Kelong Mao and Zhicheng Dou and Fengran Mo and Jiewen Hou and Haonan Chen and Hongjin Qian},
  title = {{Large Language Models Know Your Contextual Search Intent: A Prompting Framework for Conversational Search}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.86},
}
Figure