Query Rewriting
Also called query expansion, query reformulation, rewrite-retrieve-read, multi-query retrieval.
Query rewriting uses a language model to reformulate a user's question into one or more queries better suited to the retriever before retrieval is run.
Description
User questions are often ambiguous, conversational, or phrased differently from the documents that answer them. Rewriting can resolve references to earlier turns, split a question into sub-queries, add keywords, or expand the query with a generated pseudo-document. It is closely related to HyDE, which embeds a hypothetical answer instead of the question.
Sources
- Ma et al. (2023). Query Rewriting for Retrieval-Augmented Large Language Models.
- Wang et al. (2023). Query2doc: Query Expansion with Large Language Models.
Cite this entry
Protologue. (2026). Query Rewriting. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.4.0, PTL-0131). https://protologue.com/t/query-rewriting/
BibTeX
@misc{protologue_query_rewriting,
title = {Query Rewriting},
author = {{Protologue}},
year = {2026},
howpublished = {Protologue: A Taxonomy of Prompting and LLM Techniques, v1.4.0},
note = {Entry PTL-0131},
url = {https://protologue.com/t/query-rewriting/}
}New terms, as they're coined
One email a week with the newest techniques, each defined and sourced like this entry.
Delivered through Beehiiv. Unsubscribe from any issue.