# Context Aware Query Rewriting for Text Rankers using LLM

Source: [Context Aware Query Rewriting for Text Rankers using LLM](<https://www.sota2.com/research/paper/68fa70731e209131cea4b14d>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-26T01:42:00.795Z

Authors: Abhijit Anand, Venktesh V, Vinay Setty, Avishek Anand

Published: 2023-08-31T14:19:50.000Z

## Abstract

Query rewriting refers to an established family of approaches that are applied to underspecified and ambiguous queries to overcome the vocabulary mismatch problem in document ranking. Queries are typically rewritten during query processing time for better query modelling for the downstream ranker. With the advent of large-language models (LLMs), there have been initial investigations into using generative approaches to generate pseudo documents to tackle this inherent vocabulary gap. In this work, we analyze the utility of LLMs for improved query rewriting for text ranking tasks. We find that there are two inherent limitations of using LLMs as query re-writers -- concept drift when using only queries as prompts and large inference costs during query processing. We adopt a simple, yet surprisingly effective, approach called context aware query rewriting (CAR) to leverage the benefits of LLMs for query understanding. Firstly, we rewrite ambiguous training queries by context-aware prompting of LLMs, where we use only relevant documents as context.Unlike existing approaches, we use LLM-based query rewriting only during the training phase. Eventually, a ranker is fine-tuned on the rewritten queries instead of the original queries during training. In our extensive experiments, we find that fine-tuning a ranker using re-written queries offers a significant improvement of up to 33% on the passage ranking task and up to 28% on the document ranking task when compared to the baseline performance of using original queries.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Conversational web navigation on MT-Mind2Web (Cross-Website)](<https://www.sota2.com/research/sota/conversational-web-navigation-on-mt-mind2web-cross-website.md>): Conversational web navigation; MT-Mind2Web (Cross-Website); Element Accuracy: 43.2.

- [Conversational web navigation on MT-Mind2Web Cross-Subdomain](<https://www.sota2.com/research/sota/conversational-web-navigation-on-mt-mind2web-cross-subdomain.md>): Conversational web navigation; MT-Mind2Web Cross-Subdomain; Element Accuracy: 44.5.

- [Web Agent Tasks on Mind2Web Cross-Task](<https://www.sota2.com/research/sota/web-agent-tasks-on-mind2web-cross-task.md>): Web agent tasks; Mind2Web Cross-Task; Step Success Rate: 47.8.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2308.16753>)

[PDF](<https://arxiv.org/pdf/2308.16753.pdf>)
